summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js
Side-by-side diff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js') (more/less context) (show whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js23
1 files changed, 10 insertions, 13 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js
index effde31..b1ff81f 100644
--- a/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js
+++ b/frontend/gamma/js/Clipperz/PM/UI/Web/Controllers/CardDialogController.js
@@ -1,46 +1,44 @@
/*
-Copyright 2008-2011 Clipperz Srl
+Copyright 2008-2013 Clipperz Srl
-This file is part of Clipperz Community Edition.
-Clipperz Community Edition is an online password manager.
+This file is part of Clipperz, the online password manager.
For further information about its features and functionalities please
refer to http://www.clipperz.com.
-* Clipperz Community Edition is free software: you can redistribute
- it and/or modify it under the terms of the GNU Affero General Public
- License as published by the Free Software Foundation, either version
- 3 of the License, or (at your option) any later version.
+* Clipperz is free software: you can redistribute it and/or modify it
+ under the terms of the GNU Affero General Public License as published
+ by the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
-* Clipperz Community Edition is distributed in the hope that it will
- be useful, but WITHOUT ANY WARRANTY; without even the implied
- warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
+* Clipperz is distributed in the hope that it will be useful, but
+ WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU Affero General Public License for more details.
* You should have received a copy of the GNU Affero General Public
- License along with Clipperz Community Edition. If not, see
- <http://www.gnu.org/licenses/>.
+ License along with Clipperz. If not, see http://www.gnu.org/licenses/.
*/
Clipperz.Base.module('Clipperz.PM.UI.Web.Controllers');
Clipperz.PM.UI.Web.Controllers.CardDialogController = function(args) {
args = args || {};
Clipperz.PM.UI.Web.Controllers.CardDialogController.superclass.constructor.call(this, args);
this._record = args.record || Clipperz.Base.exception.raise('MandatoryParameter');
this._delegate = args.delegate || Clipperz.Base.exception.raise('MandatoryParameter');
this._referenceElement = null;
this._cardDialogComponent = null;
this._fieldsReferences = {};
this._directLoginReferences = {};
this._directLoginWizardController = null;
this._directLoginEditingComponent = null;
this._isDirectLoginEditingComponentVisible = false;
return this;
@@ -353,49 +351,48 @@ Clipperz.Base.extend(Clipperz.PM.UI.Web.Controllers.CardDialogController, Object
'addField': function () {
return this.record().addField({
'label':this.cardDialogComponent().newFieldLabel(),
'value':this.cardDialogComponent().newFieldValue(),
'isHidden':this.cardDialogComponent().newFieldIsHidden()
});
},
'handleAddField': function () {
return Clipperz.Async.callbacks("CardDialogController.handleAddField", [
MochiKit.Base.method(this, 'addField'),
MochiKit.Base.method(this, 'addCardDialogComponentWithField'),
MochiKit.Base.method(this.cardDialogComponent(), 'resetNewFieldInputs'),
MochiKit.Base.method(this.cardDialogComponent(), 'fixRendering'),
MochiKit.Base.method(this, 'handleChangedValue')
], {trace:false})
},
//-------------------------------------------------------------------------
'handlePerformFieldAction': function (aFieldID, aTargetElement) {
-//console.log("### targetElement", aTargetElement);
return Clipperz.Async.callbacks("CardDialogController.handleDeleteField", [
MochiKit.Base.method(this.record(), 'fields'),
MochiKit.Base.itemgetter(aFieldID),
Clipperz.Async.collectResults("CardDialogController.handleDeleteField <collect results>", {
'value': MochiKit.Base.methodcaller('value'),
'type': MochiKit.Base.methodcaller('actionType')
}, {trace:false}),
MochiKit.Base.bind(function (someValues) {
switch (someValues['type']) {
case 'NONE':
throw "this event handler should not be triggered for fields with type 'NONE'";
break;
case 'URL':
var url;
url = someValues['value'];
if (/^https?\:\/\//.test(url) == false) {
url = 'http://' + url;
}
window.open(url);
break;
case 'EMAIL':
var url;