summaryrefslogtreecommitdiff
path: root/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js
Side-by-side diff
Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js') (more/less context) (ignore whitespace changes)
-rw-r--r--frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js34
1 files changed, 12 insertions, 22 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js
index 8f8696d..507ee31 100644
--- a/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js
+++ b/frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js
@@ -1,30 +1,28 @@
/*
-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.DataModel');
Clipperz.PM.DataModel.DirectLogin = function(args) {
args = args || {};
@@ -324,17 +322,17 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
'_fixConfiguration': function (aConfiguration) {
var fixedConfiguration;
// var inputs;
// var bindings;
// var i,c;
fixedConfiguration = Clipperz.Base.deepClone(aConfiguration);
-//console.log("PROCESS CONFIGURATION", aConfiguration);
+//Clipperz.log("PROCESS CONFIGURATION", aConfiguration);
switch (aConfiguration['bookmarkletVersion']) {
case '0.1':
fixedConfiguration['formData'] = this.fixFormDataFromBookmarkletVersion_0_1(aConfiguration['formData']);
break;
case '0.2':
fixedConfiguration['formData'] = aConfiguration['formData'];
break;
}
@@ -476,20 +474,19 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
},
//-------------------------------------------------------------------------
'setBookmarkletConfiguration': function (aValue) {
var bookmarkletConfiguration;
bookmarkletConfiguration = Clipperz.PM.DataModel.DirectLogin.checkBookmarkletConfiguration(aValue);
-//console.log("BOOKMARKLET CONFIGURATION", bookmarkletConfiguration);
+
return Clipperz.Async.callbacks("DirectLogin.setBookmarkletConfiguration", [
MochiKit.Base.method(this, 'setValue', 'formData', bookmarkletConfiguration['form']),
-//function (aValue) { console.log("SET VALUE - formData", aValue); return aValue; },
MochiKit.Base.method(this, 'setValue', 'bookmarkletVersion', bookmarkletConfiguration['version']),
MochiKit.Base.method(this, 'favicon'),
Clipperz.Async.deferredIf("the favicon is not set", [
], [
MochiKit.Base.method(this, 'faviconUrlWithBookmarkletConfiguration', bookmarkletConfiguration),
MochiKit.Base.method(this, 'setFavicon')
]),
@@ -531,31 +528,27 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
}, this));
}
return this._inputs;
},
'updateInputsAfterChangingBookmarkletConfiguration': function () {
return Clipperz.Async.callbacks("DirectLogin.updateInputsAfterChangingBookmarkletConfiguration", [
-// MochiKit.Base.method(this, 'getValue', ''),
-//function (aValue) { console.log("VALUE", aValue); return aValue },
MochiKit.Base.method(this, 'getValue', 'formData'),
-//function (aValue) { console.log("FORM DATA", aValue); return aValue },
MochiKit.Base.method(this, 'setInputWithFormDataConfiguration')
], {trace:false});
},
//=========================================================================
'inputValues': function () {
return Clipperz.Async.callbacks("DirectLogin.inputValues", [
MochiKit.Base.method(this, 'inputs'),
MochiKit.Base.values,
-//function (aValue) { console.log("INPUTS", aValue); return aValue; },
MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.partial(MochiKit.Base.method(this, 'inputValue'))),
Clipperz.Async.collectAll,
Clipperz.Base.mergeItems
], {trace:false});
},
'inputValue': function (anInput) {
var deferredResult;
@@ -669,29 +662,26 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, {
newBindingValues[anInput.name()] = availableBindingValues[anInput.name()];
newBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, {
'key': anInput.name(),
'field': availableBindingValues[anInput.name()]
});
this._bindings[anInput.name()] = newBinding;
}, this))
-//console.log("THIS._BINDINGS", this._bindings);
return newBindingValues;
/*
this._bindings = {};
-//console.log("CONFIGURATION", aConfiguration);
if (someValues['currentValues'] != null) {
if (someValues['currentValues']['bindingData'] != null) {
var bindingKey;
-//console.log("BINDING DATA", someValues['currentValues']['bindingData']);
for (bindingKey in someValues['currentValues']['bindingData']) {
var newBinding;
newBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, {
'key': bindingKey,
'field': someValues['currentValues']['bindingData'][bindingKey]
});
this._bindings[newBinding.key()] = newBinding;