summaryrefslogtreecommitdiff
path: root/frontend/beta/js/Clipperz/PM/Components
Side-by-side diff
Diffstat (limited to 'frontend/beta/js/Clipperz/PM/Components') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/BaseComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/MessageBox.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Printing/Header.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/Printing/Record.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js22
-rw-r--r--frontend/beta/js/Clipperz/PM/Components/TextFormField.js22
51 files changed, 510 insertions, 612 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js b/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js
index f3a3902..07c0b97 100644
--- a/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/BaseComponent.js
@@ -1,121 +1,119 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
//#############################################################################
var _Clipperz_PM_Components_Panels_base_id_ = 0;
//#############################################################################
Clipperz.PM.Components.BaseComponent = function(anElement, args) {
args = args || {};
// MochiKit.Base.bindMethods(this);
// Clipperz.PM.Components.BaseComponent.superclass.constructor.call(this, args);
this._element = anElement;
this._ids = {};
return this;
}
//=============================================================================
//MochiKit.Base.update(Clipperz.PM.Components.BaseComponent.prototype, {
YAHOO.extendX(Clipperz.PM.Components.BaseComponent, YAHOO.ext.util.Observable, {
'isClipperzPMComponent': true,
//-------------------------------------------------------------------------
'toString': function () {
return "Clipperz.PM.Components.BaseComponent component";
},
//-------------------------------------------------------------------------
'domHelper': function() {
return Clipperz.YUI.DomHelper;
},
//-------------------------------------------------------------------------
'element': function() {
//MochiKit.Logging.logDebug(">>> BaseComponent.element");
return this._element;
},
'setElement': function(aValue) {
this._element = aValue;
},
//-----------------------------------------------------
'remove': function() {
//MochiKit.Logging.logDebug(">>> BaseComponent.remove");
Clipperz.NotificationCenter.unregister(this);
MochiKit.Signal.disconnectAllTo(this);
//MochiKit.Logging.logDebug("<<< BaseComponent.remove");
},
//-------------------------------------------------------------------------
'getId': function(aValue) {
var result;
result = this._ids[aValue];
if (typeof(result) == 'undefined') {
_Clipperz_PM_Components_Panels_base_id_ ++;
result = "Clipperz_PM_Components_Panels_" + aValue + "_" + _Clipperz_PM_Components_Panels_base_id_;
this._ids[aValue] = result;
//MochiKit.Logging.logDebug(">>> getId(" + aValue + ") = " + result);
} else {
//MochiKit.Logging.logDebug("<<< getId(" + aValue + ") = " + result);
}
return result;
},
'getDom': function(aValue) {
return YAHOO.util.Dom.get(this.getId(aValue));
},
'getElement': function(aValue) {
return YAHOO.ext.Element.get(this.getId(aValue));
},
'getActor': function(aValue, anAnimator) {
return new YAHOO.ext.Actor(this.getDom(aValue), anAnimator);
},
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js
index 7a3b3a3..14e42a5 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactHeader.js
@@ -1,83 +1,81 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; }
Clipperz.PM.Components.Compact.CompactHeader = function(anElement, args) {
Clipperz.PM.Components.Compact.CompactHeader.superclass.constructor.call(this, anElement, args);
this.render();
return this;
};
YAHOO.extendX(Clipperz.PM.Components.Compact.CompactHeader, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.Compact.CompactHeader";
},
//-----------------------------------------------------
'render': function() {
this.element().update("");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[
{tag:'img', src:'./images/logo.gif'},
{tag:'div', id:'lockBlock', children:[
{tag:'input', type:'checkbox', id:'autolock'},
{tag:'span', html:'auto'},
{tag:'a', href:'#', htmlString:Clipperz.PM.Strings['lockMenuLabel'], id:'lock'}
]}
]});
Clipperz.YUI.DomHelper.append(this.element().dom,
{tag:'div', id:'compactMiscLinks', children:[
{tag:'a', id:'donateHeaderIconLink', target:'_blank', href:Clipperz.PM.Strings['donateHeaderLinkUrl'], children:[
{tag:'img', id:'donateHeaderLinkIcon', src:'./images/smiles_small.gif'}
]},
{tag:'ul', children:[
{tag:'li', children:[{tag:'a', id:'donateHeaderLink', html:'donate', target:'_blank'}]},
{tag:'li', children:[{tag:'a', id:'creditsHeaderLink', html:'credits', target:'_blank'}]},
{tag:'li', children:[{tag:'a', id:'feedbackHeaderLink', html:'feedback', target:'_blank'}]},
{tag:'li', children:[{tag:'a', id:'helpHeaderLink', html:'help', target:'_blank'}]},
{tag:'li', children:[{tag:'a', id:'forumHeaderLink', html:'forum', target:'_blank'}]}
]}
]}
);
YAHOO.ext.Element.get('lockBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
Clipperz.NotificationCenter.notify(this, 'switchLanguage');
},
//-----------------------------------------------------
__syntaxFix__: '__syntaxFix__'
});
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js
index 0f6858a..1312967 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Compact/CompactInterface.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; }
Clipperz.PM.Components.Compact.CompactInterface = function(anElement, args) {
Clipperz.PM.Components.Compact.CompactInterface.superclass.constructor.call(this, anElement, args);
this._directLoginItemTemplate = null;
this._user = args.user;
this._autoLockTimer = null;
Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler')
Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler');
this.render();
return this;
};
YAHOO.extendX(Clipperz.PM.Components.Compact.CompactInterface, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.Compact.CompactInterface";
},
//-----------------------------------------------------
'render': function() {
var result;
var layout;
var registerButton;
//MochiKit.Logging.logDebug(">>> CompactInterface.render");
this.element().update("");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', children:[
{tag:'div', id:this.getId('cantentPanel'), children:[
{tag:'h4', id:this.getId('message')},
{tag:'ul', id:'directLogins', children:[]}
]},
{tag:'div', id:this.getId('lockPanel'), cls:'lockPanel', children:[
{tag:'div', htmlString:Clipperz.PM.Strings['lockDescription']},
{tag:'form', id:'lockDialogForm', children:[
{tag:'input', type:'password', id:this.getId('lockPassphrase')}
]},
{tag:'div', id:this.getId('unlock')}
]}
]});
this.getElement('lockPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
YAHOO.ext.Element.get('lockBlock').show();
MochiKit.Signal.connect(YAHOO.ext.Element.get('lock').dom, 'onclick', this, 'doLockEventHandler');
new YAHOO.ext.Button(this.getId('unlock'), {text:Clipperz.PM.Strings['unlockButtonLabel'], handler:this.doUnlockEventHandler, scope:this, minWidth:0});
this.getElement('unlock').swallowEvent('click', true);
new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('lockPassphrase'));
MochiKit.Signal.connect('lockDialogForm', 'onsubmit', this, 'doUnlockEventHandler');
this.getElement('cantentPanel').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
//MochiKit.Logging.logDebug("<<< CompactInterface.render");
return result;
},
//-----------------------------------------------------
'directLoginAddedHandler': function(anEvent) {
this.redrawDirectLoginItems();
},
//-----------------------------------------------------
'compareDirectLogins': function(a, b) {
return MochiKit.Base.compare(a.label().toLowerCase(), b.label().toLowerCase());
},
//-----------------------------------------------------
'redrawDirectLoginItems': function() {
var template;
var allDirectLogins;
this.getElement('message').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
//MochiKit.Logging.logDebug(">>> CompactInterface.redrawDirectLoginItems");
//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 0");
MochiKit.Iter.forEach(YAHOO.ext.Element.get('directLogins').getChildrenByTagName('li'), function(aDirectLoginElement) {
MochiKit.Signal.disconnectAll(aDirectLoginElement.dom);
//MochiKit.Logging.logDebug("disconnecting IMG " + aDirectLoginElement.getChildrenByTagName('img')[0].dom.src);
MochiKit.Signal.disconnectAll(aDirectLoginElement.getChildrenByTagName('img')[0].dom);
})
//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 1");
YAHOO.ext.Element.get('directLogins').update("");
//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 2");
allDirectLogins = MochiKit.Base.values(this.user().directLoginReferences());
//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 3");
allDirectLogins.sort(this.compareDirectLogins);
//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 4");
template = this.directLoginItemTemplate();
//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 5");
MochiKit.Iter.forEach(allDirectLogins, MochiKit.Base.bind(function(aDirectLogin) {
var directLoginElement;
var faviconImageElementID;
faviconImageElementID = aDirectLogin.reference() + "_faviconIMG";
directLoginElement = template.append('directLogins', {
elementID:faviconImageElementID,
faviconUrl:aDirectLogin.fixedFavicon(),
directLoginTitle:aDirectLogin.label(),
directLoginReference:aDirectLogin.reference()
}, true);
//MochiKit.Logging.logDebug("--- CompactInterface.redrawDirectLoginItems - 6: " + recordElement.dom);
directLoginElement.addClassOnOver("hover");
MochiKit.Signal.connect(directLoginElement.dom, 'onclick', this, 'handleDirectLoginClick');
MochiKit.Signal.connect(faviconImageElementID, 'onload', this, 'handleLoadedFaviconImage');
MochiKit.Signal.connect(faviconImageElementID, 'onerror', aDirectLogin, 'handleMissingFaviconImage');
MochiKit.Signal.connect(faviconImageElementID, 'onabort', aDirectLogin, 'handleMissingFaviconImage');
// YAHOO.ext.Element.get(faviconImageElementID).dom.src = aDirectLogin.fixedFavicon();
}, this));
this.resetAutoLockTimer();
diff --git a/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js b/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js
index a1e60d8..013dd0d 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Compact/LoginForm.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Compact) == 'undefined') { Clipperz.PM.Components.Compact = {}; }
Clipperz.PM.Components.Compact.LoginForm = function(anElement, args) {
Clipperz.PM.Components.Compact.LoginForm.superclass.constructor.call(this, anElement, args);
this.render();
Clipperz.NotificationCenter.register(null, 'updatedProgressState', this, 'userNotificationHandler')
return this;
};
YAHOO.extendX(Clipperz.PM.Components.Compact.LoginForm, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.Compact.LoginForm";
},
//-----------------------------------------------------
'render': function() {
var result;
var layout;
MochiKit.Signal.disconnectAllTo(this);
this.element().update("");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[
{tag:'div', id:'compactHeader'},
{tag:'div', id:'compactBody', children:[
{tag:'form', id:this.getId('loginForm_form'), children:[
{tag:'dl', children:[
{tag:'dt', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']},
{tag:'dd', children:[
{tag:'input', id:this.getId('login_username'), type:'text', size:'30', name:'username'}
]},
{tag:'dt', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']},
{tag:'dd', children:[
{tag:'input', id:this.getId('login_passphrase'), type:'password', size:'30', name:'passphrase'}
]}
]},
{tag:'div', id:this.getId('login_submit')}
]},
{tag:'h4', id:this.getId('message')}
]}
]});
new Clipperz.PM.Components.Compact.CompactHeader(YAHOO.ext.Element.get('compactHeader'));
MochiKit.Signal.connect(this.getId('loginForm_form'), 'onsubmit', this, 'stopFormSubmit');
new YAHOO.ext.Button(this.getId('login_submit'), {text:Clipperz.PM.Strings['loginFormButtonLabel'], handler:this.doLogin, scope:this, minWidth:0});
this.getElement('login_submit').swallowEvent('click', true);
MochiKit.Signal.connect(this.getId('loginForm_form'), 'onkeydown', this, 'onkeydown');
new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('login_passphrase'));
this.getElement('login_username').focus();
return result;
},
//-----------------------------------------------------
'doLogin': function(e) {
//MochiKit.Logging.logDebug(">>> compact.LoginForm.doLogin");
if (this.checkLoginForm()) {
this.doLoginWithUsernameAndPassphrase(this.getDom('login_username').value, this.getDom('login_passphrase').value);
}
//MochiKit.Logging.logDebug("<<< compact.LoginForm.doLogin");
},
//.........................................................................
'doLoginWithUsernameAndPassphrase': function(anUsername, aPassphrase) {
var deferredResult;
var user;
//MochiKit.Logging.logDebug(">>> compact.LoginForm.doLoginWithUsernameAndPassphrase");
user = new Clipperz.PM.DataModel.User({username:anUsername, passphrase:aPassphrase});
deferredResult = new MochiKit.Async.Deferred();
deferredResult.addCallback(MochiKit.Base.method(user, 'connect'));
deferredResult.addCallback(MochiKit.Base.method(user, 'loadPreferences'));
deferredResult.addCallback(MochiKit.Base.method(user, 'loadRecords'));
deferredResult.addCallback(MochiKit.Base.method(user, 'loadDirectLogins'));
deferredResult.addErrback(MochiKit.Base.bind(function() {
this.getElement('loginForm_form').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show();
this.getElement('message').update(Clipperz.PM.Strings['loginMessagePanelFailureText']);
this.getDom('login_passphrase').value = "";
this.getElement('login_passphrase').focus();
}, this))
//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("compact.LoginForm.doLogin - 6: " + res); return res;});
deferredResult.callback("token");
//MochiKit.Logging.logDebug("<<< compact.LoginForm.doLoginWithUsernameAndPassphrase");
return deferredResult;
},
//.........................................................................
'checkLoginForm': function() {
var result;
var username
var passphrase;
//MochiKit.Logging.logDebug(">>> checkLoginForm");
username = this.getDom('login_username').value;
passphrase = this.getDom('login_passphrase').value;
if ((username != "") && (passphrase != "")) {
result = true;
} else {
if (username == "") {
this.getElement('login_username').focus();
} else if (passphrase == "") {
this.getElement('login_passphrase').focus();
}
result = false;
}
//MochiKit.Logging.logDebug("<<< checkLoginForm - " + result);
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js
index 3f4952d..fef8e9e 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportColumns.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
//#############################################################################
Clipperz.PM.Components.Import.CSVImport.CSVImportColumns = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Import.CSVImport.CSVImportColumns.superclass.constructor.call(this, anElement, args);
this._mainComponent = args.mainComponent;
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportColumns, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.CSVImport.CSVImportColumns component";
},
//-------------------------------------------------------------------------
'mainComponent': function() {
return this._mainComponent;
},
//-------------------------------------------------------------------------
'render': function() {
var i,c;
var columnSelectorCheckboxCells;
var checkboxes;
var data;
//MochiKit.Logging.logDebug(">>> CSVImportColumns.render");
Clipperz.NotificationCenter.unregister(this);
MochiKit.Signal.disconnectAllTo(this);
this.element().update("");
data = this.mainComponent().parsedValues();
columnSelectorCheckboxCells = [];
c = data[0].length;
for (i=0; i<c; i++) {
columnSelectorCheckboxCells.push({tag:'th', valign:'top', cls:(this.mainComponent().isColumnSelected(i) ? 'selectedColumn': 'skippedColumn'), children:[
{tag:'input', type:'checkbox', id:this.getId('columnCheckbox_' + i), value:i}
]})
}
this.domHelper().append(this.element(), {tag:'div', children:[
{tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Columns']},
{tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[
{tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview columns', cellspacing:'0', children:[
{tag:'thead', id:this.getId('previewData_thead'), children:[
{tag:'tr', children:columnSelectorCheckboxCells}
]},
{tag:'tbody', id:this.getId('previewData_tbody'), children:[]}
]}
]}
]});
c = data[0].length;
for (i=0; i<c; i++) {
if (this.mainComponent().isColumnSelected(i)) {
this.getDom('columnCheckbox_' + i).checked = true;
}
}
this.renderData(this.getElement('previewData_tbody'), data);
checkboxes = MochiKit.DOM.getElementsByTagAndClassName('input', null, this.getDom('previewData_thead'));
c = checkboxes.length;
for (i=0; i<c; i++) {
MochiKit.Signal.connect(checkboxes[i], 'onclick', this, 'renderDataHandler');
}
//MochiKit.Logging.logDebug("<<< CSVImportColumns.render");
},
//-------------------------------------------------------------------------
'renderData': function(anElement, someData) {
var config;
var i,c;
//MochiKit.Logging.logDebug(">>> CSVImportColumns.renderData");
// anElement.update("");
MochiKit.DOM.replaceChildNodes(anElement.dom);
config = MochiKit.Base.map(MochiKit.Base.bind(function(aRowData) {
var result;
var i,c;
result = {tag:'tr', children:[]};
c = aRowData.length;
for (i=0; i<c; i++) {
var field;
field = aRowData[i];
result.children.push({tag:'td', valign:'top', cls:(this.mainComponent().isColumnSelected(i) ? 'selectedColumn': 'skippedColumn'), html:(MochiKit.Base.isNotEmpty(field) ? field.replace(/\n/g, '<br>') : '&nbsp;')});
}
return result;
}, this), someData);
MochiKit.Base.map(function(aRowConfig) {Clipperz.YUI.DomHelper.append(anElement, aRowConfig);}, config);
Clipperz.Style.applyZebraStylesToTable(this.getId('previewDada'));
//MochiKit.Logging.logDebug("<<< CSVImportColumns.renderData");
},
//-------------------------------------------------------------------------
'renderDataHandler': function(anEvent) {
var thElement;
thElement = YAHOO.ext.Element.get(anEvent.src().parentNode);
if (anEvent.src().checked == true) {
this.mainComponent().skippedColumns().remove(anEvent.src().value);
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js
index f7dbd5d..e816380 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportFields.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
//#############################################################################
Clipperz.PM.Components.Import.CSVImport.CSVImportFields = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Import.CSVImport.CSVImportFields.superclass.constructor.call(this, anElement, args);
this._mainComponent = args.mainComponent;
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportFields, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.CSVImport.CSVImportFields component";
},
//-------------------------------------------------------------------------
'mainComponent': function() {
return this._mainComponent;
},
//-------------------------------------------------------------------------
'render': function() {
var fieldsHeaderCells;
var titleColumnIndex;
var notesColumnIndex;
var i,c;
Clipperz.NotificationCenter.unregister(this);
MochiKit.Signal.disconnectAllTo(this);
this.element().update("");
titleColumnIndex = this.mainComponent().titleColumnIndex()
notesColumnIndex = this.mainComponent().notesColumnIndex()
fieldsHeaderCells = [];
fieldsHeaderCells.push({tag:'td', valign:'top', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)});
c = this.mainComponent().parsedValues()[0].length;
for (i=0; i<c; i++) {
if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
var trimmedLabel;
trimmedLabel = Clipperz.Base.trim(this.mainComponent().labelForColumn(i));
fieldsHeaderCells.push({tag:'td', valign:'top', id:this.getId('fieldHeaderTD_' + i), cls:((trimmedLabel == "") ? 'missingLabelWarning' : (this.isColumnSetup(i) ? 'configuredColumn': 'unconfiguredColumn')), children:[
{tag:'span', html:((trimmedLabel == "") ? Clipperz.PM.Strings['CSV_ImportWizard_Fields_MissingLabelWarning'] : trimmedLabel)/*, cls:((trimmedLabel == "") ? 'missingLabelWarning' : '')*/},
{tag:'select', id:this.getId('select_' + i), name:i, children:[
{tag:'option', value:'UNDEFINED', html:"select data type", cls:'disabledOption'},
{tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']},
{tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']},
{tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']},
{tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']},
{tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']}
]}
]})
}
}
if (notesColumnIndex != -1) {
fieldsHeaderCells.push({tag:'td', valign:'top', cls:'notes', html:this.mainComponent().labelForColumn(notesColumnIndex)});
}
this.domHelper().append(this.element(), {tag:'div', children:[
{tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Fields']},
{tag:'div', id:this.getId('dataDiv'), children:[
{tag:'div', children:[
]},
{tag:'div', cls:'csvImportPreview', children:[
{tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[
{tag:'thead', id:this.getId('previewData_thead'), children:[
{tag:'tr', cls:'CSV_previewData_header', children:fieldsHeaderCells}
]},
{tag:'tbody', id:this.getId('previewData_tbody'), children:[]}
]}
]}
]}
]});
for (i=0; i<c; i++) {
if ((i != titleColumnIndex) && (i != notesColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
Clipperz.DOM.selectOptionMatchingValue(this.getDom('select_' + i), this.mainComponent().typeForColumn(i));
MochiKit.Signal.connect(this.getDom('select_' + i), 'onchange', this, 'renderDataRowsHandler');
}
}
this.renderDataRows(this.getElement('previewData_tbody'));
// Clipperz.NotificationCenter.register(null, 'updatedCSVImportColumnHeader', this, 'renderDataRowsHandler');
},
//-------------------------------------------------------------------------
'isColumnSetup': function(aColumnIndex) {
return ((Clipperz.Base.trim(this.mainComponent().labelForColumn(aColumnIndex)) != "") && (this.mainComponent().typeForColumn(aColumnIndex) != 'UNDEFINED'));
},
//-------------------------------------------------------------------------
'renderDataRowsHandler': function(anEvent) {
var columnIndex;
var tdElement;
//MochiKit.Logging.logDebug(">>> renderDataRowsHandler")
columnIndex = anEvent.src().name;
this.mainComponent().setTypeForColumn(anEvent.src().value, columnIndex);
tdElement = this.getElement('fieldHeaderTD_' + columnIndex);
if (this.isColumnSetup(columnIndex)) {
tdElement.removeClass('unconfiguredColumn');
tdElement.addClass('configuredColumn');
} else {
tdElement.addClass('unconfiguredColumn');
tdElement.removeClass('configuredColumn');
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js
index 5cb8679..dbde138 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportHeader.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
//#############################################################################
Clipperz.PM.Components.Import.CSVImport.CSVImportHeader = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Import.CSVImport.CSVImportHeader.superclass.constructor.call(this, anElement, args);
this._mainComponent = args.mainComponent;
this._pendingDeferredLabelFieldHandlerEvents = 0;
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportHeader, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.CSVImport.CSVImportHeader component";
},
//-------------------------------------------------------------------------
'mainComponent': function() {
return this._mainComponent;
},
//-------------------------------------------------------------------------
'render': function() {
var thConfigs;
var i,c;
//MochiKit.Logging.logDebug(">>> CSVImportHeader.render");
Clipperz.NotificationCenter.unregister(this);
MochiKit.Signal.disconnectAllTo(this);
thConfigs = [];
c = this.mainComponent().parsedValues()[0].length;
for (i=0; i<c; i++) {
if (this.mainComponent().isColumnSelected(i)) {
// thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:this.mainComponent().labelForColumn(i)}]});
thConfigs.push({tag:'th', children:[{tag:'input', type:'text', id:this.getId('headerTextField_' + i), value:""}]});
}
}
this.element().update("");
this.domHelper().append(this.element(), {tag:'div', children:[
{tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header']},
{tag:'div', cls:'importStepParameters', children:[
{tag:'input', type:'checkbox', name:'isFistRowHeader', id:this.getId('isFirstRowHeader_checkbox')},
{tag:'span', id:this.getId('isFirstRowHeader_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Header_Settings_firstRowHeaderLabel']}
]},
{tag:'div', id:this.getId('dataDiv'), children:[
{tag:'div', cls:'csvImportPreview', children:[
{tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview header', cellspacing:'0', children:[
{tag:'thead', children:[{tag:'tr', children:thConfigs}]},
{tag:'tbody', id:this.getId('previewData_tbody')}
]}
]}
]}
]});
for (i=0; i<c; i++) {
if (this.mainComponent().isColumnSelected(i)) {
this.getElement('headerTextField_' + i).dom.value = this.mainComponent().labelForColumn(i);
}
}
this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
if (this.mainComponent().isFirstRowHeader()) {
this.getDom('isFirstRowHeader_checkbox').click();
}
c = this.mainComponent().parsedValues()[0].length;
for (i=0; i<c; i++) {
if (this.mainComponent().isColumnSelected(i)) {
MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onchange', MochiKit.Base.partial(MochiKit.Base.method(this, 'labelFieldHandler'), i));
MochiKit.Signal.connect(this.getDom('headerTextField_' + i), 'onkeypress', MochiKit.Base.partial(MochiKit.Base.method(this, 'deferredLabelFieldHandler'), i));
}
}
MochiKit.Signal.connect(this.getDom('isFirstRowHeader_checkbox'), 'onclick', this, 'toggleFirstRowHeaderCheckboxHandler');
if (Clipperz_IEisBroken != true) {
MochiKit.Signal.connect(this.getDom('isFirstRowHeader_span'), 'onclick', this.getDom('isFirstRowHeader_checkbox'), 'click');
}
//MochiKit.Logging.logDebug("<<< CSVImportHeader.render");
},
//-------------------------------------------------------------------------
'renderData': function(anElement, someData) {
var trConfigs;
var data;
var i,c;
// anElement.update("");
MochiKit.DOM.replaceChildNodes(anElement.dom);
if (this.mainComponent().isFirstRowHeader()) {
data = someData.slice(1);
} else {
data = someData;
}
trConfigs = MochiKit.Base.map(MochiKit.Base.bind(function(aRowData) {
var result;
var i,c;
result = {tag:'tr', children:[]};
c = aRowData.length;
for (i=0; i<c; i++) {
if (this.mainComponent().isColumnSelected(i)) {
result.children.push({tag:'td', valign:'top', html:(MochiKit.Base.isNotEmpty(aRowData[i]) ? aRowData[i].replace(/\n/g, '<br>') : '&nbsp;')});
}
}
return result;
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js
index 6344e06..ccfdeca 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportNotes.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
//#############################################################################
Clipperz.PM.Components.Import.CSVImport.CSVImportNotes = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Import.CSVImport.CSVImportNotes.superclass.constructor.call(this, anElement, args);
this._mainComponent = args.mainComponent;
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportNotes, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.CSVImport.CSVImportNotes component";
},
//-------------------------------------------------------------------------
'mainComponent': function() {
return this._mainComponent;
},
//-------------------------------------------------------------------------
'render': function() {
var notesSelectorCheckboxCells;
var totalNumberOfColumns;
var titleColumnIndex;
var notesColumnIndex;
var i,c;
Clipperz.NotificationCenter.unregister(this);
MochiKit.Signal.disconnectAllTo(this);
this.element().update("");
titleColumnIndex = this.mainComponent().titleColumnIndex()
notesColumnIndex = this.mainComponent().notesColumnIndex()
totalNumberOfColumns = this.mainComponent().parsedValues()[0].length;
notesSelectorCheckboxCells = [{tag:'th', cls:'title', html:this.mainComponent().labelForColumn(titleColumnIndex)}];
c = totalNumberOfColumns;
for (i=0; i<c; i++) {
if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
notesSelectorCheckboxCells.push({tag:'th', id:this.getId('th_' + i), valign:'top', children:[
{tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportNotesColumn', value:i},
{tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)}
]})
}
}
this.domHelper().append(this.element(), {tag:'div', children:[
{tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes']},
{tag:'div', id:this.getId('dataDiv'), children:[
{tag:'div', cls:'importStepParameters', children:[
{tag:'input', id:this.getId('doNotSetNotes_radio'), type:'radio', name:'CSVImportNotesColumn', value:-1},
{tag:'span', id:this.getId('doNotSetNotes_span'), cls:'clickableSpan', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Notes_Settings_noSelectionLabel']}
]},
{tag:'div', cls:'csvImportPreview', children:[
{tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[
{tag:'thead', id:this.getId('previewData_thead'), children:[
{tag:'tr', children:notesSelectorCheckboxCells}
]},
{tag:'tbody', id:this.getId('previewData_tbody'), children:[]}
]}
]}
]}
]});
this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
if ((notesColumnIndex >= totalNumberOfColumns) || (notesColumnIndex == titleColumnIndex) || !(this.mainComponent().isColumnSelected(notesColumnIndex))) {
this.mainComponent().setNotesColumnIndex(-1);
notesColumnIndex = -1;
}
c = totalNumberOfColumns;
for (i=0; i<c; i++) {
if ((i != titleColumnIndex) && (this.mainComponent().isColumnSelected(i))) {
MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler');
if (Clipperz_IEisBroken != true) {
MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click');
}
}
}
MochiKit.Signal.connect(this.getDom('doNotSetNotes_radio'), 'onclick', this, 'renderDataHandler');
if (Clipperz_IEisBroken != true) {
MochiKit.Signal.connect(this.getDom('doNotSetNotes_span'), 'onclick', this.getDom('doNotSetNotes_radio'), 'click');
}
if (notesColumnIndex == -1) {
this.getDom('doNotSetNotes_radio').click();
} else {
this.getDom('radio_' + notesColumnIndex).click();
}
},
//-------------------------------------------------------------------------
'renderData': function(anElement, someData) {
var data;
var config;
var titleColumnIndex;
var notesColumnIndex;
var i,c;
// anElement.update("");
MochiKit.DOM.replaceChildNodes(anElement.dom);
titleColumnIndex = this.mainComponent().titleColumnIndex();
notesColumnIndex = this.mainComponent().notesColumnIndex();
if (this.mainComponent().isFirstRowHeader()) {
data = someData.slice(1);
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js
index aa57580..4b2149a 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImport/CSVImportTitle.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
if (typeof(Clipperz.PM.Components.Import.CSVImport) == 'undefined') { Clipperz.PM.Components.Import.CSVImport = {}; }
//#############################################################################
Clipperz.PM.Components.Import.CSVImport.CSVImportTitle = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Import.CSVImport.CSVImportTitle.superclass.constructor.call(this, anElement, args);
this._mainComponent = args.mainComponent;
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.CSVImport.CSVImportTitle, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.CSVImport.CSVImportTitle component";
},
//-------------------------------------------------------------------------
'mainComponent': function() {
return this._mainComponent;
},
//-------------------------------------------------------------------------
'render': function() {
var titleSelectorCheckboxCells;
var titleColumnIndex;
var i,c;
Clipperz.NotificationCenter.unregister(this);
MochiKit.Signal.disconnectAllTo(this);
this.element().update("");
titleColumnIndex = this.mainComponent().titleColumnIndex()
titleSelectorCheckboxCells = [];
c = this.mainComponent().parsedValues()[0].length;
for (i=0; i<c; i++) {
if (this.mainComponent().isColumnSelected(i)) {
titleSelectorCheckboxCells.push({tag:'th', valign:'top', id:this.getId('th_' + i), children:[
{tag:'input', type:'radio', id:this.getId('radio_' + i), name:'CSVImportTitleColumn', value:i},
{tag:'span', cls:'clickableSpan', id:this.getId('columnLabel_' + i), html:this.mainComponent().labelForColumn(i)}
]})
}
}
if (titleColumnIndex >= titleSelectorCheckboxCells.length) {
this.mainComponent().setTitleColumnIndex(-1);
}
this.domHelper().append(this.element(), {tag:'div', children:[
{tag:'div', cls:'importStepDescription', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']},
{tag:'div', id:this.getId('dataDiv'), cls:'csvImportPreview', children:[
{tag:'table', id:this.getId('previewDada'), cls:'csvImportPreview', cellspacing:'0', children:[
{tag:'thead', id:this.getId('previewData_thead'), children:[
{tag:'tr', children:titleSelectorCheckboxCells}
]},
{tag:'tbody', id:this.getId('previewData_tbody'), children:[]}
]}
]}
]});
this.renderData(this.getElement('previewData_tbody'), this.mainComponent().parsedValues());
c = this.mainComponent().parsedValues()[0].length;
for (i=0; i<c; i++) {
if (this.mainComponent().isColumnSelected(i)) {
MochiKit.Signal.connect(this.getDom('radio_' + i), 'onclick', this, 'renderDataHandler');
if (Clipperz_IEisBroken != true) {
MochiKit.Signal.connect(this.getDom('columnLabel_' + i), 'onclick', this.getDom('radio_' + i), 'click');
}
}
}
if (titleColumnIndex != -1) {
this.getDom('radio_' + titleColumnIndex).click();
} else {
this.mainComponent().nextButton().disable();
}
},
//-------------------------------------------------------------------------
'renderData': function(anElement, someData) {
var data;
var config;
var titleColumnIndex;
var i,c;
// anElement.update("");
MochiKit.DOM.replaceChildNodes(anElement.dom);
titleColumnIndex = this.mainComponent().titleColumnIndex()
if (this.mainComponent().isFirstRowHeader()) {
data = someData.slice(1);
} else {
data = someData;
}
config = MochiKit.Base.map(MochiKit.Base.bind(function(aRowData) {
var result;
var i,c;
result = {tag:'tr', children:[]};
c = aRowData.length;
for (i=0; i<c; i++) {
if (this.mainComponent().isColumnSelected(i)) {
var field;
field = aRowData[i];
result.children.push({tag:'td', valign:'top', cls:((titleColumnIndex == i) ? 'titleColumn': ''), html:(MochiKit.Base.isNotEmpty(field) ? field.replace(/\n/g, '<br>') : '&nbsp;')});
}
}
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js
index c1dd1a9..bd305c3 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/CSVImportComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
//#############################################################################
Clipperz.PM.Components.Import.CSVImportComponent = function(anElement, args) {
args = args || {};
this._steps = this._steps || ['CSV_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT'];
Clipperz.PM.Components.Import.CSVImportComponent.superclass.constructor.call(this, anElement, args);
this._step1Component = null;
this._step2Component = null;
this._step3Component = null;
this._step4Component = null;
this._step5Component = null;
this._isFirstRowHeader = false;
this._titleColumnIndex = -1;
this._notesColumnIndex = -1;
this._fieldSettings = {};
this._skippedColumns = new Clipperz.Set();
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.CSVImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.CSVImportComponent component";
},
//-------------------------------------------------------------------------
'render': function() {
this.domHelper().append(this.element(), {tag:'div', cls:'csvImportWizard', children:[
{tag:'h3', htmlString:Clipperz.PM.Strings['CSV_ImportWizard_Title']},
{tag:'div', cls:'importSteps', id:this.getId('importSteps')},
{tag:'div', cls:'importStepBlocks', children:[
{tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
{tag:'div', children:[
{tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_csv_description']},
{tag:'div', cls:'importOptionsParameters', children:[
{tag:'div', cls:'CSVImportOptionsParameters', children:[
{tag:'ul', children:[
{tag:'li', children:[
{tag:'label', 'for':this.getId('CSV_inputOptions_separator'), html:"separator"},
{tag:'select', name:this.getId('CSV_inputOptions_separator'), id:this.getId('CSV_inputOptions_separator'), children:[
{tag:'option', name:'comma', value:',', html:"comma (,)", selected:true},
{tag:'option', name:'tab', value:'\t', html:"tab"}
]}
]},
{tag:'li', children:[
{tag:'label', 'for':this.getId('CSV_inputOptions_quote'), html:"quote"},
{tag:'select', name:this.getId('CSV_inputOptions_quote'), id:this.getId('CSV_inputOptions_quote'), children:[
{tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true},
{tag:'option', name:'singleQuote', value:'\'', html:"single quote (\')"}
]}
]},
{tag:'li', children:[
{tag:'label', 'for':this.getId('CSV_inputOptions_escape'), html:"escape"},
{tag:'select', name:this.getId('CSV_inputOptions_escape'), id:this.getId('CSV_inputOptions_escape'), children:[
{tag:'option', name:'doubleQuote', value:'\"', html:"double quote (\")", selected:true},
{tag:'option', name:'slash', value:'\/', html:"slash (\/)"},
{tag:'option', name:'backslash', value:'\\', html:"backslash (\\)"}
]}
]}
]}
]}
]},
this.textAreaConfig()
]}
]},
{tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]},
{tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]},
{tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]},
{tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]},
{tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]},
{tag:'div', cls:'step_6', id:this.getId('step_6'), children:[
{tag:'div', children:[
{tag:'div', id:this.getId('previewDiv'), html:"preview"}
]}
]},
{tag:'div', cls:'step_7', id:this.getId('step_7'), children:[
{tag:'div', children:[
{tag:'h4', html:"done"}
]}
]}
]},
{tag:'div', cls:'importOptionsButtons', children:[
{tag:'table', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', html:'&nbsp;'},
{tag:'td', children:[
{tag:'div', id:this.getId('backActionButton')}
]},
{tag:'td', html:'&nbsp;'},
{tag:'td', children:[
{tag:'div', id:this.getId('nextActionButton')}
]},
{tag:'td', html:'&nbsp;'}
]}
]}
]}
]}
]});
this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
this.updateSteps();
this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js
index c3d2fac..d74961b 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/ClipperzImportComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
//#############################################################################
Clipperz.PM.Components.Import.ClipperzImportComponent = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Import.ClipperzImportComponent.superclass.constructor.call(this, anElement, args);
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.ClipperzImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.ClipperzImportComponent component";
},
//-------------------------------------------------------------------------
'render': function() {
//MochiKit.Logging.logDebug(">>> Import.ClipperzImportComponent.render");
this.domHelper().append(this.element(), {tag:'div', cls:'clipperzImportWizard', children:[
{tag:'h3', htmlString:Clipperz.PM.Strings['Clipperz_ImportWizard_Title']},
{tag:'div', cls:'importSteps', id:this.getId('importSteps')},
{tag:'div', cls:'importStepBlocks', children:[
{tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
{tag:'div', children:[
{tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_clipperz_description']},
{tag:'div', cls:'importOptionsParameters', children:[]},
this.textAreaConfig()
]}
]},
{tag:'div', cls:'step_1', id:this.getId('step_1'), children:[
{tag:'div', children:[
{tag:'div', id:this.getId('previewDiv'), html:"preview"}
]}
]},
{tag:'div', cls:'step_2', id:this.getId('step_2'), children:[
{tag:'div', children:[
{tag:'h4', html:"done"}
]}
]}
]},
{tag:'div', cls:'importOptionsButtons', children:[
{tag:'table', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', html:'&nbsp;'},
{tag:'td', children:[
{tag:'div', id:this.getId('backActionButton')}
]},
{tag:'td', html:'&nbsp;'},
{tag:'td', children:[
{tag:'div', id:this.getId('nextActionButton')}
]},
{tag:'td', html:'&nbsp;'}
]}
]}
]}
]}
]});
this.updateSteps();
this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
//MochiKit.Logging.logDebug("<<< Import.ClipperzImportComponent.render");
},
//-------------------------------------------------------------------------
'nextAction': function() {
switch (this.currentStep()) {
case 0: // -> 1
this.previewValues();
break;
case 1: // -> 2
this.importValues();
break;
}
},
//-------------------------------------------------------------------------
'deferredPreviewValues': function() {
var deferredResult;
deferredResult = new MochiKit.Async.Deferred();
deferredResult.addCallback(MochiKit.Base.bind(function(res) {
this.startProcessing();
return res;
}, this));
deferredResult.addCallback(MochiKit.Base.method(this, 'processClipperzValues'));
deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues'));
deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues'));
deferredResult.addCallback(MochiKit.Base.bind(function(res) {
this.processingDone();
this.getElement('step_0').hide();
this.getElement('step_1').show();
this.backButton().enable();
return res;
}, this));
// deferredResult.addErrback(MochiKit.Base.bind(function() {
// this.processingAborted();
// }, this))
deferredResult.callback(this.textAreaContent());
return deferredResult;
},
//-------------------------------------------------------------------------
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js
index ad0d985..859c190 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/ExcelImportComponent.js
@@ -1,131 +1,129 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
//#############################################################################
Clipperz.PM.Components.Import.ExcelImportComponent = function(anElement, args) {
args = args || {};
this._steps = ['EXCEL_EDIT', 'CSV_COLUMNS', 'CSV_HEADER', 'CSV_TITLE', 'CSV_NOTES', 'CSV_FIELDS', 'PREVIEW', 'IMPORT'];
Clipperz.PM.Components.Import.ExcelImportComponent.superclass.constructor.call(this, anElement, args);
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.ExcelImportComponent, Clipperz.PM.Components.Import.CSVImportComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.ExcelImportComponent component";
},
//-------------------------------------------------------------------------
'render': function() {
//MochiKit.Logging.logDebug(">>> Import.ExcelImportComponent.render");
this.domHelper().append(this.element(), {tag:'div', cls:'excelImportWizard', children:[
{tag:'h3', htmlString:Clipperz.PM.Strings['Excel_ImportWizard_Title']},
{tag:'div', cls:'importSteps', id:this.getId('importSteps')},
{tag:'div', cls:'importStepBlocks', children:[
{tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
{tag:'div', children:[
{tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_excel_description']},
{tag:'div', cls:'importOptionsParameters', children:[]},
this.textAreaConfig()
]}
]},
{tag:'div', cls:'step_1', id:this.getId('step_1'), children:[]},
{tag:'div', cls:'step_2', id:this.getId('step_2'), children:[]},
{tag:'div', cls:'step_3', id:this.getId('step_3'), children:[]},
{tag:'div', cls:'step_4', id:this.getId('step_4'), children:[]},
{tag:'div', cls:'step_5', id:this.getId('step_5'), children:[]},
{tag:'div', cls:'step_6', id:this.getId('step_6'), children:[
{tag:'div', children:[
{tag:'div', id:this.getId('previewDiv'), html:"preview"}
]}
]},
{tag:'div', cls:'step_7', id:this.getId('step_7'), children:[
{tag:'div', children:[
{tag:'h4', html:"done"}
]}
]}
]},
{tag:'div', cls:'importOptionsButtons', children:[
{tag:'table', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', html:'&nbsp;'},
{tag:'td', children:[
{tag:'div', id:this.getId('backActionButton')}
]},
{tag:'td', html:'&nbsp;'},
{tag:'td', children:[
{tag:'div', id:this.getId('nextActionButton')}
]},
{tag:'td', html:'&nbsp;'}
]}
]}
]}
]}
]});
this.updateSteps();
this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
this.getElement('step_3').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
this.getElement('step_4').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
this.getElement('step_5').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
this.getElement('step_6').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
this.getElement('step_7').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
//MochiKit.Logging.logDebug("<<< Import.ExcelImportComponent.render");
},
//-------------------------------------------------------------------------
'csvProcessor': function() {
return new Clipperz.CSVProcessor({
// quoteChar: this.getDom('CSV_inputOptions_quote').value,
// escapeChar: this.getDom('CSV_inputOptions_escape').value,
separatorChar: '\t',
binary:true
});
},
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js
index a55455a..3c23b1c 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/GenericImportComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
//#############################################################################
Clipperz.PM.Components.Import.GenericImportComponent = function(anElement, args) {
args = args || {};
this._steps = this._steps || ['EDIT', 'PREVIEW', 'IMPORT'];
Clipperz.PM.Components.Import.GenericImportComponent.superclass.constructor.call(this, anElement, args);
this._user = args['user'];
this._currentStep = 0;
this._currentStatus = 'IDLE'; // 'PROCESSING'
this._parsedValues = null;
this._processedValues = null;
this._backButton = null;
this._nextButton = null;
Clipperz.NotificationCenter.register(null, 'importProcessorProgressUpdate', this, 'updateProgressDialogStatus');
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.GenericImportComponent, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.GenericImportComponent component";
},
//-------------------------------------------------------------------------
'user': function() {
return this._user;
},
//-------------------------------------------------------------------------
'textAreaConfig': function() {
return {tag:'textarea', name:this.getId('importTextArea'), cls:'importTextArea', id:this.getId('importTextArea'), cols:60, rows:15, html:""};
},
'textAreaContent': function() {
return this.getDom('importTextArea').value
},
//-------------------------------------------------------------------------
'steps': function() {
return this._steps;
},
'currentStep': function() {
return this._currentStep;
},
'setCurrentStep': function(aValue) {
this._currentStep = aValue;
this.updateSteps();
},
//-------------------------------------------------------------------------
'currentStatus': function() {
return this._currentStatus;
},
'startProcessing': function() {
this._currentStatus = 'PROCESSING';
this.updateSteps();
},
'processingDone': function() {
this._currentStatus = 'IDLE';
this.setCurrentStep(this.currentStep() + 1);
},
'processingAborted': function() {
this._currentStatus = 'IDLE';
this.updateSteps();
},
//-------------------------------------------------------------------------
'stepsConfig': function() {
var result;
var i,c;
result = [];
c = this.steps().length;
for (i=0; i<c; i++) {
var cls;
if (this.currentStep() == i) {
if (this.currentStatus() == 'IDLE') {
cls = 'current';
} else {
cls = 'currentProcessing';
}
} else {
cls = "";
}
result.push({tag:'td', cls:cls, children:[
{tag:'div', children:[{tag:'span', htmlString:Clipperz.PM.Strings['ImportWizard'][this.steps()[i]]}]}
]})
if (i < (c-1)) {
if ((this.currentStep() == i) && (this.currentStatus() == 'PROCESSING')) {
cls = 'stepSeparatorProcessing';
} else {
cls = 'stepSeparator';
}
result.push({tag:'td', cls:cls, children:[
{tag:'div', children:[{tag:'span', html:">"}]}
]});
}
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js
index 5f4fe33..0570704 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/KeePassImportComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
//#############################################################################
Clipperz.PM.Components.Import.KeePassImportComponent = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Import.KeePassImportComponent.superclass.constructor.call(this, anElement, args);
this._steps = ['EDIT', 'KEEPASS_SETTINGS', 'PREVIEW', 'IMPORT'];
this._definedFields = ['Group', 'Group Tree', 'UserName', 'URL', 'Password', 'Notes', 'UUID', 'Icon', 'Creation Time', 'Last Access', 'Last Modification', 'Expires', 'Attachment Description', 'Attachment'];
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.KeePassImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.KeePassImportComponent component";
},
//-------------------------------------------------------------------------
'render': function() {
//MochiKit.Logging.logDebug(">>> Import.KeePassImportComponent.render");
this.domHelper().append(this.element(), {tag:'div', cls:'keePassImportWizard', children:[
{tag:'h3', htmlString:Clipperz.PM.Strings['KeePass_ImportWizard_Title']},
{tag:'div', cls:'importSteps', id:this.getId('importSteps')},
{tag:'div', cls:'importStepBlocks', children:[
{tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
{tag:'div', children:[
{tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_keePass_description']},
{tag:'div', cls:'importOptionsParameters', children:[]},
this.textAreaConfig()
]}
]},
{tag:'div', cls:'step_1', id:this.getId('step_1'), children:[
{tag:'div', children:[
{tag:'div', id:this.getId('settingsDiv'), children:[
{tag:'table', id:'KeePassSettings', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', width:'50%', valign:'top', children:[
{tag:'table', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group_checkbox'), name:'Group'/*, checked:true*/}]},
{tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group_label'), html:"Group"}]}
]},
{tag:'tr', children:[
{tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Group Tree_checkbox'), name:'Group Tree'/*, checked:true*/}]},
{tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Group Tree_label'), html:"Group Tree"}]}
]},
{tag:'tr', children:[
{tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UserName_checkbox'), name:'UserName', checked:true}]},
{tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UserName_label'), html:"UserName"}]}
]},
{tag:'tr', children:[
{tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('URL_checkbox'), name:'URL', checked:true}]},
{tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('URL_label'), html:"URL"}]}
]},
{tag:'tr', children:[
{tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Password_checkbox'), name:'Password', checked:true}]},
{tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Password_label'), html:"Password"}]}
]},
{tag:'tr', children:[
{tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Notes_checkbox'), name:'Notes', checked:true}]},
{tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Notes_label'), html:"Notes"}]}
]},
{tag:'tr', children:[
{tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('UUID_checkbox'), name:'UUID'/*, checked:true*/}]},
{tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('UUID_label'), html:"UUID"}]}
]}
]}
]}
]},
{tag:'td', width:'50%', valign:'top', children:[
{tag:'table', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Icon_checkbox'), name:'Icon'/*, checked:true*/}]},
{tag:'td', width:'150', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Icon_label'), html:"Icon"}]}
]},
{tag:'tr', children:[
{tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Creation Time_checkbox'), name:'Creation Time'/*, checked:true*/}]},
{tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Creation Time_label'), html:"Creation Time"}]}
]},
{tag:'tr', children:[
{tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Last Access_checkbox'), name:'Last Access'/*, checked:true*/}]},
{tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Last Access_label'), html:"Last Access"}]}
]},
{tag:'tr', children:[
{tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Last Modification_checkbox'), name:'Last Modification'/*, checked:true*/}]},
{tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Last Modification_label'), html:"Last Modification"}]}
]},
{tag:'tr', children:[
{tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Expires_checkbox'), name:'Expires'/*, checked:true*/}]},
{tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Expires_label'), html:"Expires"}]}
]},
{tag:'tr', children:[
{tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Attachment Description_checkbox'), name:'Attachment Description', checked:true}]},
{tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Attachment Description_label'), html:"Attachment Description"}]}
]},
{tag:'tr', children:[
{tag:'td', valign:'top', children:[{tag:'input', type:'checkbox', id:this.getId('Attachment_checkbox'), name:'Attachment', checked:true}]},
{tag:'td', valign:'top', children:[{tag:'span', cls:'keePassFieldLabel', id:this.getId('Attachment_label'), html:"Attachment"}]}
]}
]}
]}
]}
]}
]}
]}
]}
]}
]},
{tag:'div', cls:'step_2', id:this.getId('step_2'), children:[
{tag:'div', children:[
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js
index 05baf46..f97ce78 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/MainComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
//#############################################################################
Clipperz.PM.Components.Import.MainComponent = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Import.MainComponent.superclass.constructor.call(this, anElement, args);
this._user = args.user;
this._wizardComponent = null;
this._backButton = null;
this._nextButton = null;
this._selectedComponent = null;
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.MainComponent, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.MainComponent component";
},
//-------------------------------------------------------------------------
'user': function() {
return this._user;
},
//-------------------------------------------------------------------------
'wizardComponent': function() {
return this._wizardComponent;
},
'setWizardComponent': function(aValue) {
if (this._wizardComponent != null) {
this._wizardComponent.remove();
}
if (aValue != null) {
this.getElement('importCover').hide();
this.getElement('importWizard').show();
}
this._wizardComponent = aValue;
},
'resetImportComponent': function() {
//MochiKit.Logging.logDebug(">>> resetImportComponent");
this.setWizardComponent(null);
this.getElement('wizardComponent').update("");
this.getElement('importCover').show();
this.getElement('importWizard').hide();
//MochiKit.Logging.logDebug("<<< resetImportComponent");
},
//-------------------------------------------------------------------------
'backButton': function() {
return this._backButton;
},
'setBackButton': function(aValue) {
this._backButton = aValue;
},
'nextButton': function() {
return this._nextButton;
},
'setNextButton': function(aValue) {
this._nextButton = aValue;
},
//-------------------------------------------------------------------------
'render': function() {
//MochiKit.Logging.logDebug(">>> Import.MainComponent.render");
Clipperz.NotificationCenter.unregister(this);
MochiKit.Signal.disconnectAllTo(this);
this.element().update("");
this.domHelper().append(this.element(), {tag:'div', id:this.getId('mainDiv'), children:[
{tag:'div', id:this.getId('importCover'), children:[
{tag:'h5', htmlString:Clipperz.PM.Strings['importTabTitle']},
{tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['importTabDescription']},
{tag:'div', cls:'importFormats', children:[
{tag:'ul', cls:'radioList', children:[
{tag:'li', children:[
{tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[
{tag:'td', valign:'top', children:[
{tag:'input', id:this.getId('CSV_radio'), type:'radio', name:'importFormat', value:'CSV'}
]},
{tag:'td', valign:'top', children:[
{tag:'h4', id:this.getId('CSV_title'), htmlString:Clipperz.PM.Strings['importFormats']['CSV']['label']},
{tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['CSV']['description']}
]}
]}]}]}
]},
{tag:'li', children:[
{tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[
{tag:'td', valign:'top', children:[
{tag:'input', id:this.getId('Excel_radio'), type:'radio', name:'importFormat', value:'EXCEL'}
]},
{tag:'td', valign:'top', children:[
{tag:'h4', id:this.getId('Excel_title'), htmlString:Clipperz.PM.Strings['importFormats']['Excel']['label']},
{tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['importFormats']['Excel']['description']}
]}
]}]}]}
]},
{tag:'li', children:[
{tag:'table', children:[{tag:'tbody', children:[{tag:'tr', children:[
{tag:'td', valign:'top', children:[
{tag:'input', id:this.getId('KeePass_radio'), type:'radio', name:'importFormat', value:'KEEPASS'}
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js
index 24dc785..f58d913 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/PasswordPlusImportComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
//#############################################################################
Clipperz.PM.Components.Import.PasswordPlusImportComponent = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Import.PasswordPlusImportComponent.superclass.constructor.call(this, anElement, args);
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.PasswordPlusImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.PasswordPlusImportComponent component";
},
//-------------------------------------------------------------------------
'render': function() {
//MochiKit.Logging.logDebug(">>> Import.PasswordPlusImportComponent.render");
this.domHelper().append(this.element(), {tag:'div', cls:'passwordPlusImportWizard', children:[
{tag:'h3', htmlString:Clipperz.PM.Strings['PasswordPlus_ImportWizard_Title']},
{tag:'div', cls:'importSteps', id:this.getId('importSteps')},
{tag:'div', cls:'importStepBlocks', children:[
{tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
{tag:'div', children:[
{tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_passwordPlus_description']},
{tag:'div', cls:'importOptionsParameters', children:[]},
this.textAreaConfig()
]}
]},
{tag:'div', cls:'step_1', id:this.getId('step_1'), children:[
{tag:'div', children:[
{tag:'div', id:this.getId('previewDiv'), html:"preview"}
]}
]},
{tag:'div', cls:'step_2', id:this.getId('step_2'), children:[
{tag:'div', children:[
{tag:'h4', html:"done"}
]}
]}
]},
{tag:'div', cls:'importOptionsButtons', children:[
{tag:'table', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', html:'&nbsp;'},
{tag:'td', children:[
{tag:'div', id:this.getId('backActionButton')}
]},
{tag:'td', html:'&nbsp;'},
{tag:'td', children:[
{tag:'div', id:this.getId('nextActionButton')}
]},
{tag:'td', html:'&nbsp;'}
]}
]}
]}
]}
]});
this.updateSteps();
this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
//MochiKit.Logging.logDebug("<<< Import.PasswordPlusImportComponent.render");
},
//-------------------------------------------------------------------------
/*
'backAction': function() {
switch (this.currentStep()) {
case 1: // -> 0
this.backButton().disable();
this.getElement('step_1').hide();
this.setCurrentStep(0);
this.getElement('step_0').show();
break;
}
},
*/
//-------------------------------------------------------------------------
'nextAction': function() {
switch (this.currentStep()) {
case 0: // -> 1
this.previewValues();
break;
case 1: // -> 2
this.importValues();
break;
}
},
//-------------------------------------------------------------------------
'deferredPreviewValues': function() {
var deferredResult;
// this.setFormValues(MochiKit.DOM.formContents(this.getDom('dataForm')));
deferredResult = new MochiKit.Async.Deferred();
deferredResult.addCallback(MochiKit.Base.bind(function(res) {
this.startProcessing();
return res;
}, this));
deferredResult.addCallback(MochiKit.Base.method(this, 'processPasswordPlusValues'));
deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues'));
deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues'));
deferredResult.addCallback(MochiKit.Base.bind(function(res) {
this.processingDone();
diff --git a/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js b/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js
index fe4d45c..443ee17 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Import/RoboFormImportComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Import) == 'undefined') { Clipperz.PM.Components.Import = {}; }
//#############################################################################
Clipperz.PM.Components.Import.RoboFormImportComponent = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Import.RoboFormImportComponent.superclass.constructor.call(this, anElement, args);
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Import.RoboFormImportComponent, Clipperz.PM.Components.Import.GenericImportComponent, {
'toString': function() {
return "Clipperz.PM.Components.Import.RoboFormImportComponent component";
},
//-------------------------------------------------------------------------
'render': function() {
//MochiKit.Logging.logDebug(">>> Import.RoboFormImportComponent.render");
this.domHelper().append(this.element(), {tag:'div', cls:'roboFormImportWizard', children:[
{tag:'h3', htmlString:Clipperz.PM.Strings['RoboForm_ImportWizard_Title']},
{tag:'div', cls:'importSteps', id:this.getId('importSteps')},
{tag:'div', cls:'importStepBlocks', children:[
{tag:'div', cls:'step_0', id:this.getId('step_0'), children:[
{tag:'div', children:[
{tag:'div', cls:'importOptionsDescription', htmlString:Clipperz.PM.Strings['importOptions_roboForm_description']},
{tag:'div', cls:'importOptionsParameters', children:[]},
this.textAreaConfig()
]}
]},
{tag:'div', cls:'step_1', id:this.getId('step_1'), children:[
{tag:'div', children:[
{tag:'div', id:this.getId('previewDiv'), html:"preview"}
]}
]},
{tag:'div', cls:'step_2', id:this.getId('step_2'), children:[
{tag:'div', children:[
{tag:'h4', html:"done"}
]}
]}
]},
{tag:'div', cls:'importOptionsButtons', children:[
{tag:'table', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', html:'&nbsp;'},
{tag:'td', children:[
{tag:'div', id:this.getId('backActionButton')}
]},
{tag:'td', html:'&nbsp;'},
{tag:'td', children:[
{tag:'div', id:this.getId('nextActionButton')}
]},
{tag:'td', html:'&nbsp;'}
]}
]}
]}
]}
]});
this.updateSteps();
this.setBackButton(new YAHOO.ext.Button(this.getDom('backActionButton'), {text:"back", handler:this.backAction, scope:this}));
this.setNextButton(new YAHOO.ext.Button(this.getDom('nextActionButton'), {text:"next", handler:this.nextAction, scope:this}));
this.getElement('step_0').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show()
this.getElement('step_1').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
this.getElement('step_2').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
//MochiKit.Logging.logDebug("<<< Import.RoboFormImportComponent.render");
},
//-------------------------------------------------------------------------
'nextAction': function() {
switch (this.currentStep()) {
case 0: // -> 1
this.previewValues();
break;
case 1: // -> 2
this.importValues();
break;
}
},
//-------------------------------------------------------------------------
'deferredPreviewValues': function() {
var deferredResult;
// this.setFormValues(MochiKit.DOM.formContents(this.getDom('dataForm')));
deferredResult = new MochiKit.Async.Deferred();
deferredResult.addCallback(MochiKit.Base.bind(function(res) {
this.startProcessing();
return res;
}, this));
deferredResult.addCallback(MochiKit.Base.method(this, 'processRoboFormValues'));
deferredResult.addCallback(MochiKit.Base.method(this, 'setProcessedValues'));
deferredResult.addCallback(MochiKit.Base.method(this, 'previewRecordValues'));
deferredResult.addCallback(MochiKit.Base.bind(function(res) {
this.processingDone();
this.getElement('step_0').hide();
this.getElement('step_1').show();
this.backButton().enable();
return res;
}, this));
// deferredResult.addErrback(MochiKit.Base.bind(function() {
// this.processingAborted();
// }, this))
deferredResult.callback(this.textAreaContent());
return deferredResult;
},
diff --git a/frontend/beta/js/Clipperz/PM/Components/MessageBox.js b/frontend/beta/js/Clipperz/PM/Components/MessageBox.js
index cf9ec86..f9b845e 100644
--- a/frontend/beta/js/Clipperz/PM/Components/MessageBox.js
+++ b/frontend/beta/js/Clipperz/PM/Components/MessageBox.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
Clipperz.PM.Components.MessageBoxImplementation = function() {
this._step = 0;
this._steps = 0;
return this;
};
//YAHOO.extendX(Clipperz.PM.Components.MessageBoxImplementation, Clipperz.PM.Components.BaseComponent, {
Clipperz.PM.Components.MessageBoxImplementation.prototype = MochiKit.Base.update(null, {
'toString': function() {
return "Clipperz.PM.Components.MessageBox";
},
//-----------------------------------------------------
'step': function() {
return this._step;
},
'setStep': function(aValue) {
if (aValue == 'next') {
this._step = this._step + 1;
} else {
this._step = aValue;
}
if (this._step > this.steps()) {
//MochiKit.Logging.logDebug("overstepping: " + this._step + " (" + this.steps() + ")");
this._step = this.steps();
}
},
//-----------------------------------------------------
'steps': function() {
return this._steps;
},
'setSteps': function(aValue) {
if (aValue.constructor == String) {
if (aValue.charAt(0) == '+') {
this._steps += aValue.substring(1)*1;
} else if (aValue.charAt(0) == '-') {
this._steps -= aValue.substring(1)*1;
} else {
this._steps = aValue.substring(1)*1;
}
} else {
this._steps = aValue;
}
},
//-----------------------------------------------------
'deferredShow': function(aConfiguration, anAnimationTargetElement, aValue) {
this.show(aConfiguration, anAnimationTargetElement);
return aValue;
},
'show': function(aConfiguration, anAnimationTargetElement) {
var messageBoxConfiguration;
messageBoxConfiguration = MochiKit.Base.clone(aConfiguration);
messageBoxConfiguration.msg = messageBoxConfiguration.text;
messageBoxConfiguration.animEl = anAnimationTargetElement;
messageBoxConfiguration.progress = messageBoxConfiguration.showProgressBar;
messageBoxConfiguration.closable = messageBoxConfiguration.showCloseButton;
this.setSteps(aConfiguration.steps || 0);
this.setStep(aConfiguration.step || 0);
delete messageBoxConfiguration.buttons;
Clipperz.YUI.MessageBox.show(messageBoxConfiguration);
},
//-----------------------------------------------------
'update': function(someValues) {
//MochiKit.Logging.logDebug(">>> MessageBox.update");
if (someValues.title) {
Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title);
};
if (someValues.text) {
Clipperz.YUI.MessageBox.updateText(someValues.text);
};
if (typeof(someValues.showProgressBar) != 'undefined') {
Clipperz.YUI.MessageBox.progressElement().setDisplayed(someValues.showProgressBar);
Clipperz.YUI.MessageBox.updateProgress(0);
};
if (typeof(someValues.steps) != 'undefined') {
this.setSteps(someValues.steps);
};
if (typeof(someValues.step) != 'undefined') {
this.setStep(someValues.step);
} else {
this.setStep('next');
}
Clipperz.YUI.MessageBox.updateProgress(this.step() / this.steps());
if (typeof(someValues.fn) != 'undefined') {
Clipperz.YUI.MessageBox.opt().fn = someValues.fn;
};
if (typeof(someValues.scope) != 'undefined') {
Clipperz.YUI.MessageBox.opt().scope = someValues.scope;
};
if (someValues.buttons) {
Clipperz.YUI.MessageBox.updateButtons(someValues.buttons);
};
// if (someValues.title) {
// Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title + " [" + this.step() + " / " + this.steps() + "]");
diff --git a/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js
index 7b0b12b..1e94c4b 100644
--- a/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/OTP/MainComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.OTP) == 'undefined') { Clipperz.PM.Components.OTP = {}; }
//#############################################################################
Clipperz.PM.Components.OTP.MainComponent = function(anElement, args) {
args = args || {};
//MochiKit.Logging.logDebug("new OTP.MainComponent");
Clipperz.PM.Components.OTP.MainComponent.superclass.constructor.call(this, anElement, args);
this._user = args.user;
this._shouldRender = true;
this._deleteButton = null;
this._printButton = null;
Clipperz.NotificationCenter.register(null, 'tabSelected', this, 'tabSelectedHandler');
// Clipperz.NotificationCenter.register(null, 'oneTimePasswordAdded', this, 'render');
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.OTP.MainComponent, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.OTP.MainComponent component";
},
//-------------------------------------------------------------------------
'render': function() {
//MochiKit.Logging.logDebug("### OTP.MainComponent.render");
Clipperz.NotificationCenter.unregister(this);
MochiKit.Signal.disconnectAllTo(this);
if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
this.element().update("");
this.domHelper().append(this.element(), {tag:'div', cls:'oneTimePasswordReadOnlyMessage', htmlString:Clipperz.PM.Strings['oneTimePasswordReadOnlyMessage']});
} else {
var deferredResult;
deferredResult = new MochiKit.Async.Deferred();
//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 1: " + res); return res;});
deferredResult.addCallback(MochiKit.Base.bind(function() {
this.element().update("");
Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', htmlString:Clipperz.PM.Strings['oneTimePasswordLoadingMessage']});
}, this));
//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 2: " + res); return res;});
deferredResult.addCallback(MochiKit.Base.method(this.user(), 'loadOneTimePasswords'));
//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3: " + res); return res;});
//deferredResult.addBoth(function(res) {MochiKit.Logging.logDebug("OTP.MainComponent.render - 3.1: " + Clipperz.Base.serializeJSON(res.serializedData())); return res;});
deferredResult.addCallback(MochiKit.Base.bind(function(aResult) {
var tbodyElement;
var oneTimePasswordReferenceKeys;
var imageExtension;
var isThereAnyActiveOneTimePassword;
isThereAnyActiveOneTimePassword = false;
this.element().update("");
Clipperz.YUI.DomHelper.append(this.element(), {tag:'div', id:'oneTimePasswordList', children:[
{tag:'div', id:'oneTimePasswords_header', children:[
{tag:'table', width:'100%', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', width:'10%', children:[
{tag:'div', id:this.getId('createNewOneTimePasswordButton')}
]},
{tag:'td', width:'40%', children:[
{tag:'div', id:this.getId('deleteSelectedOneTimePasswordButton')}
]},
{tag:'td', width:'50%', align:'right', children:[
{tag:'div', id:this.getId('printOneTimePasswordButton')}
]}
]}
]}
]},
{tag:'div', children:[
{tag:'ul', children:[
{tag:'li', children:[
{tag:'span', htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_selectLabel']}
]},
{tag:'li', children:[
{tag:'a', href:'#', id:this.getId('selectAllOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_all']}
]},
{tag:'li', children:[
{tag:'a', href:'#', id:this.getId('selectNoneOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_none']}
]},
{tag:'li', children:[
{tag:'a', href:'#', id:this.getId('selectUsedOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_used']}
]},
{tag:'li', children:[
{tag:'a', href:'#', id:this.getId('selectUnusedOneTimePasswords_link'), htmlString:Clipperz.PM.Strings['oneTimePasswordSelectionLink_unused']}
]}
]}
]}
]},
{tag:'form', id:this.getId('oneTimePasswords_form'), children:[
{tag:'table', cls:'oneTimePassword', cellspacing:'0', cellpadding:'2', children:[
{tag:'tbody', id:this.getId('oneTimePasswords_tbody'), children:[
]}
]}
]}
]});
imageExtension = (Clipperz_IEisBroken == true) ? 'gif': 'png';
tbodyElement = this.getElement('oneTimePasswords_tbody');
oneTimePasswordReferenceKeys = MochiKit.Base.keys(this.user().oneTimePasswordManager().oneTimePasswords()).reverse();
c = oneTimePasswordReferenceKeys.length;
if (c>0) {
for (i=0; i<c; i++) {
var otpReference;
var currentOTP;
var loginSessionInfoConfig;
imageExtension = (Clipperz_IEisBroken == true) ? 'gif': 'png';
otpReference = oneTimePasswordReferenceKeys[i];
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js
index f7991f1..defce91 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/AccountPanel.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
//#############################################################################
Clipperz.PM.Components.Panels.AccountPanel = function(anElement, args) {
//MochiKit.Logging.logDebug(">>> new AccountPanel");
args = args || {};
Clipperz.PM.Components.Panels.AccountPanel.superclass.constructor.call(this, anElement, args);
Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render');
this._shouldLoadLoginHistory = true;
// this.render();
//MochiKit.Logging.logDebug("<<< new AccountPanel");
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Panels.AccountPanel, Clipperz.PM.Components.Panels.BasePanel, {
'toString': function() {
return "Clipperz.PM.Components.AccountPanel component";
},
//-------------------------------------------------------------------------
'render': function() {
var errorMessageActor;
var changePasswordButton;
var deleteAccountButton;
try {
//MochiKit.Logging.logDebug(">>> AccountPanel.render");
Clipperz.NotificationCenter.unregister(this);
MochiKit.Signal.disconnectAllTo(this);
this.element().update("");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', valign:'top', width:'200', children:[
{tag:'ul', id:"accountSubMenu", cls:'subMenu', children:[
{tag:'li', id:'changePassphraseTab', htmlString:Clipperz.PM.Strings['changePasswordTabLabel']},
{tag:'li', id:'manageOTPTab', htmlString:Clipperz.PM.Strings['manageOTPTabLabel']},
{tag:'li', id:'accountPreferencesTab', htmlString:Clipperz.PM.Strings['accountPreferencesLabel']},
{tag:'li', id:'loginHistoryTab', htmlString:Clipperz.PM.Strings['accountLoginHistoryLabel']},
{tag:'li', id:'deleteAccountTab', htmlString:Clipperz.PM.Strings['deleteAccountTabLabel']}
// {tag:'li', id:'paidAccountTab'), htmlString:Clipperz.PM.Strings['paidAccountTabLabel']}
]}
]},
{tag:'td', valign:'top', children:[
{tag:'ul', cls:'clipperzTabPanels', children:[
{tag:'li', id:this.getId('changePassphrasePanel'), children:[
{tag:'div', cls:'clipperzSubPanel', children:[
{tag:'h5', htmlString:Clipperz.PM.Strings['changePasswordTabTitle']},
{tag:'div', cls:'panelBody', id:'changePassphraseBlock', children:[
{tag:'form', id:this.getId('changePassphraseForm'), children:[
{tag:'h5', cls:'errorMessage', id:this.getId('changePassphrase_errorMessage')},
{tag:'table', cls:'panelBody', children:[
{tag:'tr', children:[
{tag:'td', children:[
{tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormUsernameLabel']}
]},
{tag:'td', children:[
{tag:'input', type:'text', name:'username', id:this.getId('changePassphrase_username')}
]}
]},
{tag:'tr', children:[
{tag:'td', children:[
{tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormOldPassphraseLabel']}
]},
{tag:'td', children:[
{tag:'input', type:'password', name:'oldPassphrase', id:this.getId('changePassphrase_oldPassphrase')}
]}
]},
{tag:'tr', children:[
{tag:'td', children:[
{tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormNewPassphraseLabel']}
]},
{tag:'td', children:[
{tag:'input', type:'password', name:'newPassphrase', id:this.getId('changePassphrase_newPassphrase')}
]}
]},
{tag:'tr', children:[
{tag:'td', children:[
{tag:'span', cls:'formLabel', htmlString:Clipperz.PM.Strings['changePasswordFormRetypePassphraseLabel']}
]},
{tag:'td', children:[
{tag:'input', type:'password', name:'renewPassphrase', id:this.getId('changePassphrase_renewPassphrase')}
]}
]},
{tag:'tr', children:[
{tag:'td', align:'right', children:[
{tag:'input', type:'checkbox', id:this.getId('changePassphrase_safetyCheck')}
]},
{tag:'td', children:[
{tag:'span', htmlString:Clipperz.PM.Strings['changePasswordFormSafetyCheckboxLabel']}
]}
]}
]},
{tag:'div', cls:'clipperzSubPanelButtonBox', children:[
{tag:'div', id:this.getId('changePassphraseButton')}
]}
]}
]}
]}
]},
{tag:'li', id:this.getId('manageOTPPanel'), children:[
{tag:'div', cls:'clipperzSubPanel', children:[
{tag:'h5', htmlString:Clipperz.PM.Strings['manageOTPTabTitle']},
{tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['manageOTPTabDescription']},
{tag:'div', id:'OTPComponent'}
]}
]},
{tag:'li', id:this.getId('accountPreferencesPanel'), children:[
{tag:'div', cls:'clipperzSubPanel', children:[
{tag:'h5', htmlString:Clipperz.PM.Strings['accountPreferencesTabTitle']},
{tag:'div', cls:'panelBody', id:this.getId('preferencesPanelBody')}
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js
index 15dd622..f36e8b0 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/BasePanel.js
@@ -1,93 +1,91 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
//var _Clipperz_PM_Components_Panels_base_id_ = 0;
//#############################################################################
Clipperz.PM.Components.Panels.BasePanel = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Panels.BasePanel.superclass.constructor.call(this, anElement, args);
this._user = args.user || null;
this._delegate = args.delegate || null;
this._tabPanelController = null;
// Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler');
// this._ids = {};
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Panels.BasePanel, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.Panels.BasePanel component";
},
//-------------------------------------------------------------------------
'user': function() {
return this._user;
},
'setUser': function(aValue) {
this._user = aValue;
},
//-------------------------------------------------------------------------
'delegate': function() {
return this._delegate;
},
'setDelegate': function(aValue) {
this._delegate = aValue;
},
//-------------------------------------------------------------------------
'tabPanelController': function() {
return this._tabPanelController;
},
'switchLanguageHandler': function() {
//MochiKit.Logging.logDebug(">>> BasePanel.switchLanguageHandler [" + this.toString() + "]");
this.render();
//MochiKit.Logging.logDebug("<<< BasePanel.switchLanguageHandler [" + this.toString() + "]");
},
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js
index 5a91d83..3feed3d 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/ContactsPanel.js
@@ -1,102 +1,100 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
//#############################################################################
Clipperz.PM.Components.Panels.ContactsPanel = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Panels.ContactsPanel.superclass.constructor.call(this, anElement, args);
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Panels.ContactsPanel, Clipperz.PM.Components.Panels.BasePanel, {
'toString': function() {
return "Clipperz.PM.Components.ContactsPanel component";
},
//-------------------------------------------------------------------------
'render': function() {
// var tabPanelControllerConfig;
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', valign:'top', width:'200', children:[
{tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[
{tag:'li', id:this.getId('contacts'), htmlString:Clipperz.PM.Strings['contactsTabLabel']},
]}
]},
{tag:'td', valign:'top', children:[
{tag:'ul', cls:'clipperzTabPanels', children:[
{tag:'li', id:this.getId('contactsPanel'), children:[
{tag:'div', cls:'clipperzSubPanel', children:[
{tag:'h5', htmlString:Clipperz.PM.Strings['contactsTabTitle']},
{tag:'div', htmlString:Clipperz.PM.Strings['comingSoon']}
]}
]}
]}
]}
]}
]}
]});
// tabPanelControllerConfig = {}
// tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel');
// new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') });
this.tabPanelController().setUp();
},
//-------------------------------------------------------------------------
'tabPanelController': function() {
if (this._tabPanelController == null) {
var tabPanelControllerConfig;
tabPanelControllerConfig = {}
tabPanelControllerConfig[this.getId('contacts')] = this.getId('contactsPanel');
this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({ config:tabPanelControllerConfig, selectedTab:this.getId('contacts') });
}
return this._tabPanelController;
},
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js
index 11d4bd7..520542c 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/DataPanel.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
//#############################################################################
Clipperz.PM.Components.Panels.DataPanel = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Panels.DataPanel.superclass.constructor.call(this, anElement, args);
this._progressWidth = 400;
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Panels.DataPanel, Clipperz.PM.Components.Panels.BasePanel, {
'toString': function() {
return "Clipperz.PM.Components.DataPanel component";
},
//-------------------------------------------------------------------------
'render': function() {
MochiKit.Signal.disconnectAllTo(this);
Clipperz.NotificationCenter.unregister(this);
this.element().update("");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', valign:'top', width:'200', children:[
{tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[
{tag:'li', id:'offlineCopyTab', htmlString:Clipperz.PM.Strings['offlineCopyTabLabel']},
{tag:'li', id:'sharingTab', htmlString:Clipperz.PM.Strings['sharingTabLabel']},
{tag:'li', id:'importTab', htmlString:Clipperz.PM.Strings['importTabLabel']},
{tag:'li', id:'printingTab', htmlString:Clipperz.PM.Strings['printingTabLabel']}
]}
]},
{tag:'td', valign:'top', children:[
{tag:'ul', cls:'clipperzTabPanels', children:[
{tag:'li', id:this.getId('offlineCopyPanel'), children:[
{tag:'div', cls:'clipperzSubPanel', children:[
{tag:'h5', htmlString:Clipperz.PM.Strings['offlineCopyTabTitle']},
{tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['offlineCopyTabDescription']},
{tag:'div', id:this.getId('offlineCopyLinkBox'), children:[
{tag:'a', id:'offlineCopyLink', href:'#', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']}
]},
{tag:'div', id:this.getId('offlineCopyLinkBox_read-only'), children:[
{tag:'span', cls:'read-only', htmlString:Clipperz.PM.Strings['offlineCopyDownloadLinkLabel']}
]}
]}
]},
{tag:'li', id:this.getId('sharingPanel'), children:[
{tag:'div', cls:'clipperzSubPanel', children:[
{tag:'h5', htmlString:Clipperz.PM.Strings['sharingTabTitle']},
{tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['sharingTabDescription']}
]}
]},
{tag:'li', id:this.getId('importPanel'), children:[
{tag:'div', cls:'clipperzSubPanel', children:[
{tag:'div', id:this.getId('importPanelMainComponent')}
]}
]},
{tag:'li', id:this.getId('printingPanel'), children:[
{tag:'div', cls:'clipperzSubPanel', children:[
{tag:'h5', htmlString:Clipperz.PM.Strings['printingTabTitle']},
{tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['printingTabDescription']},
{tag:'div', id:this.getId('printingLinkBox'), children:[
{tag:'a', id:'printingLink', href:'#', htmlString:Clipperz.PM.Strings['printingLinkLabel']}
]},
{tag:'hr'},
{tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['exportTabDescription']},
{tag:'div', id:this.getId('exportLinkBox'), children:[
{tag:'a', id:'exportLink', href:'#', htmlString:Clipperz.PM.Strings['exportLinkLabel']}
]}
]}
]}
]}
]}
]}
]}
]});
this.tabPanelController().setUp();
if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
this.getElement('offlineCopyLinkBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
} else {
this.getElement('offlineCopyLinkBox_read-only').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
MochiKit.Signal.connect('offlineCopyLink', 'onclick', this, 'downloadOfflineCopy');
}
new Clipperz.PM.Components.Import.MainComponent(this.getElement('importPanelMainComponent'), {user:this.user()});
MochiKit.Signal.connect('printingLink', 'onclick', this, 'printAllData');
MochiKit.Signal.connect('exportLink', 'onclick', this, 'exportAllData');
Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler');
},
//-------------------------------------------------------------------------
'tabPanelController': function() {
if (this._tabPanelController == null) {
var tabPanelControllerConfig;
tabPanelControllerConfig = {}
tabPanelControllerConfig['offlineCopyTab'] = this.getId('offlineCopyPanel');
tabPanelControllerConfig['sharingTab'] = this.getId('sharingPanel');
tabPanelControllerConfig['importTab'] = this.getId('importPanel');
tabPanelControllerConfig['printingTab'] = this.getId('printingPanel');
this._tabPanelController = new Clipperz.PM.Components.TabPanel.TabPanelController({
name: 'dataTabPanel',
config:tabPanelControllerConfig,
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js
index ef2b91c..3081a9d 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/LoginPanel.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
Clipperz.PM.Components.Panels.LoginPanel = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Panels.LoginPanel.superclass.constructor.call(this, anElement, args);
this._showLoginFormAnimator = null;
this._showRegistrationFormAnimator = null;
this._shouldShowRegistrationAlert = true;
this._visibleForm = null;
// this._isPassphraseVisible = true;
Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'switchLanguageHandler');
this.render();
return this;
}
//=============================================================================
//MochiKit.Base.update(Clipperz.PM.Components.Panels.LoginPanel.prototype, {
YAHOO.extendX(Clipperz.PM.Components.Panels.LoginPanel, Clipperz.PM.Components.Panels.BasePanel, {
'toString': function() {
return "Clipperz.PM.Components.LoginPanel component";
},
//-------------------------------------------------------------------------
'render': function() {
var result;
var layout;
var registerButton;
MochiKit.Signal.disconnectAllTo(this);
this.element().update("");
//MochiKit.Logging.logDebug(">>> LoginPanel.initPanel");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('baseDiv'), cls:'LoginPanel', children:[
{tag:'table', children:[
{tag:'thead'},
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', valign:'top', children:[
{tag:'div', cls:'clipperzServiceDescription', htmlString:Clipperz.PM.Strings['clipperzServiceDescription']}
]},
{tag:'td', valign:'top', align:'right', children:[
{tag:'div', id:this.getId('forms'), cls:'clipperzLoginForm', children:[
{tag:'div', id:this.getId('loginForm'), cls:'loginForm', children:[
{tag:'div', cls:'loginFormHeaderBox', children:[{tag:'h3', htmlString:Clipperz.PM.Strings['loginFormTitle']}]},
{tag:'form', id:this.getId('loginForm_form'), autocomplete:'off', children:[
{tag:'table', cls:'formLayout', children:[
{tag:'thead'},
{tag:'tbody', children:[
{tag:'tr', cls:'formFieldTR', children:[
{tag:'td', width:'90', htmlString:Clipperz.PM.Strings['loginFormUsernameLabel']},
{tag:'td', children:[
{tag:'input', id:this.getId('login_username'), cls:'loginFormField', type:'text', name:'username'}
]}
]},
{tag:'tr', cls:'formFieldTR', children:[
{tag:'td', htmlString:Clipperz.PM.Strings['loginFormPassphraseLabel']},
{tag:'td', children:[
{tag:'div', id:this.getId('passphraseDIV'), children:[
{tag:'input', id:this.getId('login_passphrase'), cls:'loginFormField', type:'password', name:'passphrase'}
]},
{tag:'div', cls:'oneTimePassword', id:this.getId('oneTimePasswordDIV'), children:[
{tag:'input', type:'text', id:this.getId('oneTimePassword_1'), name:'passphrase'},
{tag:'span', html:'-'},
{tag:'input', type:'text', id:this.getId('oneTimePassword_2'), name:'passphrase'},
{tag:'span', html:'-'},
{tag:'input', type:'text', id:this.getId('oneTimePassword_3'), name:'passphrase'},
{tag:'span', html:'-'},
{tag:'input', type:'text', id:this.getId('oneTimePassword_4'), name:'passphrase'}
]}
]}
]},
{tag:'tr', cls:'formFieldTR', id:this.getId('passwordTypeChooserTR'), children:[
{tag:'td', valign:'top', align:'right', children:[
{tag:'input', type:'checkbox', cls:'passwordTypeCheckbox', id:this.getId('useOneTimePasswordCheckbox')}
]},
{tag:'td', children:[
{tag:'div', cls:'passwordTypeChooser', children:[
{tag:'h4', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxLabel']},
{tag:'span', htmlString:Clipperz.PM.Strings['loginFormOneTimePasswordCheckboxDescription']}
]}
]}
]},
{tag:'tr', children:[
{tag:'td'},
{tag:'td', children:[
{tag:'div', id:this.getId('login_submit')}
]}
]}
]},
{tag:'tfoot'}
]}
]},
{tag:'div', cls:'loginFormFooterBox', children:[
{tag:'ul', children:[
{tag:'li', id:this.getId('showRegistrationLI'), children:[
{tag:'span', htmlString:Clipperz.PM.Strings['loginFormDontHaveAnAccountLabel']},
{tag:'a', href:'.', id:this.getId('showRegistration'), cls:'clipperzActionLink', htmlString:Clipperz.PM.Strings['loginFormCreateOneLabel']}
]},
{tag:'li', children:[
{tag:'span', htmlString:Clipperz.PM.Strings['loginFormForgotYourCredentialsLabel']},
{tag:'a', href:Clipperz.PM.Strings['loginFormAarghThatsBadUrl'], target:'Clipperz_Help', htmlString:Clipperz.PM.Strings['loginFormAarghThatsBadLabel']}
]},
{tag:'li', children:[
{tag:'span', htmlString:Clipperz.PM.Strings['loginFormAfraidOfMaliciousScriptsLabel']},
{tag:'a', href:Clipperz.PM.Strings['loginFormVerifyTheCodeUrl'], target:'Clipperz_Help', htmlString:Clipperz.PM.Strings['loginFormVerifyTheCodeLabel']}
]}
]}
]}
]},
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js
index b8cc556..17ed8e4 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/LogoutPanel.js
@@ -1,70 +1,68 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
//#############################################################################
Clipperz.PM.Components.Panels.LogoutPanel = function(args) {
args = args || {};
Clipperz.PM.Components.Panels.LogoutPanel.superclass.constructor.call(this, args);
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Panels.LogoutPanel, Clipperz.PM.Components.Panels.BasePanel, {
'toString': function() {
return "Clipperz.PM.Components.LogoutPanel component";
},
//-------------------------------------------------------------------------
'initPanel': function() {
var result;
var layout;
result = new YAHOO.ext.ContentPanel(this.getId('panel'), {title:'logout', closable:false, autoCreate:true});
Clipperz.YUI.DomHelper.append(result.getEl().dom,
{tag:'div', children:[
{tag:'h2', html:'Logout panel'}
]}
);
return result;
},
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js
index 29ef516..c19a8a3 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/MainPanel.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
//#############################################################################
Clipperz.PM.Components.Panels.MainPanel = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Panels.MainPanel.superclass.constructor.call(this, anElement, args);
this._recordListDataModel = null;
this._selectedRecord = null;
this._recordDetailComponent = null;
this._recordListGrid = null;
this._directLinkItemTemplate = null;
this._recordItemTemplate = null;
this._addNewRecordButton = null;
this._deleteRecordButton = null;
this._creationWizard = null;
Clipperz.NotificationCenter.register(null, 'selectAndEnterEditMode', this, 'selectRecordAndEnterEditModeHandler');
Clipperz.NotificationCenter.register(null, 'recordAdded', this, 'recordAddedHandler');
Clipperz.NotificationCenter.register(null, 'recordUpdated', this, 'recordUpdatedHandler');
Clipperz.NotificationCenter.register(null, 'recordRemoved', this, 'recordRemovedHandler');
Clipperz.NotificationCenter.register(null, 'directLoginAdded', this, 'directLoginAddedHandler');
Clipperz.NotificationCenter.register(null, 'directLoginUpdated', this, 'directLoginUpdatedHandler');
Clipperz.NotificationCenter.register(null, 'directLoginRemoved', this, 'directLoginRemovedHandler');
Clipperz.NotificationCenter.register(null, 'accountLocked', this, 'accountLockedHandler');
MochiKit.Signal.connect(MochiKit.DOM.currentWindow(), 'onresize', this, 'resizeModalMask');
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Panels.MainPanel, Clipperz.PM.Components.Panels.BasePanel, {
'toString': function() {
return "Clipperz.PM.Components.Panels.MainPanel component";
},
//-------------------------------------------------------------------------
'render': function() {
this.element().update("");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', id:'mainPanelTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', width:'15', children:[
{tag:'div', cls:'mainPanelMinHeightDiv'}
]},
{tag:'td', valign:'top', id:'directLoginsTD', width:'200', children:[
{tag:'div', id:'directLoginsBlock', children:[
{tag:'div', cls:'directLoginsBlockHeaderBox', children:[{tag:'h3', id:'directLoginTitle', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockLabel']}]},
{tag:'div', id:'directLoginsDescription', htmlString:Clipperz.PM.Strings['mainPanelDirectLoginBlockDescription']},
{tag:'ul', id:'directLogins'}
]}
]},
{tag:'td', width:'15', children:[
{tag:'div', cls:'mainPanelMinHeightDiv'}
]},
{tag:'td', valign:'top', children:[
{tag:'div', id:'mainContent', children:[
{tag:'div', id:'recordListBlockHeader'},
{tag:'div', id:'recordListAndDetailBlock', children:[
{tag:'table', id:'recordListAndDetailBlockTABLE', border:'0', cellspacing:'0', cellpadding:'0', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', valign:'top', width:'250', children:[
{tag:'div', id:'recordListBlock', children:[
{tag:'div', id:'recordListFilterHeader'},
{tag:'ul', id:'records'}
]}
]},
{tag:'td', id:'recordDetailSeparatorTD', rowspan:'2', valign:'top', bgcolor:'#ddddff', html:'&nbsp;'},
{tag:'td', valign:'top', children:[
{tag:'div', id:'recordDetailMainBlock', children:[
{tag:'div', id:'recordTitleTopBlock'},
{tag:'div', id:'recordDetailBlock', children:[
{tag:'div', id:'recordDetail'}
]}
]},
{tag:'div', id:'recordCreationWizardMainBlock', children:[
{tag:'div', id:'recordCreationWizard', html:"WIZARD"}
]}
]}
]},
{tag:'tr', children:[
{tag:'td', id:'cardBoxLowerLeftTD', html:'&nbsp;'},
{tag:'td', id:'cardBoxLowerRightTD', html:'&nbsp;'}
]}
]}
]}
]}
]}
]},
{tag:'td', width:'15', html:"&nbsp;"}
]}
]}
]});
this.renderRecordListBlockHeader();
// this.renderRecordListFilterHeader();
YAHOO.ext.Element.get('directLogins').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
this.recordDetailComponent();
YAHOO.ext.Element.get('recordDetailMainBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).show();
YAHOO.ext.Element.get('recordCreationWizardMainBlock').setVisibilityMode(YAHOO.ext.Element.DISPLAY).hide();
},
//-------------------------------------------------------------------------
'addNewRecordButton': function() {
diff --git a/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js b/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js
index 4f2a015..1c799d0 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Panels/ToolsPanel.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Panels) == 'undefined') { Clipperz.PM.Components.Panels = {}; }
//#############################################################################
Clipperz.PM.Components.Panels.ToolsPanel = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.Panels.ToolsPanel.superclass.constructor.call(this, anElement, args);
this._generateButtonElement = null;
this._needsRenderingUponTabSwitch = false;
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.Panels.ToolsPanel, Clipperz.PM.Components.Panels.BasePanel, {
'toString': function() {
return "Clipperz.PM.Components.Panels.ToolsPanel component";
},
//-------------------------------------------------------------------------
'render': function() {
var bookmarkletUrl;
//MochiKit.Logging.logDebug(">>> ToolsPanel.render");
Clipperz.NotificationCenter.unregister(this);
MochiKit.Signal.disconnectAllTo(this);
if (Clipperz_IEisBroken == true) {
bookmarkletUrl = bookmarklet_ie;
} else {
bookmarkletUrl = bookmarklet;
}
this.element().update("");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', valign:'top', width:'200', children:[
{tag:'ul', id:"dataSubMenu", cls:'subMenu', children:[
{tag:'li', id:this.getId('passwordGenerator'), htmlString:Clipperz.PM.Strings['passwordGeneratorTabLabel']},
{tag:'li', id:this.getId('bookmarklet'), htmlString:Clipperz.PM.Strings['bookmarkletTabLabel']},
{tag:'li', id:this.getId('compact'), htmlString:Clipperz.PM.Strings['compactTabLabel']},
{tag:'li', id:this.getId('httpAuth'), htmlString:Clipperz.PM.Strings['httpAuthTabLabel']}
]}
]},
{tag:'td', valign:'top', children:[
{tag:'ul', cls:'clipperzTabPanels', children:[
{tag:'li', id:this.getId('passwordGeneratorPanel'), children:[
{tag:'div', cls:'clipperzSubPanel', children:[
{tag:'h5', htmlString:Clipperz.PM.Strings['passwordGeneratorTabTitle']},
{tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['paswordGeneratorTabDescription']},
//---------------------------------------------------
{tag:'div', children:[
{tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[
{tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')},
{tag:'table', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', width:'20%', children:[
{tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true},
{tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']}
]},
{tag:'td', width:'20%', children:[
{tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true},
{tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']}
]},
{tag:'td', width:'20%', children:[
{tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true},
{tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']}
]},
{tag:'td', width:'20%', children:[
{tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true},
{tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']}
]},
{tag:'td', width:'20%', children:[
{tag:'span', cls:'passwordGeneratorLength', children:[
{tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLengthLabel']},
{tag:'span', id:this.getId('passwordLength'), cls:'passwordGeneratorLengthValue', html:'0'}
]}
]}
]}
]}
]}
]},
{tag:'div', id:this.getId('generateRandomPassword')}
]}
//---------------------------------------------------
]}
]},
{tag:'li', id:this.getId('bookmarkletPanel'), children:[
{tag:'div', cls:'clipperzSubPanel', children:[
{tag:'h5', htmlString:Clipperz.PM.Strings['bookmarkletTabTitle']},
{tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['bookmarkletTabDescription']},
{tag:'a', href:bookmarkletUrl, cls:'bookmarkletLink', htmlString:Clipperz.PM.Strings['bookmarkletTabBookmarkletTitle']},
{tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['bookmarkletTabInstructions']}
]}
]},
{tag:'li', id:this.getId('compactPanel'), children:[
{tag:'div', cls:'clipperzSubPanel', children:[
{tag:'h5', htmlString:Clipperz.PM.Strings['compactTabTitle']},
{tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['compactTabDescription']}
]}
]},
{tag:'li', id:this.getId('httpAuthPanel'), children:[
{tag:'div', cls:'clipperzSubPanel', children:[
{tag:'h5', htmlString:Clipperz.PM.Strings['httpAuthTabTitle']},
{tag:'div', cls:'panelDescription', htmlString:Clipperz.PM.Strings['httpAuthTabDescription']},
{tag:'div', cls:'bookmarkletConfiguration', children:[Clipperz.PM.Strings['httpAuthBookmarkletConfiguration']]}
]}
]}
]}
]}
]}
diff --git a/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js b/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js
index 784dce9..b64e0f7 100644
--- a/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js
+++ b/frontend/beta/js/Clipperz/PM/Components/PasswordEntropyDisplay.js
@@ -1,115 +1,113 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
Clipperz.PM.Components.PasswordEntropyDisplay = function(anElement, args) {
args = args || {};
//MochiKit.Logging.logDebug(">>> new TextFormField");
Clipperz.PM.Components.PasswordEntropyDisplay.superclass.constructor.call(this, anElement, args);
this._wrapperElement = null;
this._entropyElement = null;
this.render();
//MochiKit.Logging.logDebug("<<< new TextFormField");
return this;
};
YAHOO.extendX(Clipperz.PM.Components.PasswordEntropyDisplay, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.PasswordEntropyDisplay";
},
//-----------------------------------------------------
'wrapperElement': function() {
return this._wrapperElement;
},
'setWrapperElement': function(aValue) {
this._wrapperElement = aValue;
},
//-----------------------------------------------------
'passwordElement': function() {
return this.element();
},
//-----------------------------------------------------
'entropyElement': function() {
return this._entropyElement;
},
'setEntropyElement': function(aValue) {
this._entropyElement = aValue;
},
//-----------------------------------------------------
'render': function() {
MochiKit.Signal.disconnectAllTo(this);
this.setWrapperElement(this.element().wrap({tag:'div'}));
this.setEntropyElement(Clipperz.YUI.DomHelper.append(this.wrapperElement().dom, {tag:'div', cls:'passwordEntropy', html:"&nbsp;"}, true));
// this.entropyElement().setWidth(this.passwordElement().getWidth());
this.updateEntropyElement();
MochiKit.Signal.connect(this.element().dom, 'onkeyup', this, 'updateEntropyElement');
MochiKit.Signal.connect(this.element().dom, 'onchange', this, 'updateEntropyElement');
MochiKit.Signal.connect(this.element().dom, 'onblur', this, 'updateEntropyElement');
},
//-----------------------------------------------------
'computeEntropyForString': function(aValue) {
return Clipperz.PM.Crypto.passwordEntropy(aValue);
},
//-----------------------------------------------------
'updateEntropyElement': function(anEvent) {
//MochiKit.Logging.logDebug(">>> PasswordEntropyDisplay.updateEntropyElement");
var maxExtent;
var entropy;
entropy = Math.min(128, this.computeEntropyForString(this.passwordElement().dom.value));
//MochiKit.Logging.logDebug("--- PasswordEntropyDisplay.updateEntropyElement - entropy: " + entropy);
this.entropyElement().setStyle('background-position', "0px " + -entropy + "px");
this.entropyElement().setWidth(this.passwordElement().getWidth() * (entropy/128));
//MochiKit.Logging.logDebug("<<< PasswordEntropyDisplay.updateEntropyElement");
},
//-----------------------------------------------------
__syntaxFix__: '__syntaxFix__'
});
diff --git a/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js b/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js
index 87c52b2..67db50a 100644
--- a/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js
+++ b/frontend/beta/js/Clipperz/PM/Components/PasswordGenerator.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
Clipperz.PM.Components.PasswordGenerator = function(anElement, aFieldValueComponent, args) {
args = args || {};
//MochiKit.Logging.logDebug(">>> new TextFormField");
Clipperz.PM.Components.PasswordGenerator.superclass.constructor.call(this, anElement, args);
this._fieldValueComponent = aFieldValueComponent;
this._panelButton = null;
this.render();
//MochiKit.Logging.logDebug("<<< new TextFormField");
return this;
};
YAHOO.extendX(Clipperz.PM.Components.PasswordGenerator, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.PasswordGenerator";
},
//-----------------------------------------------------
'fieldValueComponent': function() {
return this._fieldValueComponent;
},
//-----------------------------------------------------
'render': function() {
MochiKit.Signal.disconnectAllTo(this);
// this._panelButton = new YAHOO.ext.Button(this.element().dom, {text:Clipperz.PM.Strings['passwordGeneratorButtonLabel'], handler:this.openPasswordPanel, scope:this});
MochiKit.Signal.connect(this.element().dom, 'onmouseenter', this, 'onMouseEnter');
MochiKit.Signal.connect(this.element().dom, 'onmouseleave', this, 'onMouseLeave');
MochiKit.Signal.connect(this.element().dom, 'onclick', this, 'openPasswordPanel');
},
//-----------------------------------------------------
'onMouseEnter': function() {
this.element().addClass('hover');
},
'onMouseLeave': function() {
this.element().removeClass('hover');
},
//-----------------------------------------------------
'panelButton': function() {
return this._panelButton;
},
//-----------------------------------------------------
'openPasswordPanel': function() {
var passwordGeneratorElement;
var passwordGeneratorDialog;
var cancelButton;
var okButton;
var cancelFunction;
var okFunction;
//MochiKit.Logging.logDebug(">>> PasswordGenerator.openPasswordPanel");
passwordGeneratorElement = Clipperz.YUI.DomHelper.append(document.body, {tag:'div', id:'passwordGenerator', children:[
{tag:'div', cls:'ydlg-hd', htmlString:Clipperz.PM.Strings['passwordGeneratorPanelTitle']},
{tag:'div', cls:'ydlg-bd', children:[
{tag:'form', id:this.getId('passwordGeneratorForm'), cls:'passwordGenerator', children:[
{tag:'input', type:'text', cls:'clipperz_passwordGenerator_password', id:this.getId('passwordField')},
{tag:'table', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', width:'20%', children:[
{tag:'input', type:'checkbox', name:'lowercase', id:this.getId('lowercase'), checked:true},
{tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLowercaseLabel']}
]},
{tag:'td', width:'20%', children:[
{tag:'input', type:'checkbox', name:'uppercase', id:this.getId('uppercase'), checked:true},
{tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorUppercaseLabel']}
]},
{tag:'td', width:'20%', children:[
{tag:'input', type:'checkbox', name:'numbers', id:this.getId('numbers'), checked:true},
{tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorNumberLabel']}
]},
{tag:'td', width:'20%', children:[
{tag:'input', type:'checkbox', name:'symbols', id:this.getId('symbols'), checked:true},
{tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorSymbolLabel']}
]},
{tag:'td', width:'20%', children:[
{tag:'span', cls:'passwordGeneratorLength', children:[
{tag:'span', htmlString:Clipperz.PM.Strings['passwordGeneratorLengthLabel']},
{tag:'span', id:this.getId('passwordLength'), cls:'passwordGeneratorLengthValue', html:'0'}
]}
]}
]}
]}
]}
]}
]},
{tag:'div', cls:'ydlg-ft'}
]}, true);
new Clipperz.PM.Components.PasswordEntropyDisplay(this.getElement('passwordField'));
MochiKit.Signal.connect(this.getId('lowercase'), 'onclick', this, 'updatePasswordValue');
MochiKit.Signal.connect(this.getId('uppercase'), 'onclick', this, 'updatePasswordValue');
MochiKit.Signal.connect(this.getId('numbers'), 'onclick', this, 'updatePasswordValue');
MochiKit.Signal.connect(this.getId('symbols'), 'onclick', this, 'updatePasswordValue');
MochiKit.Signal.connect(this.getDom('passwordField'), 'onkeyup', this, 'updatePasswordLengthLabel');
MochiKit.Signal.connect(this.getDom('passwordField'), 'onchange', this, 'updatePasswordLengthLabel');
MochiKit.Signal.connect(this.getDom('passwordField'), 'onblur', this, 'updatePasswordLengthLabel');
this.updatePasswordValue();
passwordGeneratorDialog = new YAHOO.ext.BasicDialog(
passwordGeneratorElement, {
autoCreate:false,
closable:false,
modal:true,
autoTabs:false,
diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js
index b3debad..821dc94 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Footer.js
@@ -1,25 +1,23 @@
/*
-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/.
*/
diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js
index b3debad..821dc94 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Header.js
@@ -1,25 +1,23 @@
/*
-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/.
*/
diff --git a/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js b/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js
index 5f5c29f..170bd09 100644
--- a/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js
+++ b/frontend/beta/js/Clipperz/PM/Components/Printing/Record.js
@@ -1,92 +1,90 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.Printing) == 'undefined') { Clipperz.PM.Components.Printing = {}; }
Clipperz.PM.Components.Printing.Record = function(args) {
args = args || {};
this._record = args['record'];
return this;
}
MochiKit.Base.update(Clipperz.PM.Components.Printing.Record.prototype, {
'record': function() {
return this._record;
},
//-------------------------------------------------------------------------
'deferredDrawToWindow': function(aWindow) {
var deferredResult;
deferredResult = new MochiKit.Async.Deferred();
deferredResult.addCallback(MochiKit.Base.method(this.record(), 'deferredData'));
deferredResult.addCallback(MochiKit.Base.method(this, 'appendToWindow', aWindow));
deferredResult.callback();
return deferredResult;
},
//-------------------------------------------------------------------------
'appendToWindow': function(aWindow) {
MochiKit.DOM.withWindow(aWindow, MochiKit.Base.bind(function() {
var newBlock;
var fields;
fields = MochiKit.Base.concat(
MochiKit.Base.map(MochiKit.Base.bind(function(aField) {
var result;
var dt, dd;
var label, value;
label = aField.label();
value = aField.value();
dt = MochiKit.DOM.createDOM('DT', null, label);
dd = MochiKit.DOM.createDOM('DD', null, value)
result = [dt, dd];
return result
}, this), MochiKit.Base.values(this.record().currentVersion().fields()))
);
newBlock = MochiKit.DOM.DIV({'class': 'recordBlock'},
MochiKit.DOM.H2(null, this.record().label()),
MochiKit.DOM.DIV({'class': 'recordNotes'}, MochiKit.Base.map(MochiKit.Base.partial(MochiKit.DOM.P, null), this.record().notes().split("\n"))),
MochiKit.DOM.createDOM('DL', null, fields)
);
MochiKit.DOM.appendChildNodes(MochiKit.DOM.currentDocument().body, newBlock);
}, this));
},
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js
index 5b50284..d6fde5c 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractComponent.js
@@ -1,102 +1,100 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.AbstractComponent = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.RecordDetail.AbstractComponent.superclass.constructor.call(this, args);
this._element = anElement;
this._mainComponent = args.mainComponent;
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractComponent, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.AbstractComponent";
},
//-------------------------------------------------------------------------
'mainComponent': function() {
return this._mainComponent;
},
//-------------------------------------------------------------------------
'record': function() {
return this.mainComponent().record();
},
//-------------------------------------------------------------------------
'editMode': function() {
return this.mainComponent().editMode();
},
//-------------------------------------------------------------------------
'render': function() {
this.element().update("");
this.update();
},
//-------------------------------------------------------------------------
'update': function(anEvent) {
if (this.editMode() == 'EDIT') {
this.updateEditMode();
} else if (this.editMode() == 'VIEW') {
this.updateViewMode();
}
},
//-------------------------------------------------------------------------
'updateViewMode': function() {},
'updateEditMode': function() {},
'synchronizeComponentValues': function() {},
//-------------------------------------------------------------------------
'destroy': function() {
this.element().remove();
},
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js
index ad733aa..ede42c2 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/AbstractFieldSubComponent.js
@@ -1,74 +1,72 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent.superclass.constructor.call(this, anElement, args);
this._fieldComponent = args.fieldComponent || null;
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent";
},
//-------------------------------------------------------------------------
'fieldComponent': function() {
return this._fieldComponent;
},
//-------------------------------------------------------------------------
'mainComponent': function() {
return this.fieldComponent().mainComponent();
},
//-------------------------------------------------------------------------
'recordField': function() {
return this.fieldComponent().recordField();
},
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js
index d4c7837..c703db4 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/CreationWizard.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.CreationWizard = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.RecordDetail.CreationWizard.superclass.constructor.call(this, anElement, args);
this._mainComponent = args.mainComponent;
this._previouslySelectedRecord = args.previouslySelectedRecord;
//MochiKit.Logging.logDebug("--- new CreationWizard - previouslySelectedRecord: " + args.previouslySelectedRecord);
this._createButton_header = null;
this._createButton_footer = null;
this._cancelButton_header = null;
this._cancelButton_footer = null;
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.CreationWizard, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.CreationWizard component";
},
//-------------------------------------------------------------------------
'previouslySelectedRecord': function() {
return this._previouslySelectedRecord;
},
//-------------------------------------------------------------------------
'render': function() {
var templateListElement;
var templates;
this.element().update("");
Clipperz.YUI.DomHelper.append(this.element().dom,
{tag:'form', cls:'recordDataFORM', id:this.getId('form'), children:[
{tag:'div', id:'recordDetailDataBox', cls:'recordDetailDataBox', children:[
{tag:'div', id:this.getId('wizardBox'), cls:'recordCreationWizard', children:[
{tag:'div', id:this.getId('recordCreationWizardTitleBox'), cls:'recordCreationWizardTitleBox', htmlString:Clipperz.PM.Strings['newRecordWizardTitleBox']},
{tag:'ul', id:this.getId('templateList'), cls:'radioList'}
]}
]}
]}
);
Clipperz.YUI.DomHelper.append(this.getDom('recordCreationWizardTitleBox'), {tag:'div', cls:'newRecordWizardHeader', children:[
{tag:'table', width:'100%', cellpadding:'5', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', width:'49%', align:'right', children:[
{tag:'div', id:this.getId('cancelButton_header')}
]},
{tag:'td', width:'10', html:'&nbsp;'},
{tag:'td', width:'49%', align:'left', children:[
{tag:'div', id:this.getId('createButton_header')}
]}
]}
]}
]}
]});
templateListElement = this.getElement('templateList');
templates = Clipperz.PM.Strings['recordTemplates'];
MochiKit.Iter.forEach(MochiKit.Base.keys(templates), MochiKit.Base.bind(function(aTemplateKey) {
Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[
{tag:'table', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', valign:'top', children:[
{tag:'input', id:this.getId(aTemplateKey+"_radio"), type:'radio', name:'recordTemplate', value:"aTemplateKey"}
]},
{tag:'td', valign:'top', children:[
{tag:'h4', id:this.getId(aTemplateKey+"_title"), html:templates[aTemplateKey]['title']},
{tag:'div', cls:'templateDescription', htmlString:templates[aTemplateKey]['description']}
]}
]}
]}
]}
]});
this.getElement(aTemplateKey+"_radio").dom.value = aTemplateKey;
MochiKit.Signal.connect(this.getDom(aTemplateKey+"_title"), 'onclick', MochiKit.Base.partial(function(aRadioButton) {aRadioButton.click();}, this.getDom(aTemplateKey+"_radio")));
}, this));
Clipperz.YUI.DomHelper.append(templateListElement.dom, {tag:'li', children:[
{tag:'table', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', valign:'top', children:[
{tag:'input', type:'radio', name:'recordTemplate', id:this.getId('bookmarkletRadioButton'), value:'BookmarkletConfigurationTemplate'}
]},
{tag:'td', valign:'top', children:[
{tag:'h4', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationTitle']},
{tag:'div', cls:'templateDescription', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationDescription']},
{tag:'div', cls:'bookmarkletConfiguration', children:[
// {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']},
{tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']},
{tag:'textarea', id:this.getId('bookmarkletConfiguration')}
]}
]}
]}
]}
]}
]});
Clipperz.YUI.DomHelper.append(this.getDom('wizardBox'), {tag:'div', cls:'newRecordWizardFooter', children:[
{tag:'table', width:'100%', cellpadding:'5', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', width:'49%', align:'right', children:[
{tag:'div', id:this.getId('cancelButton_footer')}
]},
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js
index 36dd9a8..0e4640e 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginBindingComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent = function(anElement, args) {
//MochiKit.Logging.logDebug(">>> new DirectLoginBindingComponent");
args = args || {};
Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent.superclass.constructor.call(this, anElement, args);
this._directLoginBinding = args.directLoginBinding || null;
this.render();
Clipperz.NotificationCenter.register(this.record(), 'addNewRecordField', this, 'syncAndUpdateEditMode');
Clipperz.NotificationCenter.register(this.record(), 'removedField', this, 'syncAndUpdateEditMode');
Clipperz.NotificationCenter.register(this.record(), 'updatedFieldLabel', this, 'syncAndUpdateEditMode');
//MochiKit.Logging.logDebug("<<< new DirectLoginBindingComponent");
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.DirectLoginBindingComponent component";
},
//-------------------------------------------------------------------------
'directLoginBinding': function() {
return this._directLoginBinding;
},
//-------------------------------------------------------------------------
'render': function() {
// Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', style:'font-weight:bold;', html:this.directLoginBinding().key()})
// Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.directLoginBinding().value()})
//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.render");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingLabelTD', children:[
{tag:'span', html:this.directLoginBinding().key()}
]});
//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 1");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginBindingValueTD', children:[
{tag:'div', id:this.getId('editModeBox'), children:[
{tag:'select', id:this.getId('select'), children:this.recordFieldOptions()}
]},
{tag:'div', id:this.getId('viewModeBox'), children:[
{tag:'span', id:this.getId('viewValue'), html:""}
]}
]});
//MochiKit.Logging.logDebug("--- DirectLoginBindingComponent.render - 2");
this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
this.update();
//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.render");
},
//-------------------------------------------------------------------------
'recordFieldOptions': function() {
var result;
var option;
var recordFieldKey;
var recordFields;
//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.recordFieldOptions");
recordFields = this.directLoginBinding().directLogin().record().currentVersion().fields();
result = [];
option = {tag:'option', value:null, html:'---'};
result.push(option);
for (recordFieldKey in recordFields) {
// TODO: remove the value: field and replace it with element.dom.value = <some value>
option = {tag:'option', value:recordFieldKey, html:recordFields[recordFieldKey].label()}
if (recordFieldKey == this.directLoginBinding().fieldKey()) {
option['selected'] = true;
}
result.push(option);
}
//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.recordFieldOptions");
return result;
},
//-------------------------------------------------------------------------
'syncAndUpdateEditMode': function() {
this.synchronizeComponentValues();
this.updateEditMode();
},
'updateEditMode': function() {
var selectElementBox;
//MochiKit.Logging.logDebug(">>> DirectLoginBindingComponent.updateEditMode");
this.getElement('viewModeBox').hide();
selectElementBox = this.getElement('editModeBox');
selectElementBox.update("");
Clipperz.YUI.DomHelper.append(selectElementBox.dom, {tag:'select', id:this.getId('select'), children:this.recordFieldOptions()});
/*
selectElement = this.getElement('select');
selectElement.update("");
MochiKit.Iter.forEach(this.recordFieldOptions(), function(anOption) {
Clipperz.YUI.DomHelper.append(selectElement.dom, anOption);
});
*/
this.getElement('editModeBox').show();
//MochiKit.Logging.logDebug("<<< DirectLoginBindingComponent.updateEditMode");
},
//-------------------------------------------------------------------------
'updateViewMode': function() {
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js
index 69cad79..883c45c 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.DirectLoginComponent = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.RecordDetail.DirectLoginComponent.superclass.constructor.call(this, anElement, args);
this._directLogin = args.directLogin || null;
// this._titleElement = null;
this._structureElement = null;
this._removeButton = null;
this._directLoginBindingComponents = null;
this._collapser = null;
this.mainComponent().addEditComponent(this);
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.DirectLoginComponent component";
},
//-------------------------------------------------------------------------
'directLogin': function() {
return this._directLogin;
},
'directLoginBindingComponents': function() {
return this._directLoginBindingComponents;
},
//-------------------------------------------------------------------------
'removeDirectLogin': function() {
//MochiKit.Logging.logDebug(">>> DirectLoginComponent.removeDirectLogin");
this.mainComponent().synchronizeComponentValues();
this.directLogin().remove();
this.mainComponent().removeEditComponent(this);
this.mainComponent().render();
//MochiKit.Logging.logDebug("<<< DirectLoginComponent.removeDirectLogin");
},
//-------------------------------------------------------------------------
/*
'formDataValue': function() {
return Clipperz.Base.serializeJSON(this.directLogin().formData());
},
'setFormDataValue': function(aValue) {
},
*/
//-------------------------------------------------------------------------
'removeButton': function() {
return this._removeButton;
},
'setRemoveButton': function(aValue) {
this._removeButton = aValue;
},
//-------------------------------------------------------------------------
/*
'titleElement': function() {
return this._titleElement;
},
'setTitleElement': function(aValue) {
this._titleElement = aValue;
},
*/
//-------------------------------------------------------------------------
'structureElement': function() {
return this._structureElement;
},
'setStructureElement': function(aValue) {
this._structureElement = aValue;
},
//-------------------------------------------------------------------------
'render': function() {
//MochiKit.Logging.logDebug(">>> DirectLoginComponent.render");
try {
this.element().update("");
Clipperz.YUI.DomHelper.append(this.element().dom,
{tag:'li', children:[
{tag:'table', width:'100%', border:'0', cellpadding:'0', cellspacing:'0', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', rowspan:'2', width:'30', valign:'top', html:'&#160', children:[
{tag:'div', id:this.getId('removeDirectLogin'), children:[
{tag:'div', id:this.getId('removeDirectLoginButton')}
]},
{tag:'div', id:this.getId('collapseLink'), cls:'directLoginCollapseLink'}
]},
{tag:'td', valign:'top', children:[
{tag:'table', width:'100%', border:'0', cellpadding:'0', cellspacing:'0', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', width:'20', valign:'top', children:[
{tag:'a', href:'#', id:this.getId('directLogin'), children:[
{tag:'img', id:this.getId('faviconImage'), width:'16', height:'16', src:this.directLogin().fixedFavicon()}
]}
]},
{tag:'td', valign:'top', children:[
{tag:'div', cls:'directLoginDetailTitle', children:[
{tag:'div', id:this.getId('titleViewBox'), children:[
{tag:'a', href:'#', id:this.getId('titleLink')}
]},
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js
index d210100..b478d94 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginValueComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent = function(anElement, args) {
//MochiKit.Logging.logDebug(">>> new DirectLoginValueComponent");
args = args || {};
Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent.superclass.constructor.call(this, anElement, args);
this._directLoginInputValue = args.directLoginInputValue || null;
this._value = this.directLoginInputValue().directLogin().formValues()[this.directLoginInputValue().name()];
this.render();
//MochiKit.Logging.logDebug("<<< new DirectLoginValueComponent - record: " + this.record());
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.DirectLoginValueComponent component - " + this.directLoginInputValue().name();
},
//-------------------------------------------------------------------------
'directLoginInputValue': function() {
return this._directLoginInputValue;
},
//-------------------------------------------------------------------------
'render': function() {
//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.render");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataLabelTD', children:[
{tag:'span', html:this.directLoginInputValue().name()}
]});
//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 1");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', cls:'directLoginDataValueTD', children:[
{tag:'span', id:this.getId('inputElement')}
]});
//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.render - 2");
this.update();
//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.render");
},
//-------------------------------------------------------------------------
'inputElementConfiguration': function() {
var result;
var currentValue;
//MochiKit.Logging.logDebug(">>> DirectLoginValueComponent.inputElementConfiguration - " + this.directLoginInputValue().name());
result = [];
currentValue = this.value();
switch (this.directLoginInputValue().type()) {
case 'checkbox':
var checkbox;
//{"type":"checkbox", "name":"rememberUsernameChk", "value":"checkbox"}
checkbox = {tag:'input', id:this.getId('checkbox'), type:'checkbox'}
if (currentValue == true) {
checkbox.checked = true;
}
result.push(checkbox);
break;
case 'select':
var input;
//{"type":"select", "name":"DOMAIN", "options":[{"selected":true, "label":"@tin.it", "value":"tin.it"}, {"selected":false, "label":"@virgilio.it", "value":"virgilio.it"}]}
input = {tag:'select', id:this.getId('select'), name:this.directLoginInputValue().name(), children:[]};
input.children.push({tag:'option', value:null, html:"---"});
MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) {
var option;
// TODO: remove the value: field and replace it with element.dom.value = <some value>
option = {tag:'option', value:anOption['value'], html:anOption['label']}
if (currentValue == anOption['value']) {
option.selected = true;
}
input.children.push(option);
})
result.push(input);
break;
case 'radio':
var name;
var radioBox;
//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3");
name = this.getId(this.directLoginInputValue().name());
radioBox = {tag:'div', id:this.getId('radioBox'), children:[]};
result.push(radioBox);
//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1 - options.length: " + this.directLoginInputValue().args()['options'].length);
//{"name":"dominio", "type":"radio", "options":[{"value":"@alice.it", "checked":true}, {"value":"@tin.it", "checked":false}, {"value":"@virgilio.it", "checked":false}, {"value":"@tim.it", "checked":false}]}
MochiKit.Iter.forEach(this.directLoginInputValue().args()['options'], function(anOption) {
var radio;
//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.1");
// TODO: remove the value: field and replace it with element.dom.value = <some value>
radio = {tag:'input', type:'radio', name:name, value:anOption['value']};
//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.2");
if (currentValue == anOption['value']) {
//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.3");
radio.checked = true;
//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.4");
}
//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.5");
radioBox.children.push({tag:'div', children:[ radio, {tag:'span', html:anOption['value']} ]})
//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.1.6");
})
//MochiKit.Logging.logDebug("--- DirectLoginValueComponent.inputElementConfiguration - 3.2");
break;
}
//MochiKit.Logging.logDebug("<<< DirectLoginValueComponent.inputElementConfiguration");
return result;
},
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js
index 1396bd8..878adce 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.DirectLoginsComponent = function(anElement, args) {
//MochiKit.Logging.logDebug(">>> new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent");
args = args || {};
//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 0");
Clipperz.PM.Components.RecordDetail.DirectLoginsComponent.superclass.constructor.call(this, anElement, args);
//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 1");
this._addDirectLoginButton = null;
//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 2");
this.mainComponent().addEditComponent(this);
//MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 3");
this.render();
//MochiKit.Logging.logDebug("<<< new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent");
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginsComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.DirectLoginsComponent component";
},
//-------------------------------------------------------------------------
'addDirectLoginButton': function() {
return this._addDirectLoginButton;
},
'setAddDirectLoginButton': function(aValue) {
this._addDirectLoginButton = aValue;
},
//-------------------------------------------------------------------------
'render': function() {
this.element().update("");
Clipperz.YUI.DomHelper.append(this.element().dom,
{tag:'div', cls:'directLoginsRecordBox', children:[
{tag:'h3', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockTitle']},
{tag:'ul', id:this.getId('directLogins')},
{tag:'div', cls:'addDirectLoginBox', id:this.getId('addDirectLogin'), children:[
{tag:'div', cls:'addDirectLoginBoxContent', children:[
{tag:'div', cls:'bookmarkletConfiguration', children:[
// {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']},
{tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']},
{tag:'textarea', id:this.getId('addDirectLoginTextarea')}
]},
{tag:'div', id:this.getId('addDirectLoginButton')}
]}
]}
]}
);
if (MochiKit.Base.keys(this.record().directLogins()).length == 0) {
//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 3");
Clipperz.YUI.DomHelper.append(this.getElement('directLogins'),
{tag:'li', children:[
// {tag:'span', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredLabel']}
{tag:'div', cls:'recordDetailNoDirectLoginDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription']}
]}
);
//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 4");
} else {
//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 5");
for (directLoginReference in this.record().directLogins()) {
//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 6");
this.addDirectLogin(this.record().directLogins()[directLoginReference]);
//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 7");
}
//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 8");
}
//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 9");
this.setAddDirectLoginButton(new YAHOO.ext.Button(this.getDom('addDirectLoginButton'), {
text:Clipperz.PM.Strings['recordDetailAddNewDirectLoginButtonLabel'],
handler:this.addNewDirectLogin,
scope:this
}));
MochiKit.Signal.connect(this.getId('addDirectLoginTextarea'), 'onkeydown', this, 'onkeydown');
//MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 11");
this.update();
//MochiKit.Logging.logDebug("<<< DirectLoginsComponent.render");
},
//-------------------------------------------------------------------------
'addDirectLogin': function(aDirectLogin) {
//MochiKit.Logging.logDebug(">>> DirectLoginsComponent.addDirectLogin");
new Clipperz.PM.Components.RecordDetail.DirectLoginComponent(
Clipperz.YUI.DomHelper.append(this.getDom('directLogins'), {tag:'div'}, true),
{
mainComponent:this.mainComponent(),
directLogin:aDirectLogin
}
);
//MochiKit.Logging.logDebug("<<< DirectLoginsComponent.addDirectLogin");
},
//-------------------------------------------------------------------------
'addNewDirectLogin': function() {
var newDirectLogin;
var configuration;
//MochiKit.Logging.logDebug(">>> DirectLoginsComponent.addNewDirectLogin");
if (MochiKit.Base.keys(this.record().directLogins()).length == 0) {
this.getElement('directLogins').update("");
}
this.mainComponent().synchronizeComponentValues();
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js
index b79c365..661f94d 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldButtonComponent.js
@@ -1,114 +1,112 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.FieldButtonComponent = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.RecordDetail.FieldButtonComponent.superclass.constructor.call(this, anElement, args);
this._button = null;
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldButtonComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.FieldButtonComponent";
},
//-------------------------------------------------------------------------
'buttonText': function() {
var result;
if (this.recordField() == null) {
// TODO: this is never used. It is just an obsolete legacy chunk of code
result = Clipperz.PM.Strings['recordDetailAddFieldButtonLabel'];
} else {
result = Clipperz.PM.Strings['recordDetailRemoveFieldButtonLabel'];
}
return result;
},
//-------------------------------------------------------------------------
'button': function() {
return this._button;
},
'setButton': function(aValue) {
this._button = aValue;
},
//-------------------------------------------------------------------------
'render': function() {
this.element().update("");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('button')})
this.setButton(new YAHOO.ext.Button(this.getDom('button'), {text:this.buttonText(), handler:this.handleButtonClick, scope:this}));
this.update();
},
//-------------------------------------------------------------------------
'handleButtonClick': function() {
if (this.recordField() == null) {
this.mainComponent().addNewField();
} else {
this.mainComponent().removeField(this.fieldComponent());
}
},
//-------------------------------------------------------------------------
'updateEditMode': function() {
this.button().show();
},
//-------------------------------------------------------------------------
'updateViewMode': function() {
this.button().hide();
},
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js
index 978a54e..bfa4658 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.FieldComponent = function(anElement, args) {
//MochiKit.Logging.logDebug(">>> new FieldComponent");
args = args || {};
Clipperz.PM.Components.RecordDetail.FieldComponent.superclass.constructor.call(this, anElement, args);
this._element = anElement;
this._recordField = args.recordField || null;
this._buttonComponent = null;
this._labelComponent = null;
this._dragHandler = null;
this._valueComponent = null;
this._typeComponent = null;
this.mainComponent().addEditComponent(this);
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.FieldComponent component";
},
//-------------------------------------------------------------------------
'recordField': function() {
return this._recordField;
},
//-------------------------------------------------------------------------
'buttonComponent': function() {
return this._buttonComponent;
},
'setButtonComponent': function(aValue) {
this._buttonComponent = aValue;
},
//-------------------------------------------------------------------------
'labelComponent': function() {
return this._labelComponent;
},
'setLabelComponent': function(aValue) {
this._labelComponent = aValue;
},
//-------------------------------------------------------------------------
'dragHandler': function() {
return this._dragHandler;
},
'setDragHandler': function(aValue) {
this._dragHandler = aValue;
},
//-------------------------------------------------------------------------
'valueComponent': function() {
return this._valueComponent;
},
'setValueComponent': function(aValue) {
this._valueComponent = aValue;
},
//-------------------------------------------------------------------------
'typeComponent': function() {
return this._typeComponent;
},
'setTypeComponent': function(aValue) {
this._typeComponent = aValue;
},
//-------------------------------------------------------------------------
'render': function() {
//MochiKit.Logging.logDebug(">>> RecordDetail.FieldComponent.render");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'32',*/ height:'24', cls:'removeFieldButton', align:'left', valign:'top', id:this.getId('button')});
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'25%',*/ valign:'top', id:this.getId('label')});
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'3',*/ valign:'top', id:this.getId('dragHandler')});
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'50%',*/ valign:'top', children:[
{tag:'div', cls:'Clipperz_recordFieldData', id:this.getId('value')}
]});
this.setButtonComponent(new Clipperz.PM.Components.RecordDetail.FieldButtonComponent(this.getElement('button'), {fieldComponent:this}));
this.setLabelComponent(new Clipperz.PM.Components.RecordDetail.FieldLabelComponent(this.getElement('label'), {fieldComponent:this}));
this.setDragHandler(new Clipperz.PM.Components.RecordDetail.FieldDragHandler(this.getElement('dragHandler'), {fieldComponent:this}));
this.setValueComponent(new Clipperz.PM.Components.RecordDetail.FieldValueComponent(this.getElement('value'), {fieldComponent:this}));
if (this.editMode() == 'EDIT') {
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td',/* width:'60',*/ align:'left', cls:'fieldTypeTD', valign:'top', id:this.getId('type')});
this.setTypeComponent(new Clipperz.PM.Components.RecordDetail.FieldTypeComponent(this.getElement('type'), {fieldComponent:this}));
}
this.update();
//MochiKit.Logging.logDebug("<<< RecordDetail.FieldComponent.render");
},
//-------------------------------------------------------------------------
'handleButtonClick': function() {
this.mainComponent().record().removeField(this.recordField());
// if (this.recordField() == null) {
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js
index f7c5e21..7fea132 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldDragHandler.js
@@ -1,56 +1,54 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.FieldDragHandler = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.RecordDetail.FieldDragHandler.superclass.constructor.call(this, anElement, args);
this._element = anElement;
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldDragHandler, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.FieldDragHandler component";
},
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js
index c58a7e2..c6f8cbf 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldLabelComponent.js
@@ -1,138 +1,136 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.FieldLabelComponent = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.RecordDetail.FieldLabelComponent.superclass.constructor.call(this, anElement, args);
this._inputElement = null;
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldLabelComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.FieldLabelComponent component";
},
//-------------------------------------------------------------------------
'value': function() {
return this.recordField().label();
},
//-------------------------------------------------------------------------
'inputElement': function() {
return this._inputElement;
},
'setInputElement': function(aValue) {
this._inputElement = aValue;
},
//-------------------------------------------------------------------------
'render': function() {
var newTextFormField;
this.element().update("");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'Clipperz_recordFieldLabel', id:this.getId('label')});
// Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', style:'font-size:8pt;', html:this.recordField().key()});
// this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()}));
newTextFormField = new Clipperz.PM.Components.TextFormField(this.getElement('label'), {editMode:this.editMode(), value:this.value()});
// newTextFormField.inputElement().setStyle({border:'3px solid cyan;'});
newTextFormField.on('change', this.notifyChanges, this, true)
// this.inputElement().on('change', function() {alert("CHANGE");});
// this.inputElement().getElement('editComponent_input').on('change', function() {alert("CHANGE");})
// this.inputElement().on('blur', this.notifyChanges, this, true);
this.setInputElement(newTextFormField);
this.update();
},
'notifyChanges': function() {
//MochiKit.Logging.logDebug(">>> FieldLabelComponent.notifyChanges - " + this);
this.synchronizeComponentValues();
Clipperz.NotificationCenter.notify(this.recordField().recordVersion().record(), 'updatedFieldLabel');
//MochiKit.Logging.logDebug("<<< FieldLabelComponent.notifyChanges");
},
//-------------------------------------------------------------------------
'update': function() {
//MochiKit.Logging.logDebug(">>> FieldLabelComponent.update");
this.inputElement().update({editMode:this.editMode(), value:this.value()});
//MochiKit.Logging.logDebug("<<< FieldLabelComponent.update");
},
//-------------------------------------------------------------------------
/*
'updateViewMode': function() {
var width;
var element;
this.element().update("");
width = this.element().getWidth();
element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.value()}, true);
element.setWidth(width-1);
},
//-------------------------------------------------------------------------
'updateEditMode': function() {
var width;
this.element().update("");
width = this.element().getWidth(true);
this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', type:'text', value:this.value()}, true));
this.inputElement().setWidth(width-1);
},
*/
//-------------------------------------------------------------------------
'synchronizeComponentValues': function() {
if (this.inputElement() != null) {
this.recordField().setLabel(this.inputElement().value());
}
},
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js
index 489258a..3108885 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldTypeComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.FieldTypeComponent = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.RecordDetail.FieldTypeComponent.superclass.constructor.call(this, anElement, args);
this._inputElement = null;
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldTypeComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.FieldTypeComponent component";
},
//-------------------------------------------------------------------------
'inputElement': function() {
return this._inputElement;
},
'setInputElement': function(aValue) {
this._inputElement = aValue;
},
//-------------------------------------------------------------------------
'value': function() {
return this.recordField().type();
},
'canChangeType': function() {
var value;
var result;
value = this.value();
result = ((value == 'TXT') || (value == 'PWD') || (value == 'URL') || (value == 'DATE') || (value == 'ADDR'));
return result
},
//-------------------------------------------------------------------------
'updateViewMode': function() {
this.element().update("");
if (this.canChangeType()) {
var width;
var element;
width = this.element().getWidth(true);
element = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', html:this.recordField().typeShortDescription()}, true);
element.setWidth(width-1);
}
},
//-------------------------------------------------------------------------
'updateEditMode': function() {
this.element().update("");
if (this.canChangeType()) {
var width;
width = this.element().getWidth(true);
this.setInputElement(Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'select', children:[
{tag:'option', value:'TXT', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['TXT']['shortDescription']},
{tag:'option', value:'PWD', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['PWD']['shortDescription']},
{tag:'option', value:'URL', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['URL']['shortDescription']},
{tag:'option', value:'DATE', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['DATE']['shortDescription']},
{tag:'option', value:'ADDR', htmlString:Clipperz.PM.Strings['recordFieldTypologies']['ADDR']['shortDescription']}
// {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['CHECK']['shortDescription']},
// {tag:'option', value:'RADIO', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['RADIO']['shortDescription']},
// {tag:'option', value:'CHECK', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['SELECT']['shortDescription']}
// {tag:'option', value:'NOTE', html:Clipperz.PM.DataModel.RecordField.TypeDescriptions['NOTE']['shortDescription']}
]}, true));
this.inputElement().setWidth(width-1);
this.inputElement().addHandler('change', true, this.onChange, this, true);
// this.selectCorrectOption();
Clipperz.DOM.selectOptionMatchingValue(this.inputElement().dom, this.value());
}
},
//-------------------------------------------------------------------------
'onChange': function() {
this.synchronizeComponentValues();
this.fieldComponent().valueComponent().handleTypeChange();
},
//-------------------------------------------------------------------------
/*
'selectCorrectOption': function() {
var options;
var i,c;
options = this.inputElement().getChildrenByTagName('option');
c = options.length;
for (i=0; i<c; i++) {
if (options[i].dom.value == this.value()) {
options[i].dom.selected = true;
}
}
},
*/
//-------------------------------------------------------------------------
'synchronizeComponentValues': function() {
if (this.inputElement() != null) {
this.recordField().setType(this.inputElement().dom.value);
}
},
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js
index 8621397..f2c70aa 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/FieldValueComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.FieldValueComponent = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.RecordDetail.FieldValueComponent.superclass.constructor.call(this, anElement, args);
this._inputElement = null;
this._scrambledStatus = 'SCRAMBLED'; // 'UNSCRAMBLED'
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.FieldValueComponent, Clipperz.PM.Components.RecordDetail.AbstractFieldSubComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.FieldValueComponent component";
},
//-------------------------------------------------------------------------
'value': function() {
return this.recordField().value();
},
'setValue': function(aValue) {
this.recordField().setValue(aValue);
},
//-------------------------------------------------------------------------
'inputElement': function() {
return this._inputElement;
},
'setInputElement': function(aValue) {
this._inputElement = aValue;
},
//-------------------------------------------------------------------------
'scrambledStatus': function() {
return this._scrambledStatus;
},
'setScrambledStatus': function(aValue) {
this._scrambledStatus = aValue;
},
//-------------------------------------------------------------------------
'handleTypeChange': function() {
//MochiKit.Logging.logDebug(">>> handling type change - " + this.recordField().type());
this.synchronizeComponentValues();
this.update();
},
//-------------------------------------------------------------------------
'addrUrl': function() {
var result;
result = "http://maps.google.com/maps?q=" + this.value().split(' ').join('+');
return result;
},
//-------------------------------------------------------------------------
'updateViewMode': function() {
var scarmbledStatus;
scrambledStatus = this.scrambledStatus() || 'SCRAMBLED';
this.element().update("");
if (this.recordField().hidden() == false) {
switch(this.recordField().type()) {
case 'TXT':
case 'PWD':
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()});
break;
case 'URL':
var urlLocation;
urlLocation = Clipperz.Base.sanitizeString(this.value());
if (! (/^(https?|ftp|svn):\/\//.test(urlLocation))) {
urlLocation = 'http://' + urlLocation;
}
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'a', href:urlLocation, html:this.value(), target:'_blank'});
break;
case 'DATE':
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', html:this.value()});
break;
case 'ADDR':
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'a', href:this.addrUrl(), html:this.value(), target:'_blank'});
break;
}
} else {
var tableElement;
var tdElement;
var inputElement;
var passwordElementConfiguration;
if (scrambledStatus == 'SCRAMBLED') {
var scrambledInputElement;
if ((Clipperz_IEisBroken === true) && (Clipperz.PM.Proxy.defaultProxy.isReadOnly())) {
scrambledInputElement = {tag:'input', type:'password', value:"this.value()"};
} else {
scrambledInputElement = {tag:'input', type:'text', cls:'scrambledField', title:Clipperz.PM.Strings['recordDetailPasswordFieldTooltipLabel'], value:"this.value()"};
}
passwordElementConfiguration =
{tag:'table', border:'0', cellspacing:'2', cellpadding:'0', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js
index 46f456b..4f12c88 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/HeaderComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.HeaderComponent = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.RecordDetail.HeaderComponent.superclass.constructor.call(this, anElement, args);
this.mainComponent().addEditComponent(this);
this._saveButton = null;
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.HeaderComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.HeaderComponent component";
},
//-------------------------------------------------------------------------
'render': function() {
var editButton;
//MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.appendTo");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'recordDetailButtonsBox', children:[
{tag:'div', id:this.getId('editButtonBox'), children:[
{tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', align:'center', children:[
{tag:'div', id:this.getId('editButton')}
]}
]}
]}
]}
]},
{tag:'div', id:this.getId('saveCancelButtonBox'), children:[
{tag:'table', cls:'recordDetailButtonsTABLE', border:'0', cellpadding:'0', cellspacing:'0', children:[
{tag:'tbody', children:[
{tag:'tr', children:[
{tag:'td', width:'49%', align:'right', children:[
{tag:'div', id:this.getId('saveButton')}
]},
{tag:'td', html:'&nbsp'},
{tag:'td', width:'49%', align:'left', children:[
{tag:'div', id:this.getId('cancelButton')}
]}
]}
]}
]}
]}
]});
this.getElement('editButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
this.getElement('saveCancelButtonBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
editButton = new YAHOO.ext.Button(this.getDom('editButton'), {text:Clipperz.PM.Strings['recordDetailEditButtonLabel'], handler:this.editButtonHandler, scope:this});
this.setSaveButton(new YAHOO.ext.Button(this.getDom('saveButton'), {text:Clipperz.PM.Strings['recordDetailSaveButtonLabel'], handler:this.saveButtonHandler, scope:this}));
new YAHOO.ext.Button(this.getDom('cancelButton'), {text:Clipperz.PM.Strings['recordDetailCancelButtonLabel'], handler:this.cancelButtonHandler, scope:this});
if (Clipperz.PM.Proxy.defaultProxy.isReadOnly()) {
editButton.disable();
}
this.update();
//MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.appendTo");
},
//-------------------------------------------------------------------------
'updateViewMode': function() {
//MochiKit.Logging.logDebug(">>> HeaderComponent.updateViewMode");
this.getElement('editButtonBox').show();
this.getElement('saveCancelButtonBox').hide();
//MochiKit.Logging.logDebug("<<< HeaderComponent.updateViewMode");
},
//-------------------------------------------------------------------------
'updateEditMode': function() {
this.getElement('editButtonBox').hide();
this.getElement('saveCancelButtonBox').show();
if (this.mainComponent().enableSaveButton() == true) {
//MochiKit.Logging.logDebug("--- HeaderComponent.updateViewMode - ENABLE");
this.saveButton().enable();
} else {
this.saveButton().disable();
}
},
//-------------------------------------------------------------------------
'saveButton': function() {
return this._saveButton;
},
'setSaveButton': function(aValue) {
this._saveButton = aValue;
},
//-------------------------------------------------------------------------
'editButtonHandler': function(anEvent) {
this.mainComponent().setEditMode('EDIT');
},
//-------------------------------------------------------------------------
'saveButtonHandler': function(anEvent) {
//MochiKit.Logging.logDebug(">>> RecordDetail.HeaderComponent.saveButtonHandler");
this.mainComponent().setEditMode('VIEW', this.getElement('saveButton'));
//MochiKit.Logging.logDebug("<<< RecordDetail.HeaderComponent.saveButtonHandler");
},
//-------------------------------------------------------------------------
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js
index d6a03d7..47ed3e6 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/MainComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.MainComponent = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.RecordDetail.MainComponent.superclass.constructor.call(this, anElement, args);
// this._element = args.element;
this._user = args.user;
this._editMode = args.editMode || 'VIEW'; // [ 'VIEW' | 'EDIT' ]
this._mainPanel = args.mainPanel;
this._record = null;
this._editComponents = [];
this._addFieldButton = null;
this._enableSaveButton = true;
this._shouldShowLoginInfo = (Clipperz.PM.Proxy.defaultProxy.isReadOnly() ? false : true);
// this._mainLayoutManager = null;
// this._layoutRegion = null;
Clipperz.NotificationCenter.register(null, 'loadingRecordData', this, 'render');
Clipperz.NotificationCenter.register(null, 'decryptingRecordData', this, 'render');
Clipperz.NotificationCenter.register(null, 'loadingRecordVersionData', this, 'render');
Clipperz.NotificationCenter.register(null, 'decryptingRecordVersionData', this, 'render');
Clipperz.NotificationCenter.register(null, 'setupDone', this, 'render');
Clipperz.NotificationCenter.register(null, 'switchLanguage', this, 'render');
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.MainComponent, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.MainComponent component";
},
//-------------------------------------------------------------------------
'editMode': function() {
return this._editMode;
},
'setEditMode': function(aValue, aButtonElement, shouldSkipComponentSynchronization) {
//MochiKit.Logging.logDebug(">>> MainComponent.setEditingMode");
this.scrollToTop();
if (aValue == 'VIEW') {
if (shouldSkipComponentSynchronization == true) {
this.exitModalView();
} else {
this.synchronizeComponentValues();
if (this.record().hasPendingChanges()) {
if (this.record().isBrandNew()) {
this.record().removeEmptyFields();
}
this.saveCurrentRecordChanges(aButtonElement);
} else {
if (this.record().isBrandNew()) {
this.record().user().removeRecord(this.record());
}
this.exitModalView();
}
}
} else if (aValue == 'EDIT') {
this.enterModalView();
} else {
// ????
}
this._editMode = aValue;
this.render();
},
//-------------------------------------------------------------------------
'user': function() {
return this._user;
},
//-------------------------------------------------------------------------
'mainPanel': function() {
return this._mainPanel;
},
//-------------------------------------------------------------------------
'render': function() {
//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.render");
this.setEnableSaveButton(true);
this.element().update("");
if (this.record() == null) {
if (MochiKit.Base.keys(this.user().records()).length == 0) {
this.renderWithNoRecordAtAll();
} else {
this.renderWithNoSelectedRecord();
}
} else {
this.renderWithSelectedRecord();
}
//MochiKit.Logging.logDebug("<<< RecordDetail.MainComponent.render");
},
//-------------------------------------------------------------------------
'renderWithNoRecordAtAll': function() {
//MochiKit.Logging.logDebug(">>> RecordDetail.MainComponent.renderWithNoRecordAtAll");
Clipperz.YUI.DomHelper.append(this.element().dom,
{tag:'form', cls:'noRecordAtAllFORM', children:[
{tag:'div', cls:'recordTitleBlock', children:[
{tag:'h2', id:'recordTitle', htmlString:Clipperz.PM.Strings['recordDetailNoRecordAtAllTitle']}
]},
{tag:'table', border:'0', cellspacing:'0', cellpadding:'0', children:[
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js
index 2066543..bb23e8d 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/NotesComponent.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.NotesComponent = function(anElement, args) {
//MochiKit.Logging.logDebug(">>> new NotesComponent");
args = args || {};
Clipperz.PM.Components.RecordDetail.NotesComponent.superclass.constructor.call(this, anElement, args);
this.mainComponent().addEditComponent(this);
this._staticOffset = null;
this._componentHeight = 50;
this._mouseMoveIdentifier = null;
this._mouseUpIdentifier = null;
this.element().setVisibilityMode(YAHOO.ext.Element.DISPLAY);
this.render();
//MochiKit.Logging.logDebug("<<< new NotesComponent");
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.NotesComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.NotesComponent component";
},
//-------------------------------------------------------------------------
'value': function() {
return this.record().notes();
},
'setValue': function(aValue) {
this.record().setNotes(aValue);
},
//-------------------------------------------------------------------------
'render': function() {
//MochiKit.Logging.logDebug(">>> NotesComponent.render");
/*
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:'5', children:[
{tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']},
{tag:'div', cls:'noteFieldContent', id:this.getId('notes')}
]});
*/
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'span', cls:'noteFieldLabel', htmlString:Clipperz.PM.Strings['recordDetailNotesLabel']});
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', cls:'noteFieldContent', id:this.getId('notes'), children:[
{tag:'div', id:this.getId('resizableDiv'), cls:'resizable-textarea', children:[
{tag:'div', id:this.getId('contentView'), cls:'viewMode', html:""},
{tag:'div', id:this.getId('contentEdit'), children:[
{tag:'span', children:[
{tag:'textarea', id:this.getId('textarea'), html:""}
]}
]},
{tag:'div', id:this.getId('grippie'), cls:'grippie'}
]}
]});
this.getElement('contentView').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
this.getElement('contentEdit').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
MochiKit.Signal.connect(this.getId('grippie'), 'onmousedown', this, 'startResize');
this.update();
//MochiKit.Logging.logDebug("<<< NotesComponent.render");
},
//-------------------------------------------------------------------------
'updateViewMode': function() {
//MochiKit.Logging.logDebug(">>> NotesComponent.updateViewMode");
// this.getElement('notes').update(this.value().replace(/\n/g, '<br>'));
this.getElement('contentView').update(Clipperz.Base.sanitizeString(this.value()).replace(/\n/g, '<br>'));
if (this.isNoteEmpty()) {
this.element().hide();
} else {
this.getElement('contentView').show();
this.getElement('contentView').setHeight(this.componentHeight());
}
this.getElement('contentEdit').hide();
//MochiKit.Logging.logDebug("<<< NotesComponent.updateViewMode");
},
//-------------------------------------------------------------------------
'updateEditMode': function() {
//MochiKit.Logging.logDebug(">>> NotesComponent.updateEditMode");
this.getDom('textarea').value = this.value().replace(/\n/g, Clipperz_normalizedNewLine);
this.getElement('contentView').hide();
this.getElement('contentEdit').show();
this.getElement('textarea').setHeight(this.componentHeight());
//MochiKit.Logging.logDebug("<<< NotesComponent.updateEditMode");
},
//-------------------------------------------------------------------------
'synchronizeComponentValues': function() {
//MochiKit.Logging.logDebug(">>> NotesComponent.synchronizeComponentValues");
if (this.getElement('textarea') != null) {
this.setValue(this.getDom('textarea').value.replace(/(\x0a\x0d|\x0d\x0a)/g,'\n'));
}
//MochiKit.Logging.logDebug("<<< NotesComponent.synchronizeComponentValues");
},
//-------------------------------------------------------------------------
'componentHeight': function() {
diff --git a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js
index 29fe972..d114eaa 100644
--- a/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js
+++ b/frontend/beta/js/Clipperz/PM/Components/RecordDetail/TitleComponent.js
@@ -1,134 +1,132 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; }
//#############################################################################
Clipperz.PM.Components.RecordDetail.TitleComponent = function(anElement, args) {
args = args || {};
Clipperz.PM.Components.RecordDetail.TitleComponent.superclass.constructor.call(this, anElement, args);
// this._inputElement = null;
this.mainComponent().addEditComponent(this);
this.render();
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.RecordDetail.TitleComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, {
'toString': function() {
return "Clipperz.PM.Components.RecordDetail.TitleComponent component";
},
//-------------------------------------------------------------------------
'value': function() {
return this.record().label();
},
'setValue': function(aValue) {
this.record().setLabel(aValue);
},
//-------------------------------------------------------------------------
/*
'inputElement': function() {
return this._inputElement;
},
'setInputElement': function(aValue) {
this._inputElement = aValue;
},
*/
//-------------------------------------------------------------------------
'render': function() {
// Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:'&#160'});
// Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', colspan:"3", html:'&#160', children:[
// {tag:'div', /*style:'border: 1px solid green;',*/ id:this.getId('title')}
// ]});
// Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'td', html:'&#160'});
//
// this.setInputElement(new Clipperz.PM.Components.TextFormField(this.getElement('title'), {editMode:this.editMode(), value:this.value()}));
this.update();
},
//-------------------------------------------------------------------------
/*
'update': function() {
this.inputElement().update({value:this.value(), editMode:this.editMode()});
},
*/
//-------------------------------------------------------------------------
'updateViewMode': function() {
this.element().update("");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'h2', html:this.value()});
},
//-------------------------------------------------------------------------
'updateEditMode': function() {
//MochiKit.Logging.logDebug(">>> TitleComponent.updateEditMode");
// this.getElement('title').update("");
// Clipperz.YUI.DomHelper.append(this.getDom('title'), {tag:'div', id:this.getId('title_input')});
// this.setInputElement(Clipperz.YUI.DomHelper.append(this.getDom('title_input'), {tag:'input', type:'text', value:this.value()}, true));
this.element().update("");
Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'input', id:this.getId('titleField'), type:'text', value:"this.value()"});
this.getElement('titleField').dom.value = this.value();
//MochiKit.Logging.logDebug("<<< TitleComponent.updateEditMode");
},
//-------------------------------------------------------------------------
'synchronizeComponentValues': function() {
var inputElement;
//MochiKit.Logging.logDebug(">>> TitleComponent.synchronizeComponentValues");
inputElement = this.element().getChildrenByTagName('input')[0];
if (inputElement != null) {
this.setValue(inputElement.dom.value);
}
//MochiKit.Logging.logDebug("<<< TitleComponent.synchronizeComponentValues");
},
//-------------------------------------------------------------------------
__syntaxFix__: "syntax fix"
});
diff --git a/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js b/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js
index b300ba6..d30f514 100644
--- a/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js
+++ b/frontend/beta/js/Clipperz/PM/Components/TabPanel/TabPanelController.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
if (typeof(Clipperz.PM.Components.TabPanel) == 'undefined') { Clipperz.PM.Components.TabPanel = {}; }
Clipperz.PM.Components.TabPanel.TabPanelController = function(args) {
args = args || {};
Clipperz.PM.Components.TabPanel.TabPanelController.superclass.constructor.call(this);
this._name = args.name || 'undefined';
this._config = args.config;
this._selectedTab = args.selectedTab || ((MochiKit.Base.keys(args.config).length > 0) ? MochiKit.Base.keys(args.config)[0] : null);
this._tabs = {};
this._panels = {};
Clipperz.NotificationCenter.register(null, 'selectTab', this, 'handleSelectTabNotification');
return this;
}
//=============================================================================
YAHOO.extendX(Clipperz.PM.Components.TabPanel.TabPanelController, YAHOO.ext.util.Observable, {
//-------------------------------------------------------------------------
'name': function() {
return this._name;
},
//-------------------------------------------------------------------------
'tabs': function() {
return this._tabs;
},
//-------------------------------------------------------------------------
'panels': function() {
return this._panels;
},
//-------------------------------------------------------------------------
'config': function() {
return this._config;
},
//-------------------------------------------------------------------------
'selectedTab': function() {
return this._selectedTab;
},
'setSelectedTab': function(aValue) {
this._selectedTab = aValue;
},
//-------------------------------------------------------------------------
'setUp': function() {
var tabId;
//MochiKit.Logging.logDebug(">>> TabPanelController.setUp - config: " + Clipperz.Base.serializeJSON(this.config()));
for (tabId in this.config()) {
var tabElement;
var panelElement;
//MochiKit.Logging.logDebug("--- TabPanelController.setUp - tabId: " + tabId);
//MochiKit.Logging.logDebug("--- TabPanelController.setUp - panelId: " + this.config()[tabId]);
tabElement = YAHOO.ext.Element.get(tabId);
tabElement.addClassOnOver("hover");
MochiKit.Signal.connect(tabId, 'onclick', this, 'selectTabHandler');
panelElement = YAHOO.ext.Element.get(this.config()[tabId]);
this._tabs[tabId] = tabElement;
this._panels[tabId] = panelElement;
if (tabId == this.selectedTab()) {
tabElement.addClass('selectedTab');
panelElement.addClass('selectedPanel');
} else {
panelElement.addClass('hiddenPanel');
}
}
//MochiKit.Logging.logDebug("<<< TabPanelController.setUp");
},
//-------------------------------------------------------------------------
'selectTab': function(aTab) {
if (aTab != this.selectedTab()) {
this.tabs()[this.selectedTab()].removeClass('selectedTab');
this.panels()[this.selectedTab()].removeClass('selectedPanel').addClass('hiddenPanel');
this.tabs()[aTab].addClass('selectedTab');
this.panels()[aTab].addClass('selectedPanel').removeClass('hiddenPanel');
this.setSelectedTab(aTab);
Clipperz.NotificationCenter.notify(this, 'tabSelected', aTab);
}
},
//-------------------------------------------------------------------------
'selectTabHandler': function(anEvent) {
this.selectTab(anEvent.src().id);
},
//-------------------------------------------------------------------------
'handleSelectTabNotification': function(aNotificationEvent) {
var parameters;
var splittedParamters;
var targetTabPanel;
parameters = aNotificationEvent.parameters();
splittedParamters = parameters.split('.');
targetTabPanel = splittedParamters[0];
if (targetTabPanel == this.name()) {
this.selectTab(splittedParamters[1])
}
diff --git a/frontend/beta/js/Clipperz/PM/Components/TextFormField.js b/frontend/beta/js/Clipperz/PM/Components/TextFormField.js
index c6f0349..2b383ce 100644
--- a/frontend/beta/js/Clipperz/PM/Components/TextFormField.js
+++ b/frontend/beta/js/Clipperz/PM/Components/TextFormField.js
@@ -1,150 +1,148 @@
/*
-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/.
*/
if (typeof(Clipperz) == 'undefined') { Clipperz = {}; }
if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; }
if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; }
Clipperz.PM.Components.TextFormField = function(anElement, args) {
args = args || {};
//MochiKit.Logging.logDebug(">>> new TextFormField");
Clipperz.PM.Components.TextFormField.superclass.constructor.call(this, args);
this._element = anElement;
this._editMode = args.editMode || 'VIEW';
this._value = args.value || "";
this._inputElement = null;
this._wrapper = null;
this._multiline = args.multiline || false;
// this.multiline = args.multiline || true;
// this.editing = true;
// this.completeOnBlur = true;
// this.autoSizeTask = new YAHOO.ext.util.DelayedTask(this.autoSize, this);
// this.textSizeEl = Clipperz.YUI.DomHelper.append(document.body, {
// tag: 'div',
// cls: 'yinline-editor-sizer ' + (this.cls || '')
// });
this.render();
//MochiKit.Logging.logDebug("<<< new TextFormField");
return this;
};
YAHOO.extendX(Clipperz.PM.Components.TextFormField, Clipperz.PM.Components.BaseComponent, {
'toString': function() {
return "Clipperz.PM.Components.TextFormField";
},
//-----------------------------------------------------
'value': function() {
if (this.inputElement() != null) {
this._value = this.inputElement().dom.value;
}
return this._value;
// return this.inlineEditor().getValue();
},
'setValue': function(aValue) {
this._value = aValue;
// this.getElement('viewComponent_Content').update(aValue);
// this.inlineEditor().setValue(aValue);
},
//-----------------------------------------------------
'multiline': function() {
return this._multiline;
},
//-----------------------------------------------------
'editMode': function() {
return this._editMode;
},
'setEditMode': function(aValue) {
this._editMode = aValue;
},
//-----------------------------------------------------
'inputElement': function() {
return this._inputElement;
},
'setInputElement': function(aValue) {
this._inputElement = aValue;
},
//-----------------------------------------------------
'on': function(anEventName, anHandler, aScope, shouldOverride) {
//MochiKit.Logging.logDebug(">>> TextFormField.on - inputElement: " + this.inputElement());
return this.inputElement().on(anEventName, anHandler, aScope, shouldOverride);
//MochiKit.Logging.logDebug("<<< TextFormField.on - inputElement: " + this.inputElement());
},
//-----------------------------------------------------
'wrapper': function() {
return this._wrapper;
},
//-----------------------------------------------------
'render': function() {
var editModeConfiguration;
var viewModeConfiguration;
editModeConfiguration = {tag:'div', id:this.getId('editComponent'), children:[]};
if (this.multiline() == false) {
editModeConfiguration.children.push({tag:'input', type:'text', id:this.getId('editComponent_input'), value:"this.value(1)"});
} else {
editModeConfiguration.children.push({tag:'textarea', id:this.getId('editComponent_input'), html:"this.value(2)"});
}
viewModeConfiguration = {tag:'div', id:this.getId('viewComponent'), /*style:'border: 1px solid blue;',*/ children:[
{tag:'span', id:this.getId('viewComponent_Content'), html:this.value()}
]}
//MochiKit.Logging.logDebug(">>> TextFormField.render");
this._wrapper = Clipperz.YUI.DomHelper.append(this.element().dom, {tag:'div', id:this.getId('wrapper'), children:[
{tag:'div', id:this.getId('editModeBox'), children:[editModeConfiguration]},
{tag:'div', id:this.getId('viewModeBox'), children:[viewModeConfiguration]}
]}, true);
this.getElement('editModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
this.getElement('viewModeBox').setVisibilityMode(YAHOO.ext.Element.DISPLAY);
this.getElement('editComponent_input').dom.value = this.value();
this.setInputElement(this.getElement('editComponent_input'));
this.update();