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/DOM.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/DOM.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/DOM.js | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/frontend/gamma/js/Clipperz/DOM.js b/frontend/gamma/js/Clipperz/DOM.js index 8f24653..1d52a4b 100644 --- a/frontend/gamma/js/Clipperz/DOM.js +++ b/frontend/gamma/js/Clipperz/DOM.js | |||
@@ -1,38 +1,36 @@ | |||
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.DOM) == 'undefined') { Clipperz.DOM = {}; } | 25 | if (typeof(Clipperz.DOM) == 'undefined') { Clipperz.DOM = {}; } |
28 | 26 | ||
29 | Clipperz.DOM.VERSION = "0.1"; | 27 | Clipperz.DOM.VERSION = "0.1"; |
30 | Clipperz.DOM.NAME = "Clipperz.DOM"; | 28 | Clipperz.DOM.NAME = "Clipperz.DOM"; |
31 | 29 | ||
32 | MochiKit.Base.update(Clipperz.DOM, { | 30 | MochiKit.Base.update(Clipperz.DOM, { |
33 | 31 | ||
34 | //------------------------------------------------------------------------- | 32 | //------------------------------------------------------------------------- |
35 | 33 | ||
36 | '__repr__': function () { | 34 | '__repr__': function () { |
37 | return "[" + this.NAME + " " + this.VERSION + "]"; | 35 | return "[" + this.NAME + " " + this.VERSION + "]"; |
38 | }, | 36 | }, |
@@ -93,33 +91,33 @@ MochiKit.Base.update(Clipperz.DOM, { | |||
93 | MochiKit.Base.nodeWalk(node, function(aNode) { | 91 | MochiKit.Base.nodeWalk(node, function(aNode) { |
94 | var result; | 92 | var result; |
95 | var name; | 93 | var name; |
96 | 94 | ||
97 | result = null; | 95 | result = null; |
98 | name = aNode.name; | 96 | name = aNode.name; |
99 | if (MochiKit.Base.isNotEmpty(name) && (typeof(values[name]) != 'undefined')) { | 97 | if (MochiKit.Base.isNotEmpty(name) && (typeof(values[name]) != 'undefined')) { |
100 | var tagName; | 98 | var tagName; |
101 | 99 | ||
102 | tagName = aNode.tagName.toUpperCase(); | 100 | tagName = aNode.tagName.toUpperCase(); |
103 | if (tagName === "INPUT" && (aNode.type == "radio" || aNode.type == "checkbox")) { | 101 | if (tagName === "INPUT" && (aNode.type == "radio" || aNode.type == "checkbox")) { |
104 | aNode.checked = values[name]; | 102 | aNode.checked = values[name]; |
105 | } else if (tagName === "SELECT") { | 103 | } else if (tagName === "SELECT") { |
106 | if (aNode.type == "select-one") { | 104 | if (aNode.type == "select-one") { |
107 | Clipperz.DOM.selectOptionMatchingValue(aNode, values[name]); | 105 | Clipperz.DOM.selectOptionMatchingValue(aNode, values[name]); |
108 | } else { //aNode.type == "select-multiple" | 106 | } else { //aNode.type == "select-multiple" |
109 | MochiKit.Logging.logWarning("### unhandled Select.type = 'select-multiple' condition"); | 107 | Clipperz.logWarning("### unhandled Select.type = 'select-multiple' condition"); |
110 | } | 108 | } |
111 | } else if (tagName === "FORM" || tagName === "P" || tagName === "SPAN" || tagName === "DIV") { | 109 | } else if (tagName === "FORM" || tagName === "P" || tagName === "SPAN" || tagName === "DIV") { |
112 | result = aNode.childNodes; | 110 | result = aNode.childNodes; |
113 | } else { | 111 | } else { |
114 | aNode.value = values[name] | 112 | aNode.value = values[name] |
115 | } | 113 | } |
116 | } else { | 114 | } else { |
117 | result = aNode.childNodes; | 115 | result = aNode.childNodes; |
118 | } | 116 | } |
119 | 117 | ||
120 | return result; | 118 | return result; |
121 | }); | 119 | }); |
122 | }, | 120 | }, |
123 | 121 | ||
124 | //------------------------------------------------------------------------- | 122 | //------------------------------------------------------------------------- |
125 | 123 | ||