summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js
Side-by-side diff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js') (more/less context) (show whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js28
1 files changed, 10 insertions, 18 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js
index feb16ad..06746d1 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Components/NewUserCreationComponent.js
@@ -1,46 +1,44 @@
/*
-Copyright 2008-2011 Clipperz Srl
+Copyright 2008-2013 Clipperz Srl
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
+This file is part of Clipperz, the online password manager.
For further information about its features and functionalities please
refer to http://www.clipperz.com.
-* Clipperz Community Edition is free software: you can redistribute
- it and/or modify it under the terms of the GNU Affero General Public
- License as published by the Free Software Foundation, either version
- 3 of the License, or (at your option) any later version.
+* Clipperz is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
-* Clipperz Community Edition is distributed in the hope that it will
- be useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+* Clipperz is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public
- License along with Clipperz Community Edition. If not, see
- <http://www.gnu.org/licenses/>.
+ License along with Clipperz. If not, see http://www.gnu.org/licenses/.
*/
Clipperz.Base.module('Clipperz.PM.UI.Web.Components');
Clipperz.PM.UI.Web.Components.NewUserCreationComponent = function(args) {
args = args || {};
Clipperz.PM.UI.Web.Components.NewUserCreationComponent.superclass.constructor.apply(this, arguments);
this._tabPanelController = null;
this._initiallySelectedTab = args.selected || 'CREDENTIALS';
this._tabPanelControllerConfiguration = {
'CREDENTIALS': {
tab: 'credentialsTab',
panel: 'credentialsTabpanel'
},
'CHECK_CREDENTIALS': {
tab: 'checkCredentialsTab',
panel: 'checkCredentialsTabpanel'
},
'TERMS_OF_SERVICE': {
tab: 'termsOfServiceTab',
@@ -102,50 +100,48 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.NewUserCreationComponent, Cli
//=========================================================================
'shouldShowElementWhileRendering': function() {
return false;
},
//=========================================================================
'tabPanelController': function () {
if (this._tabPanelController == null) {
this._tabPanelController = new Clipperz.PM.UI.Common.Controllers.TabPanelController({
component:this,
configuration:this._tabPanelControllerConfiguration
});
MochiKit.Signal.connect(this._tabPanelController, 'tabSelected', this, 'handleTabSelected')
}
return this._tabPanelController;
},
//-------------------------------------------------------------------------
'renderSelf': function() {
-//console.log('** Clipperz.targetModalDimensionsAndPosition', Clipperz.Base.serializeJSON(Clipperz.PM.UI.Common.Components.BaseComponent.targetModalDimensionsAndPosition));
-
this.append(this.element(), {tag:'div', cls:'NewUserCreation mainDialog', id:this.getId('panel'), children: [
{tag:'form', id:this.getId('form'), cls:'newUserCreationForm', children:[
{tag:'div', cls:'header', children:[
{tag:'div', cls:'title', children:[
{tag:'h3', id:this.getId('title'), html:"Create new user"}
]}
]},
{tag:'div', id:this.getId('body'), cls:'body', children:[
{tag:'div', cls:'tabContainer', children:[
{tag:'ul', cls:'tabs', children:[
{tag:'li', id:this.getId('credentialsTab'), children:[{tag:'span', html:"credentials"}]},
{tag:'li', id:this.getId('checkCredentialsTab'), children:[{tag:'span', html:"credentials check"}]},
{tag:'li', id:this.getId('termsOfServiceTab'), children:[{tag:'span', html:"terms of service"}]},
{tag:'li', id:this.getId('createUserTab'), children:[{tag:'span', html:"create user"}]} //,
// {tag:'li', id:this.getId('loginTab'), children:[{tag:'span', html:"login"}]},
]},
{tag:'ul', cls:'tabPanels', children:[
{tag:'li', id:this.getId('credentialsTabpanel'), cls:'tabPanel credentials', children:[
{tag:'div', cls:'wizardStepDescription', children:[{tag:'span', html:Clipperz.PM.Strings.getValue('Wizards.NewUserWizard.CREDENTIALS.description')}]},
{tag:'ul', cls:'credentials', children:[
{tag:'li', children:[{tag:'span', cls:'label', html:"username"}, {tag:'input', type:'text', id:this.getId('username')/*, value:'test'*/}]},
{tag:'li', children:[{tag:'span', cls:'label', html:"passphrase"}, {tag:'input', type:'password', id:this.getId('passphrase')/*, value:'test'*/}]}
]}
]},
@@ -312,52 +308,48 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Components.NewUserCreationComponent, Cli
MochiKit.Signal.signal(this, 'changedValue', anEvent);
this.incrementUpdateFaviconCounter();
MochiKit.Async.callLater(1, MochiKit.Base.method(this, 'updateFavicon'));
},
//-------------------------------------------------------------------------
'handleBackClick': function (anEvent) {
anEvent.preventDefault();
MochiKit.Signal.signal(this, 'back');
},
//=========================================================================
'bottomMargin': function () {
var result;
// TODO: WTF!!!
// result = MochiKit.Style.getElementPosition(this.element())['y'] +
// MochiKit.Style.getElementDimensions(this.element())['h'];
// result = MochiKit.Style.getElementPosition(this.getElement('footer'))['y'];
-//console.log("### bottomMargin");
-//console.log('displayElement', this.displayElement());
-//console.log('-- Clipperz.targetModalDimensionsAndPosition', Clipperz.Base.serializeJSON(Clipperz.PM.UI.Common.Components.BaseComponent.targetModalDimensionsAndPosition));
-//console.log('element', MochiKit.Style.getElementPosition('modalDialog') ['y'], MochiKit.Style.getElementDimensions('modalDialog')['h']);
// result = 450;
result = Clipperz.PM.UI.Common.Components.BaseComponent.targetModalDimensionsAndPosition['position']['y'] +
Clipperz.PM.UI.Common.Components.BaseComponent.targetModalDimensionsAndPosition['dimensions']['h'] -
60;
return result;
},
//=========================================================================
'focusOnUsernameElement': function () {
MochiKit.Async.callLater(0.1, MochiKit.Base.method(this.getElement('username'), 'focus'));
},
'focusOnRePassphraseElement': function () {
this.getElement('re-passphrase').focus();
},
/*
'focusOnBookmarkletConfigurationElement': function () {
this.getElement('bookmarkletConfiguration').focus();
},
'focusOnFaviconElement': function () {