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/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.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/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/PM/Components/RecordDetail/DirectLoginsComponent.js | 22 |
1 files changed, 10 insertions, 12 deletions
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,118 +1,116 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 24 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
27 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } | 25 | if (typeof(Clipperz.PM) == 'undefined') { Clipperz.PM = {}; } |
28 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } | 26 | if (typeof(Clipperz.PM.Components) == 'undefined') { Clipperz.PM.Components = {}; } |
29 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } | 27 | if (typeof(Clipperz.PM.Components.RecordDetail) == 'undefined') { Clipperz.PM.Components.RecordDetail = {}; } |
30 | 28 | ||
31 | //############################################################################# | 29 | //############################################################################# |
32 | 30 | ||
33 | Clipperz.PM.Components.RecordDetail.DirectLoginsComponent = function(anElement, args) { | 31 | Clipperz.PM.Components.RecordDetail.DirectLoginsComponent = function(anElement, args) { |
34 | //MochiKit.Logging.logDebug(">>> new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); | 32 | //MochiKit.Logging.logDebug(">>> new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); |
35 | args = args || {}; | 33 | args = args || {}; |
36 | 34 | ||
37 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 0"); | 35 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 0"); |
38 | Clipperz.PM.Components.RecordDetail.DirectLoginsComponent.superclass.constructor.call(this, anElement, args); | 36 | Clipperz.PM.Components.RecordDetail.DirectLoginsComponent.superclass.constructor.call(this, anElement, args); |
39 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 1"); | 37 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 1"); |
40 | 38 | ||
41 | this._addDirectLoginButton = null; | 39 | this._addDirectLoginButton = null; |
42 | 40 | ||
43 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 2"); | 41 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 2"); |
44 | this.mainComponent().addEditComponent(this); | 42 | this.mainComponent().addEditComponent(this); |
45 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 3"); | 43 | //MochiKit.Logging.logDebug("--- new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent - 3"); |
46 | this.render(); | 44 | this.render(); |
47 | //MochiKit.Logging.logDebug("<<< new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); | 45 | //MochiKit.Logging.logDebug("<<< new Clipperz.PM.Components.RecordDetail.DirectLoginsComponent"); |
48 | 46 | ||
49 | return this; | 47 | return this; |
50 | } | 48 | } |
51 | 49 | ||
52 | //============================================================================= | 50 | //============================================================================= |
53 | 51 | ||
54 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginsComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { | 52 | YAHOO.extendX(Clipperz.PM.Components.RecordDetail.DirectLoginsComponent, Clipperz.PM.Components.RecordDetail.AbstractComponent, { |
55 | 53 | ||
56 | 'toString': function() { | 54 | 'toString': function() { |
57 | return "Clipperz.PM.Components.RecordDetail.DirectLoginsComponent component"; | 55 | return "Clipperz.PM.Components.RecordDetail.DirectLoginsComponent component"; |
58 | }, | 56 | }, |
59 | 57 | ||
60 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
61 | 59 | ||
62 | 'addDirectLoginButton': function() { | 60 | 'addDirectLoginButton': function() { |
63 | return this._addDirectLoginButton; | 61 | return this._addDirectLoginButton; |
64 | }, | 62 | }, |
65 | 63 | ||
66 | 'setAddDirectLoginButton': function(aValue) { | 64 | 'setAddDirectLoginButton': function(aValue) { |
67 | this._addDirectLoginButton = aValue; | 65 | this._addDirectLoginButton = aValue; |
68 | }, | 66 | }, |
69 | 67 | ||
70 | //------------------------------------------------------------------------- | 68 | //------------------------------------------------------------------------- |
71 | 69 | ||
72 | 'render': function() { | 70 | 'render': function() { |
73 | this.element().update(""); | 71 | this.element().update(""); |
74 | 72 | ||
75 | Clipperz.YUI.DomHelper.append(this.element().dom, | 73 | Clipperz.YUI.DomHelper.append(this.element().dom, |
76 | {tag:'div', cls:'directLoginsRecordBox', children:[ | 74 | {tag:'div', cls:'directLoginsRecordBox', children:[ |
77 | {tag:'h3', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockTitle']}, | 75 | {tag:'h3', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockTitle']}, |
78 | {tag:'ul', id:this.getId('directLogins')}, | 76 | {tag:'ul', id:this.getId('directLogins')}, |
79 | 77 | ||
80 | {tag:'div', cls:'addDirectLoginBox', id:this.getId('addDirectLogin'), children:[ | 78 | {tag:'div', cls:'addDirectLoginBox', id:this.getId('addDirectLogin'), children:[ |
81 | {tag:'div', cls:'addDirectLoginBoxContent', children:[ | 79 | {tag:'div', cls:'addDirectLoginBoxContent', children:[ |
82 | {tag:'div', cls:'bookmarkletConfiguration', children:[ | 80 | {tag:'div', cls:'bookmarkletConfiguration', children:[ |
83 | // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']}, | 81 | // {tag:'span', htmlString:Clipperz.PM.Strings['newRecordWizardBookmarkletConfigurationLabel']}, |
84 | {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']}, | 82 | {tag:'div', htmlString:Clipperz.PM.Strings['recordDetailNewDirectLoginDescription']}, |
85 | {tag:'textarea', id:this.getId('addDirectLoginTextarea')} | 83 | {tag:'textarea', id:this.getId('addDirectLoginTextarea')} |
86 | ]}, | 84 | ]}, |
87 | {tag:'div', id:this.getId('addDirectLoginButton')} | 85 | {tag:'div', id:this.getId('addDirectLoginButton')} |
88 | ]} | 86 | ]} |
89 | ]} | 87 | ]} |
90 | ]} | 88 | ]} |
91 | ); | 89 | ); |
92 | 90 | ||
93 | if (MochiKit.Base.keys(this.record().directLogins()).length == 0) { | 91 | if (MochiKit.Base.keys(this.record().directLogins()).length == 0) { |
94 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 3"); | 92 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 3"); |
95 | Clipperz.YUI.DomHelper.append(this.getElement('directLogins'), | 93 | Clipperz.YUI.DomHelper.append(this.getElement('directLogins'), |
96 | {tag:'li', children:[ | 94 | {tag:'li', children:[ |
97 | // {tag:'span', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredLabel']} | 95 | // {tag:'span', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredLabel']} |
98 | {tag:'div', cls:'recordDetailNoDirectLoginDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription']} | 96 | {tag:'div', cls:'recordDetailNoDirectLoginDescriptionBox', htmlString:Clipperz.PM.Strings['recordDetailDirectLoginBlockNoDirectLoginConfiguredDescription']} |
99 | ]} | 97 | ]} |
100 | ); | 98 | ); |
101 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 4"); | 99 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 4"); |
102 | } else { | 100 | } else { |
103 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 5"); | 101 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 5"); |
104 | for (directLoginReference in this.record().directLogins()) { | 102 | for (directLoginReference in this.record().directLogins()) { |
105 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 6"); | 103 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 6"); |
106 | this.addDirectLogin(this.record().directLogins()[directLoginReference]); | 104 | this.addDirectLogin(this.record().directLogins()[directLoginReference]); |
107 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 7"); | 105 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 7"); |
108 | } | 106 | } |
109 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 8"); | 107 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 8"); |
110 | } | 108 | } |
111 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 9"); | 109 | //MochiKit.Logging.logDebug("--- DirectLoginsComponent.render - 9"); |
112 | 110 | ||
113 | this.setAddDirectLoginButton(new YAHOO.ext.Button(this.getDom('addDirectLoginButton'), { | 111 | this.setAddDirectLoginButton(new YAHOO.ext.Button(this.getDom('addDirectLoginButton'), { |
114 | text:Clipperz.PM.Strings['recordDetailAddNewDirectLoginButtonLabel'], | 112 | text:Clipperz.PM.Strings['recordDetailAddNewDirectLoginButtonLabel'], |
115 | handler:this.addNewDirectLogin, | 113 | handler:this.addNewDirectLogin, |
116 | scope:this | 114 | scope:this |
117 | })); | 115 | })); |
118 | MochiKit.Signal.connect(this.getId('addDirectLoginTextarea'), 'onkeydown', this, 'onkeydown'); | 116 | MochiKit.Signal.connect(this.getId('addDirectLoginTextarea'), 'onkeydown', this, 'onkeydown'); |