author | Clipperz <info@clipperz.com> | 2013-01-31 13:42:04 (UTC) |
---|---|---|
committer | Clipperz <info@clipperz.com> | 2013-01-31 13:42:04 (UTC) |
commit | 07d0357beef5d9328a2dd8d07ad7b39c87ac55e4 (patch) (unidiff) | |
tree | f7a4aed8848302db153c2a211f8e58b944eb4c5b /frontend/gamma/js/Clipperz/PM/DataModel/DirectLogin.js | |
parent | 767a3dcf48b6ac911c088af5dd7738a728eb6b99 (diff) | |
download | clipperz-07d0357beef5d9328a2dd8d07ad7b39c87ac55e4.zip clipperz-07d0357beef5d9328a2dd8d07ad7b39c87ac55e4.tar.gz clipperz-07d0357beef5d9328a2dd8d07ad7b39c87ac55e4.tar.bz2 |
Updated Copyright claims
- updated reference dates;
- removed reference to Community Edition;
- normalized logging using Clipperz.log[Warn|Error|Debug]
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.js | 34 |
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,46 +1,44 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz Community Edition. | 5 | This file is part of Clipperz, the online password manager. |
6 | Clipperz Community Edition is an online password manager. | ||
7 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
8 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
9 | 8 | ||
10 | * Clipperz Community Edition is free software: you can redistribute | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
11 | it and/or modify it under the terms of the GNU Affero General Public | 10 | under the terms of the GNU Affero General Public License as published |
12 | License as published by the Free Software Foundation, either version | 11 | by the Free Software Foundation, either version 3 of the License, or |
13 | 3 of the License, or (at your option) any later version. | 12 | (at your option) any later version. |
14 | 13 | ||
15 | * Clipperz Community Edition is distributed in the hope that it will | 14 | * Clipperz is distributed in the hope that it will be useful, but |
16 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
18 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
19 | 18 | ||
20 | * You should have received a copy of the GNU Affero General Public | 19 | * You should have received a copy of the GNU Affero General Public |
21 | License along with Clipperz Community Edition. If not, see | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
22 | <http://www.gnu.org/licenses/>. | ||
23 | 21 | ||
24 | */ | 22 | */ |
25 | 23 | ||
26 | Clipperz.Base.module('Clipperz.PM.DataModel'); | 24 | Clipperz.Base.module('Clipperz.PM.DataModel'); |
27 | 25 | ||
28 | Clipperz.PM.DataModel.DirectLogin = function(args) { | 26 | Clipperz.PM.DataModel.DirectLogin = function(args) { |
29 | args = args || {}; | 27 | args = args || {}; |
30 | 28 | ||
31 | Clipperz.PM.DataModel.DirectLogin.superclass.constructor.apply(this, arguments); | 29 | Clipperz.PM.DataModel.DirectLogin.superclass.constructor.apply(this, arguments); |
32 | 30 | ||
33 | this._reference =args.reference | 31 | this._reference =args.reference |
34 | ||Clipperz.PM.Crypto.randomKey(); | 32 | ||Clipperz.PM.Crypto.randomKey(); |
35 | this._record =args.record | 33 | this._record =args.record |
36 | ||Clipperz.Base.exception.raise('MandatoryParameter'); | 34 | ||Clipperz.Base.exception.raise('MandatoryParameter'); |
37 | 35 | ||
38 | this._retrieveIndexDataFunction = args.retrieveIndexDataFunction | 36 | this._retrieveIndexDataFunction = args.retrieveIndexDataFunction |
39 | ||this.record().retrieveDirectLoginIndexDataFunction() | 37 | ||this.record().retrieveDirectLoginIndexDataFunction() |
40 | ||Clipperz.Base.exception.raise('MandatoryParameter'); | 38 | ||Clipperz.Base.exception.raise('MandatoryParameter'); |
41 | this._setIndexDataFunction = args.setIndexDataFunction | 39 | this._setIndexDataFunction = args.setIndexDataFunction |
42 | ||this.record().setDirectLoginIndexDataFunction() | 40 | ||this.record().setDirectLoginIndexDataFunction() |
43 | ||Clipperz.Base.exception.raise('MandatoryParameter'); | 41 | ||Clipperz.Base.exception.raise('MandatoryParameter'); |
44 | this._removeIndexDataFunction =args.removeIndexDataFunction | 42 | this._removeIndexDataFunction =args.removeIndexDataFunction |
45 | ||this.record().removeDirectLoginIndexDataFunction() | 43 | ||this.record().removeDirectLoginIndexDataFunction() |
46 | ||Clipperz.Base.exception.raise('MandatoryParameter'); | 44 | ||Clipperz.Base.exception.raise('MandatoryParameter'); |
@@ -308,49 +306,49 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, { | |||
308 | 306 | ||
309 | //TODO: shoud remove the 'formValues' call, as it is now deferred | 307 | //TODO: shoud remove the 'formValues' call, as it is now deferred |
310 | // if ((aRadio['checked'] == true) && (this.formValues()[aRadio['name']] == null)) { | 308 | // if ((aRadio['checked'] == true) && (this.formValues()[aRadio['name']] == null)) { |
311 | // this.formValues()[aRadio['name']] = aRadio['value']; | 309 | // this.formValues()[aRadio['name']] = aRadio['value']; |
312 | // } | 310 | // } |
313 | }, this)) | 311 | }, this)) |
314 | 312 | ||
315 | updatedInputs = MochiKit.Base.concat(updatedInputs, MochiKit.Base.values(updatedRadios)); | 313 | updatedInputs = MochiKit.Base.concat(updatedInputs, MochiKit.Base.values(updatedRadios)); |
316 | } | 314 | } |
317 | 315 | ||
318 | delete result.inputs; | 316 | delete result.inputs; |
319 | result.inputs = updatedInputs; | 317 | result.inputs = updatedInputs; |
320 | 318 | ||
321 | return result; | 319 | return result; |
322 | }, | 320 | }, |
323 | 321 | ||
324 | '_fixConfiguration': function (aConfiguration) { | 322 | '_fixConfiguration': function (aConfiguration) { |
325 | var fixedConfiguration; | 323 | var fixedConfiguration; |
326 | // var inputs; | 324 | // var inputs; |
327 | // var bindings; | 325 | // var bindings; |
328 | // var i,c; | 326 | // var i,c; |
329 | 327 | ||
330 | fixedConfiguration = Clipperz.Base.deepClone(aConfiguration); | 328 | fixedConfiguration = Clipperz.Base.deepClone(aConfiguration); |
331 | 329 | ||
332 | //console.log("PROCESS CONFIGURATION", aConfiguration); | 330 | //Clipperz.log("PROCESS CONFIGURATION", aConfiguration); |
333 | switch (aConfiguration['bookmarkletVersion']) { | 331 | switch (aConfiguration['bookmarkletVersion']) { |
334 | case '0.1': | 332 | case '0.1': |
335 | fixedConfiguration['formData'] = this.fixFormDataFromBookmarkletVersion_0_1(aConfiguration['formData']); | 333 | fixedConfiguration['formData'] = this.fixFormDataFromBookmarkletVersion_0_1(aConfiguration['formData']); |
336 | break; | 334 | break; |
337 | case '0.2': | 335 | case '0.2': |
338 | fixedConfiguration['formData'] = aConfiguration['formData']; | 336 | fixedConfiguration['formData'] = aConfiguration['formData']; |
339 | break; | 337 | break; |
340 | } | 338 | } |
341 | 339 | ||
342 | / * | 340 | / * |
343 | aConfiguration['_inputs'] = []; | 341 | aConfiguration['_inputs'] = []; |
344 | c = formData['inputs'].length; | 342 | c = formData['inputs'].length; |
345 | for (i=0; i<c; i++) { | 343 | for (i=0; i<c; i++) { |
346 | aConfiguration['_inputs'].push(new Clipperz.PM.DataModel.DirectLoginInput(formData['inputs'][i])); | 344 | aConfiguration['_inputs'].push(new Clipperz.PM.DataModel.DirectLoginInput(formData['inputs'][i])); |
347 | } | 345 | } |
348 | * / | 346 | * / |
349 | / * | 347 | / * |
350 | aConfiguration['_bindings'] = {}; | 348 | aConfiguration['_bindings'] = {}; |
351 | if (aConfiguration['legacyBindingData'] == null) { | 349 | if (aConfiguration['legacyBindingData'] == null) { |
352 | if (aConfiguration['bindingData'] != null) { | 350 | if (aConfiguration['bindingData'] != null) { |
353 | var bindingKey; | 351 | var bindingKey; |
354 | 352 | ||
355 | for (bindingKey in aConfiguration['bindingData']) { | 353 | for (bindingKey in aConfiguration['bindingData']) { |
356 | var newBinding; | 354 | var newBinding; |
@@ -460,52 +458,51 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, { | |||
460 | //'favicon' | 458 | //'favicon' |
461 | // 'url' | 459 | // 'url' |
462 | }, | 460 | }, |
463 | 'form': someValues['configuration']['formData'], | 461 | 'form': someValues['configuration']['formData'], |
464 | 'version':someValues['configuration']['bookmarkletVersion'] | 462 | 'version':someValues['configuration']['bookmarkletVersion'] |
465 | } | 463 | } |
466 | 464 | ||
467 | result = Clipperz.Base.formatJSON(configuration); | 465 | result = Clipperz.Base.formatJSON(configuration); |
468 | } else { | 466 | } else { |
469 | result = ''; | 467 | result = ''; |
470 | } | 468 | } |
471 | 469 | ||
472 | return result; | 470 | return result; |
473 | } | 471 | } |
474 | ], {trace:false}); | 472 | ], {trace:false}); |
475 | 473 | ||
476 | }, | 474 | }, |
477 | 475 | ||
478 | //------------------------------------------------------------------------- | 476 | //------------------------------------------------------------------------- |
479 | 477 | ||
480 | 'setBookmarkletConfiguration': function (aValue) { | 478 | 'setBookmarkletConfiguration': function (aValue) { |
481 | var bookmarkletConfiguration; | 479 | var bookmarkletConfiguration; |
482 | 480 | ||
483 | bookmarkletConfiguration = Clipperz.PM.DataModel.DirectLogin.checkBookmarkletConfiguration(aValue); | 481 | bookmarkletConfiguration = Clipperz.PM.DataModel.DirectLogin.checkBookmarkletConfiguration(aValue); |
484 | //console.log("BOOKMARKLET CONFIGURATION", bookmarkletConfiguration); | 482 | |
485 | return Clipperz.Async.callbacks("DirectLogin.setBookmarkletConfiguration", [ | 483 | return Clipperz.Async.callbacks("DirectLogin.setBookmarkletConfiguration", [ |
486 | MochiKit.Base.method(this, 'setValue', 'formData', bookmarkletConfiguration['form']), | 484 | MochiKit.Base.method(this, 'setValue', 'formData', bookmarkletConfiguration['form']), |
487 | //function (aValue) { console.log("SET VALUE - formData", aValue); return aValue; }, | ||
488 | MochiKit.Base.method(this, 'setValue', 'bookmarkletVersion', bookmarkletConfiguration['version']), | 485 | MochiKit.Base.method(this, 'setValue', 'bookmarkletVersion', bookmarkletConfiguration['version']), |
489 | 486 | ||
490 | MochiKit.Base.method(this, 'favicon'), | 487 | MochiKit.Base.method(this, 'favicon'), |
491 | Clipperz.Async.deferredIf("the favicon is not set", [ | 488 | Clipperz.Async.deferredIf("the favicon is not set", [ |
492 | ], [ | 489 | ], [ |
493 | MochiKit.Base.method(this, 'faviconUrlWithBookmarkletConfiguration', bookmarkletConfiguration), | 490 | MochiKit.Base.method(this, 'faviconUrlWithBookmarkletConfiguration', bookmarkletConfiguration), |
494 | MochiKit.Base.method(this, 'setFavicon') | 491 | MochiKit.Base.method(this, 'setFavicon') |
495 | ]), | 492 | ]), |
496 | 493 | ||
497 | MochiKit.Base.method(this, 'updateInputsAfterChangingBookmarkletConfiguration'), | 494 | MochiKit.Base.method(this, 'updateInputsAfterChangingBookmarkletConfiguration'), |
498 | MochiKit.Base.method(this, 'updateFormValuesAfterChangingBookmarkletConfiguration'), | 495 | MochiKit.Base.method(this, 'updateFormValuesAfterChangingBookmarkletConfiguration'), |
499 | MochiKit.Base.method(this, 'updateBindingsAfterChangingBookmarkletConfiguration'), | 496 | MochiKit.Base.method(this, 'updateBindingsAfterChangingBookmarkletConfiguration'), |
500 | 497 | ||
501 | MochiKit.Base.noop | 498 | MochiKit.Base.noop |
502 | ], {trace:false}); | 499 | ], {trace:false}); |
503 | }, | 500 | }, |
504 | 501 | ||
505 | //========================================================================= | 502 | //========================================================================= |
506 | 503 | ||
507 | 'formAttributes': function () { | 504 | 'formAttributes': function () { |
508 | return this.getValue('formData.attributes'); | 505 | return this.getValue('formData.attributes'); |
509 | }, | 506 | }, |
510 | 507 | ||
511 | //========================================================================= | 508 | //========================================================================= |
@@ -515,63 +512,59 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, { | |||
515 | Clipperz.Async.deferredIf("this._inputs is defined", [ | 512 | Clipperz.Async.deferredIf("this._inputs is defined", [ |
516 | ], [ | 513 | ], [ |
517 | MochiKit.Base.method(this, 'updateInputsAfterChangingBookmarkletConfiguration') | 514 | MochiKit.Base.method(this, 'updateInputsAfterChangingBookmarkletConfiguration') |
518 | ]) | 515 | ]) |
519 | ], {trace:false}, this._inputs); | 516 | ], {trace:false}, this._inputs); |
520 | }, | 517 | }, |
521 | 518 | ||
522 | 'setInputWithFormDataConfiguration': function (aFormDataConfiguration) { | 519 | 'setInputWithFormDataConfiguration': function (aFormDataConfiguration) { |
523 | this._inputs = {}; | 520 | this._inputs = {}; |
524 | 521 | ||
525 | if (aFormDataConfiguration != null) { | 522 | if (aFormDataConfiguration != null) { |
526 | MochiKit.Iter.forEach(aFormDataConfiguration['inputs'], MochiKit.Base.bind(function (anInputData) { | 523 | MochiKit.Iter.forEach(aFormDataConfiguration['inputs'], MochiKit.Base.bind(function (anInputData) { |
527 | var newInput; | 524 | var newInput; |
528 | 525 | ||
529 | newInput = new Clipperz.PM.DataModel.DirectLoginInput(anInputData); | 526 | newInput = new Clipperz.PM.DataModel.DirectLoginInput(anInputData); |
530 | this._inputs[newInput.name()] = newInput; | 527 | this._inputs[newInput.name()] = newInput; |
531 | }, this)); | 528 | }, this)); |
532 | } | 529 | } |
533 | 530 | ||
534 | return this._inputs; | 531 | return this._inputs; |
535 | }, | 532 | }, |
536 | 533 | ||
537 | 'updateInputsAfterChangingBookmarkletConfiguration': function () { | 534 | 'updateInputsAfterChangingBookmarkletConfiguration': function () { |
538 | return Clipperz.Async.callbacks("DirectLogin.updateInputsAfterChangingBookmarkletConfiguration", [ | 535 | return Clipperz.Async.callbacks("DirectLogin.updateInputsAfterChangingBookmarkletConfiguration", [ |
539 | // MochiKit.Base.method(this, 'getValue', ''), | ||
540 | //function (aValue) { console.log("VALUE", aValue); return aValue }, | ||
541 | MochiKit.Base.method(this, 'getValue', 'formData'), | 536 | MochiKit.Base.method(this, 'getValue', 'formData'), |
542 | //function (aValue) { console.log("FORM DATA", aValue); return aValue }, | ||
543 | MochiKit.Base.method(this, 'setInputWithFormDataConfiguration') | 537 | MochiKit.Base.method(this, 'setInputWithFormDataConfiguration') |
544 | ], {trace:false}); | 538 | ], {trace:false}); |
545 | }, | 539 | }, |
546 | 540 | ||
547 | //========================================================================= | 541 | //========================================================================= |
548 | 542 | ||
549 | 'inputValues': function () { | 543 | 'inputValues': function () { |
550 | return Clipperz.Async.callbacks("DirectLogin.inputValues", [ | 544 | return Clipperz.Async.callbacks("DirectLogin.inputValues", [ |
551 | MochiKit.Base.method(this, 'inputs'), | 545 | MochiKit.Base.method(this, 'inputs'), |
552 | MochiKit.Base.values, | 546 | MochiKit.Base.values, |
553 | //function (aValue) { console.log("INPUTS", aValue); return aValue; }, | ||
554 | MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.partial(MochiKit.Base.method(this, 'inputValue'))), | 547 | MochiKit.Base.partial(MochiKit.Base.map, MochiKit.Base.partial(MochiKit.Base.method(this, 'inputValue'))), |
555 | Clipperz.Async.collectAll, | 548 | Clipperz.Async.collectAll, |
556 | Clipperz.Base.mergeItems | 549 | Clipperz.Base.mergeItems |
557 | ], {trace:false}); | 550 | ], {trace:false}); |
558 | }, | 551 | }, |
559 | 552 | ||
560 | 'inputValue': function (anInput) { | 553 | 'inputValue': function (anInput) { |
561 | vardeferredResult; | 554 | vardeferredResult; |
562 | 555 | ||
563 | deferredResult = new Clipperz.Async.Deferred("DirectLogin.inputValue", {trace:false}); | 556 | deferredResult = new Clipperz.Async.Deferred("DirectLogin.inputValue", {trace:false}); |
564 | 557 | ||
565 | if (anInput.needsFormValue()) { | 558 | if (anInput.needsFormValue()) { |
566 | deferredResult.addMethod(this, 'formValues'); | 559 | deferredResult.addMethod(this, 'formValues'); |
567 | deferredResult.addCallback(MochiKit.Base.itemgetter(anInput.name())); | 560 | deferredResult.addCallback(MochiKit.Base.itemgetter(anInput.name())); |
568 | deferredResult.addMethodcaller('value'); | 561 | deferredResult.addMethodcaller('value'); |
569 | } else if (anInput.needsBinding()) { | 562 | } else if (anInput.needsBinding()) { |
570 | deferredResult.addMethod(this, 'bindings'); | 563 | deferredResult.addMethod(this, 'bindings'); |
571 | deferredResult.addCallback(MochiKit.Base.itemgetter(anInput.name())); | 564 | deferredResult.addCallback(MochiKit.Base.itemgetter(anInput.name())); |
572 | deferredResult.addMethodcaller('field'); | 565 | deferredResult.addMethodcaller('field'); |
573 | deferredResult.addMethodcaller('value'); | 566 | deferredResult.addMethodcaller('value'); |
574 | } else { | 567 | } else { |
575 | deferredResult.addCallback(MochiKit.Async.succeed, anInput.value()); | 568 | deferredResult.addCallback(MochiKit.Async.succeed, anInput.value()); |
576 | } | 569 | } |
577 | deferredResult.addCallback(function (anActualValue) { | 570 | deferredResult.addCallback(function (anActualValue) { |
@@ -653,61 +646,58 @@ Clipperz.Base.extend(Clipperz.PM.DataModel.DirectLogin, Object, { | |||
653 | 646 | ||
654 | if (MochiKit.Base.isUndefinedOrNull(someValues['originalValues']) || MochiKit.Base.isUndefinedOrNull(someValues['originalValues']['bindingData'])) { | 647 | if (MochiKit.Base.isUndefinedOrNull(someValues['originalValues']) || MochiKit.Base.isUndefinedOrNull(someValues['originalValues']['bindingData'])) { |
655 | availableBindingValues = {}; | 648 | availableBindingValues = {}; |
656 | } else { | 649 | } else { |
657 | availableBindingValues = Clipperz.Base.deepClone(someValues['originalValues']['bindingData']) | 650 | availableBindingValues = Clipperz.Base.deepClone(someValues['originalValues']['bindingData']) |
658 | } | 651 | } |
659 | 652 | ||
660 | if (someValues['currentValues'] != null) { | 653 | if (someValues['currentValues'] != null) { |
661 | MochiKit.Base.update(availableBindingValues, someValues['currentValues']['bindingData']); | 654 | MochiKit.Base.update(availableBindingValues, someValues['currentValues']['bindingData']); |
662 | } | 655 | } |
663 | 656 | ||
664 | this._bindings = {}; | 657 | this._bindings = {}; |
665 | newBindingValues = {} | 658 | newBindingValues = {} |
666 | MochiKit.Iter.forEach(MochiKit.Base.filter(MochiKit.Base.methodcaller('needsBinding'), MochiKit.Base.values(someValues['inputs'])), MochiKit.Base.bind(function (anInput) { | 659 | MochiKit.Iter.forEach(MochiKit.Base.filter(MochiKit.Base.methodcaller('needsBinding'), MochiKit.Base.values(someValues['inputs'])), MochiKit.Base.bind(function (anInput) { |
667 | varnewBinding; | 660 | varnewBinding; |
668 | 661 | ||
669 | newBindingValues[anInput.name()] = availableBindingValues[anInput.name()]; | 662 | newBindingValues[anInput.name()] = availableBindingValues[anInput.name()]; |
670 | newBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, { | 663 | newBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, { |
671 | 'key': anInput.name(), | 664 | 'key': anInput.name(), |
672 | 'field':availableBindingValues[anInput.name()] | 665 | 'field':availableBindingValues[anInput.name()] |
673 | }); | 666 | }); |
674 | 667 | ||
675 | this._bindings[anInput.name()] = newBinding; | 668 | this._bindings[anInput.name()] = newBinding; |
676 | }, this)) | 669 | }, this)) |
677 | //console.log("THIS._BINDINGS", this._bindings); | ||
678 | 670 | ||
679 | return newBindingValues; | 671 | return newBindingValues; |
680 | 672 | ||
681 | /* | 673 | /* |
682 | this._bindings = {}; | 674 | this._bindings = {}; |
683 | //console.log("CONFIGURATION", aConfiguration); | ||
684 | 675 | ||
685 | if (someValues['currentValues'] != null) { | 676 | if (someValues['currentValues'] != null) { |
686 | if (someValues['currentValues']['bindingData'] != null) { | 677 | if (someValues['currentValues']['bindingData'] != null) { |
687 | var bindingKey; | 678 | var bindingKey; |
688 | 679 | ||
689 | //console.log("BINDING DATA", someValues['currentValues']['bindingData']); | ||
690 | for (bindingKey in someValues['currentValues']['bindingData']) { | 680 | for (bindingKey in someValues['currentValues']['bindingData']) { |
691 | var newBinding; | 681 | var newBinding; |
692 | 682 | ||
693 | newBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, { | 683 | newBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, { |
694 | 'key': bindingKey, | 684 | 'key': bindingKey, |
695 | 'field':someValues['currentValues']['bindingData'][bindingKey] | 685 | 'field':someValues['currentValues']['bindingData'][bindingKey] |
696 | }); | 686 | }); |
697 | this._bindings[newBinding.key()] = newBinding; | 687 | this._bindings[newBinding.key()] = newBinding; |
698 | } | 688 | } |
699 | } else if (someValues['currentValues']['legacyBindingData'] == null) { | 689 | } else if (someValues['currentValues']['legacyBindingData'] == null) { |
700 | var bindingKey; | 690 | var bindingKey; |
701 | 691 | ||
702 | for (bindingKey in someValues['currentValues']['legacyBindingData']) { | 692 | for (bindingKey in someValues['currentValues']['legacyBindingData']) { |
703 | var newBinding; | 693 | var newBinding; |
704 | 694 | ||
705 | newBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, { | 695 | newBinding = new Clipperz.PM.DataModel.DirectLoginBinding(this, { |
706 | 'key': bindingKey, | 696 | 'key': bindingKey, |
707 | 'field':someValues['currentValues']['legacyBindingData'][bindingKey] | 697 | 'field':someValues['currentValues']['legacyBindingData'][bindingKey] |
708 | }); | 698 | }); |
709 | this._bindings[newBinding.key()] = newBinding; | 699 | this._bindings[newBinding.key()] = newBinding; |
710 | } | 700 | } |
711 | } else { | 701 | } else { |
712 | WTF = TODO; | 702 | WTF = TODO; |
713 | } | 703 | } |