author | Michael Krelin <hacker@klever.net> | 2014-06-30 18:20:13 (UTC) |
---|---|---|
committer | Michael Krelin <hacker@klever.net> | 2014-06-30 18:20:13 (UTC) |
commit | c392fe28606eefa0c814e5c25d641f5ffe623186 (patch) (unidiff) | |
tree | da03fe13ca09fadbebbad9b5d38750757270bae8 /frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js | |
parent | d341307d346dee62ee36b27f0f93b8f000748a96 (diff) | |
parent | 6dd16d9359e3a4dc306802588b09acd43947a606 (diff) | |
download | clipperz-c392fe28606eefa0c814e5c25d641f5ffe623186.zip clipperz-c392fe28606eefa0c814e5c25d641f5ffe623186.tar.gz clipperz-c392fe28606eefa0c814e5c25d641f5ffe623186.tar.bz2 |
Merge remote-tracking branch 'github/master' into nmaster
Diffstat (limited to 'frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js') (more/less context) (show whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js index 236d7c9..ba302da 100644 --- a/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js +++ b/frontend/beta/js/Clipperz/PM/DataModel/DirectLoginReference.js | |||
@@ -2,97 +2,97 @@ | |||
2 | 2 | ||
3 | Copyright 2008-2013 Clipperz Srl | 3 | Copyright 2008-2013 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz, the online password manager. | 5 | This file is part of Clipperz, the online password manager. |
6 | For further information about its features and functionalities please | 6 | For further information about its features and functionalities please |
7 | refer to http://www.clipperz.com. | 7 | refer to http://www.clipperz.com. |
8 | 8 | ||
9 | * Clipperz is free software: you can redistribute it and/or modify it | 9 | * Clipperz is free software: you can redistribute it and/or modify it |
10 | under the terms of the GNU Affero General Public License as published | 10 | under the terms of the GNU Affero General Public License as published |
11 | by the Free Software Foundation, either version 3 of the License, or | 11 | by the Free Software Foundation, either version 3 of the License, or |
12 | (at your option) any later version. | 12 | (at your option) any later version. |
13 | 13 | ||
14 | * Clipperz is distributed in the hope that it will be useful, but | 14 | * Clipperz is distributed in the hope that it will be useful, but |
15 | WITHOUT ANY WARRANTY; without even the implied warranty of | 15 | WITHOUT ANY WARRANTY; without even the implied warranty of |
16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
17 | See the GNU Affero General Public License for more details. | 17 | See the GNU Affero General Public License for more details. |
18 | 18 | ||
19 | * 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 |
20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. | 20 | License along with Clipperz. If not, see http://www.gnu.org/licenses/. |
21 | 21 | ||
22 | */ | 22 | */ |
23 | 23 | ||
24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
26 | if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } | 26 | if (typeof(Clipperz.PM.DataModel) == 'undefined') { Clipperz.PM.DataModel = {}; } |
27 | 27 | ||
28 | 28 | ||
29 | //############################################################################# | 29 | //############################################################################# |
30 | 30 | ||
31 | Clipperz.PM.DataModel.DirectLoginReference = function(args) { | 31 | Clipperz.PM.DataModel.DirectLoginReference = function(args) { |
32 | args = args || {}; | 32 | args = args || {}; |
33 | 33 | ||
34 | //MochiKit.Logging.logDebug(">>> new DirectLoginReference: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(args))); | 34 | //MochiKit.Logging.logDebug(">>> new DirectLoginReference: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(args))); |
35 | //MochiKit.Logging.logDebug(">>> new DirectLoginReference - record: " + args.record); | 35 | //MochiKit.Logging.logDebug(">>> new DirectLoginReference - record: " + args.record); |
36 | this._user = args.user; | 36 | this._user = args.user; |
37 | 37 | ||
38 | if (args.directLogin != null) { | 38 | if (args.directLogin != null) { |
39 | this._reference = args.directLogin.reference(); | 39 | this._reference = args.directLogin.reference(); |
40 | this._recordReference = args.directLogin.record().reference(); | 40 | this._recordReference = args.directLogin.record().reference(); |
41 | this._label = args.directLogin.label(); | 41 | this._label = args.directLogin.label(); |
42 | this._favicon = args.directLogin.favicon() || null; | 42 | this._favicon = args.directLogin.favicon() || null; |
43 | 43 | ||
44 | this._directLogin = args.directLogin; | 44 | this._directLogin = args.directLogin; |
45 | this._record = args.directLogin.record(); | 45 | this._record = args.directLogin.record(); |
46 | } else { | 46 | } else { |
47 | this._reference = args.reference; | 47 | this._reference = args.reference; |
48 | this._recordReference = args.record; | 48 | this._recordReference = args.record; |
49 | this._label = args.label; | 49 | this._label = args.label; |
50 | this._favicon = args.favicon || null; | 50 | this._favicon = Clipperz.Base.sanitizeFavicon(args.favicon) || null; |
51 | 51 | ||
52 | this._directLogin = null; | 52 | this._directLogin = null; |
53 | this._record = null; | 53 | this._record = null; |
54 | } | 54 | } |
55 | 55 | ||
56 | this._fixedFavicon = null; | 56 | this._fixedFavicon = null; |
57 | 57 | ||
58 | return this; | 58 | return this; |
59 | } | 59 | } |
60 | 60 | ||
61 | Clipperz.PM.DataModel.DirectLoginReference.prototype = MochiKit.Base.update(null, { | 61 | Clipperz.PM.DataModel.DirectLoginReference.prototype = MochiKit.Base.update(null, { |
62 | 62 | ||
63 | 'user': function() { | 63 | 'user': function() { |
64 | return this._user; | 64 | return this._user; |
65 | }, | 65 | }, |
66 | 66 | ||
67 | //------------------------------------------------------------------------- | 67 | //------------------------------------------------------------------------- |
68 | 68 | ||
69 | 'reference': function() { | 69 | 'reference': function() { |
70 | return this._reference; | 70 | return this._reference; |
71 | }, | 71 | }, |
72 | 72 | ||
73 | //------------------------------------------------------------------------- | 73 | //------------------------------------------------------------------------- |
74 | 74 | ||
75 | 'synchronizeValues': function(aDirectLogin) { | 75 | 'synchronizeValues': function(aDirectLogin) { |
76 | this._label = aDirectLogin.label(); | 76 | this._label = aDirectLogin.label(); |
77 | this._favicon = aDirectLogin.favicon(); | 77 | this._favicon = aDirectLogin.favicon(); |
78 | }, | 78 | }, |
79 | 79 | ||
80 | //------------------------------------------------------------------------- | 80 | //------------------------------------------------------------------------- |
81 | 81 | ||
82 | 'label': function() { | 82 | 'label': function() { |
83 | return this._label; | 83 | return this._label; |
84 | }, | 84 | }, |
85 | 85 | ||
86 | //------------------------------------------------------------------------- | 86 | //------------------------------------------------------------------------- |
87 | 87 | ||
88 | 'recordReference': function() { | 88 | 'recordReference': function() { |
89 | return this._recordReference; | 89 | return this._recordReference; |
90 | }, | 90 | }, |
91 | 91 | ||
92 | //------------------------------------------------------------------------- | 92 | //------------------------------------------------------------------------- |
93 | 93 | ||
94 | 'record': function() { | 94 | 'record': function() { |
95 | //MochiKit.Logging.logDebug(">>> DirectLoginReference.record"); | 95 | //MochiKit.Logging.logDebug(">>> DirectLoginReference.record"); |
96 | if (this._record == null) { | 96 | if (this._record == null) { |
97 | this._record = this.user().records()[this.recordReference()]; | 97 | this._record = this.user().records()[this.recordReference()]; |
98 | } | 98 | } |