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/MessageBox.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/MessageBox.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/PM/Components/MessageBox.js | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/frontend/beta/js/Clipperz/PM/Components/MessageBox.js b/frontend/beta/js/Clipperz/PM/Components/MessageBox.js index cf9ec86..f9b845e 100644 --- a/frontend/beta/js/Clipperz/PM/Components/MessageBox.js +++ b/frontend/beta/js/Clipperz/PM/Components/MessageBox.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 | 27 | ||
30 | 28 | ||
31 | 29 | ||
32 | Clipperz.PM.Components.MessageBoxImplementation = function() { | 30 | Clipperz.PM.Components.MessageBoxImplementation = function() { |
33 | this._step = 0; | 31 | this._step = 0; |
34 | this._steps = 0; | 32 | this._steps = 0; |
35 | 33 | ||
36 | return this; | 34 | return this; |
37 | }; | 35 | }; |
38 | 36 | ||
39 | //YAHOO.extendX(Clipperz.PM.Components.MessageBoxImplementation, Clipperz.PM.Components.BaseComponent, { | 37 | //YAHOO.extendX(Clipperz.PM.Components.MessageBoxImplementation, Clipperz.PM.Components.BaseComponent, { |
40 | Clipperz.PM.Components.MessageBoxImplementation.prototype = MochiKit.Base.update(null, { | 38 | Clipperz.PM.Components.MessageBoxImplementation.prototype = MochiKit.Base.update(null, { |
41 | 39 | ||
42 | 'toString': function() { | 40 | 'toString': function() { |
43 | return "Clipperz.PM.Components.MessageBox"; | 41 | return "Clipperz.PM.Components.MessageBox"; |
44 | }, | 42 | }, |
45 | 43 | ||
46 | //----------------------------------------------------- | 44 | //----------------------------------------------------- |
47 | 45 | ||
48 | 'step': function() { | 46 | 'step': function() { |
49 | return this._step; | 47 | return this._step; |
50 | }, | 48 | }, |
51 | 49 | ||
52 | 'setStep': function(aValue) { | 50 | 'setStep': function(aValue) { |
53 | if (aValue == 'next') { | 51 | if (aValue == 'next') { |
54 | this._step = this._step + 1; | 52 | this._step = this._step + 1; |
55 | } else { | 53 | } else { |
56 | this._step = aValue; | 54 | this._step = aValue; |
57 | } | 55 | } |
58 | 56 | ||
59 | if (this._step > this.steps()) { | 57 | if (this._step > this.steps()) { |
60 | //MochiKit.Logging.logDebug("overstepping: " + this._step + " (" + this.steps() + ")"); | 58 | //MochiKit.Logging.logDebug("overstepping: " + this._step + " (" + this.steps() + ")"); |
61 | this._step = this.steps(); | 59 | this._step = this.steps(); |
62 | } | 60 | } |
63 | }, | 61 | }, |
64 | 62 | ||
65 | //----------------------------------------------------- | 63 | //----------------------------------------------------- |
66 | 64 | ||
67 | 'steps': function() { | 65 | 'steps': function() { |
68 | return this._steps; | 66 | return this._steps; |
69 | }, | 67 | }, |
70 | 68 | ||
71 | 'setSteps': function(aValue) { | 69 | 'setSteps': function(aValue) { |
72 | if (aValue.constructor == String) { | 70 | if (aValue.constructor == String) { |
73 | if (aValue.charAt(0) == '+') { | 71 | if (aValue.charAt(0) == '+') { |
74 | this._steps += aValue.substring(1)*1; | 72 | this._steps += aValue.substring(1)*1; |
75 | } else if (aValue.charAt(0) == '-') { | 73 | } else if (aValue.charAt(0) == '-') { |
76 | this._steps -= aValue.substring(1)*1; | 74 | this._steps -= aValue.substring(1)*1; |
77 | } else { | 75 | } else { |
78 | this._steps = aValue.substring(1)*1; | 76 | this._steps = aValue.substring(1)*1; |
79 | } | 77 | } |
80 | } else { | 78 | } else { |
81 | this._steps = aValue; | 79 | this._steps = aValue; |
82 | } | 80 | } |
83 | }, | 81 | }, |
84 | 82 | ||
85 | //----------------------------------------------------- | 83 | //----------------------------------------------------- |
86 | 84 | ||
87 | 'deferredShow': function(aConfiguration, anAnimationTargetElement, aValue) { | 85 | 'deferredShow': function(aConfiguration, anAnimationTargetElement, aValue) { |
88 | this.show(aConfiguration, anAnimationTargetElement); | 86 | this.show(aConfiguration, anAnimationTargetElement); |
89 | 87 | ||
90 | return aValue; | 88 | return aValue; |
91 | }, | 89 | }, |
92 | 90 | ||
93 | 'show': function(aConfiguration, anAnimationTargetElement) { | 91 | 'show': function(aConfiguration, anAnimationTargetElement) { |
94 | varmessageBoxConfiguration; | 92 | varmessageBoxConfiguration; |
95 | 93 | ||
96 | messageBoxConfiguration = MochiKit.Base.clone(aConfiguration); | 94 | messageBoxConfiguration = MochiKit.Base.clone(aConfiguration); |
97 | messageBoxConfiguration.msg = messageBoxConfiguration.text; | 95 | messageBoxConfiguration.msg = messageBoxConfiguration.text; |
98 | messageBoxConfiguration.animEl = anAnimationTargetElement; | 96 | messageBoxConfiguration.animEl = anAnimationTargetElement; |
99 | messageBoxConfiguration.progress = messageBoxConfiguration.showProgressBar; | 97 | messageBoxConfiguration.progress = messageBoxConfiguration.showProgressBar; |
100 | messageBoxConfiguration.closable = messageBoxConfiguration.showCloseButton; | 98 | messageBoxConfiguration.closable = messageBoxConfiguration.showCloseButton; |
101 | this.setSteps(aConfiguration.steps || 0); | 99 | this.setSteps(aConfiguration.steps || 0); |
102 | this.setStep(aConfiguration.step || 0); | 100 | this.setStep(aConfiguration.step || 0); |
103 | delete messageBoxConfiguration.buttons; | 101 | delete messageBoxConfiguration.buttons; |
104 | 102 | ||
105 | Clipperz.YUI.MessageBox.show(messageBoxConfiguration); | 103 | Clipperz.YUI.MessageBox.show(messageBoxConfiguration); |
106 | }, | 104 | }, |
107 | 105 | ||
108 | //----------------------------------------------------- | 106 | //----------------------------------------------------- |
109 | 107 | ||
110 | 'update': function(someValues) { | 108 | 'update': function(someValues) { |
111 | //MochiKit.Logging.logDebug(">>> MessageBox.update"); | 109 | //MochiKit.Logging.logDebug(">>> MessageBox.update"); |
112 | if (someValues.title) { | 110 | if (someValues.title) { |
113 | Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title); | 111 | Clipperz.YUI.MessageBox.getDialog().setTitle(someValues.title); |
114 | }; | 112 | }; |
115 | 113 | ||
116 | if (someValues.text) { | 114 | if (someValues.text) { |
117 | Clipperz.YUI.MessageBox.updateText(someValues.text); | 115 | Clipperz.YUI.MessageBox.updateText(someValues.text); |
118 | }; | 116 | }; |