Normalized "use strict" quoting and minor fixed to components

This commit is contained in:
Giulio Cesare Solaroli 2015-08-18 17:31:02 +02:00
parent a0bd079b51
commit 6fed029616
18 changed files with 48 additions and 19 deletions

View File

@ -21,7 +21,7 @@ refer to http://www.clipperz.com.
*/
'use strict';
"use strict";
Clipperz.Base.module('Clipperz.PM.UI');
// code snippet taken on March 23, 2015 from here: https://github.com/JedWatson/classnames/blob/master/index.js

View File

@ -21,6 +21,7 @@ refer to http://www.clipperz.com.
*/
"use strict";
Clipperz.Base.module('Clipperz.PM.UI.Components');
Clipperz.PM.UI.Components.ButtonClass = React.createClass({

View File

@ -21,7 +21,7 @@ refer to http://www.clipperz.com.
*/
'use strict';
"use strict";
Clipperz.Base.module('Clipperz.PM.UI.Components.Cards');
Clipperz.PM.UI.Components.Cards.CommandToolbarClass = React.createClass({

View File

@ -21,7 +21,7 @@ refer to http://www.clipperz.com.
*/
'use strict';
"use strict";
Clipperz.Base.module('Clipperz.PM.UI.Components.Cards');
Clipperz.PM.UI.Components.Cards.EditClass = React.createClass({

View File

@ -21,7 +21,7 @@ refer to http://www.clipperz.com.
*/
'use strict';
"use strict";
Clipperz.Base.module('Clipperz.PM.UI.Components.Cards');
Clipperz.PM.UI.Components.Cards.EditToolbarClass = React.createClass({

View File

@ -21,7 +21,7 @@ refer to http://www.clipperz.com.
*/
'use strict';
"use strict";
Clipperz.Base.module('Clipperz.PM.UI.Components.Cards');

View File

@ -21,7 +21,7 @@ refer to http://www.clipperz.com.
*/
'use strict';
"use strict";
Clipperz.Base.module('Clipperz.PM.UI.Components.Cards');
Clipperz.PM.UI.Components.Cards.ListClass = React.createClass({
@ -79,7 +79,9 @@ Clipperz.PM.UI.Components.Cards.ListClass = React.createClass({
classes[this.props['style']] = true;
return React.DOM.div({'key':'cardList', 'className':Clipperz.PM.UI.Components.classNames(classes)}, [
React.DOM.div({'className':'cardListInnerWrapper'}, [
this.isFeatureEnabled('LIST_CARDS') ? React.DOM.ul({}, MochiKit.Base.map(this.renderItem, cards)) : null
])
]);
},

View File

@ -21,7 +21,7 @@ refer to http://www.clipperz.com.
*/
'use strict';
"use strict";
Clipperz.Base.module('Clipperz.PM.UI.Components.Cards');
Clipperz.PM.UI.Components.Cards.PasswordGeneratorClass = React.createClass({
@ -38,13 +38,14 @@ Clipperz.PM.UI.Components.Cards.PasswordGeneratorClass = React.createClass({
getInitialState: function () {
return {
'length': 32,
'length': 24,
'options': 'closed',
'chars_AZ': true,
'chars_az': true,
'chars_09': true,
'chars_space': false,
'chars_other': true,
'charset': '',
'password': '',
'entropy': 0,

View File

@ -21,7 +21,7 @@ refer to http://www.clipperz.com.
*/
'use strict';
"use strict";
Clipperz.Base.module('Clipperz.PM.UI.Components.Cards');
Clipperz.PM.UI.Components.Cards.TagEditorClass = React.createClass({

View File

@ -21,7 +21,7 @@ refer to http://www.clipperz.com.
*/
'use strict';
"use strict";
Clipperz.Base.module('Clipperz.PM.UI.Components.Cards');
Clipperz.PM.UI.Components.Cards.TextAreaClass = React.createClass({

View File

@ -21,7 +21,7 @@ refer to http://www.clipperz.com.
*/
'use strict';
"use strict";
Clipperz.Base.module('Clipperz.PM.UI.Components.Cards');
Clipperz.PM.UI.Components.Cards.ViewClass = React.createClass({

View File

@ -60,6 +60,22 @@ Clipperz.PM.UI.Components.Pages.LoginPageClass = React.createClass({
this.setState(newState);
},
pollForChanges: function() {
if (this.props.mode == 'CREDENTIALS') {
var newState;
var usernameValue = this.refs['username'].getDOMNode().value;
var passphraseValue = this.refs['passphrase'].getDOMNode().value;
newState = {};
newState['username'] = (usernameValue) ? usernameValue : "";
newState['passphrase'] = (passphraseValue) ? passphraseValue : "";
this.setState(newState);
}
},
//=========================================================================
handleCredentialSubmit: function (event) {

View File

@ -21,7 +21,7 @@ refer to http://www.clipperz.com.
*/
'use strict';
"use strict";
Clipperz.Base.module('Clipperz.PM.UI.Components.Pages');
Clipperz.PM.UI.Components.Pages.MainPageClass = React.createClass({

View File

@ -21,7 +21,7 @@ refer to http://www.clipperz.com.
*/
'use strict';
"use strict";
Clipperz.Base.module('Clipperz.PM.UI.Components.Panels');
Clipperz.PM.UI.Components.Panels.MainPanelClass = React.createClass({

View File

@ -21,7 +21,7 @@ refer to http://www.clipperz.com.
*/
'use strict';
"use strict";
Clipperz.Base.module('Clipperz.PM.UI.Components.Panels');
Clipperz.PM.UI.Components.Panels.SelectionPanelClass = React.createClass({

View File

@ -21,7 +21,7 @@ refer to http://www.clipperz.com.
*/
'use strict';
"use strict";
Clipperz.Base.module('Clipperz.PM.UI.Components');
Clipperz.PM.UI.Components.SelectionsClass = React.createClass({

View File

@ -21,7 +21,7 @@ refer to http://www.clipperz.com.
*/
'use strict';
"use strict";
Clipperz.Base.module('Clipperz.PM.UI.Components');
Clipperz.PM.UI.Components.TagIndexItemClass = React.createClass({

View File

@ -294,6 +294,15 @@ console.log("THE BROWSER IS OFFLINE");
loginFormPage.setProps({'mode':this.loginMode()});
this.moveInPage(this.currentPage(), 'loginPage');
MochiKit.Async.callLater(0.5, MochiKit.Base.method(loginFormPage, 'setInitialFocus'));
MochiKit.Async.callLater(0.5, MochiKit.Base.method(this, 'recursivelyPollLoginFormForChanges'));
},
recursivelyPollLoginFormForChanges: function () {
this.pages()['loginPage'].pollForChanges();
if (this.currentPage() == 'loginPage') {
MochiKit.Async.callLater(0.5, MochiKit.Base.method(this, 'recursivelyPollLoginFormForChanges'));
}
},
showRegistrationForm_handler: function () {