Diffstat (limited to 'frontend/gamma/js/Clipperz/PM/UI/Common/Components/MessagePanelWithProgressBar.js') (more/less context) (show whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/PM/UI/Common/Components/MessagePanelWithProgressBar.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/MessagePanelWithProgressBar.js b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/MessagePanelWithProgressBar.js index 275bbed..2788b79 100644 --- a/frontend/gamma/js/Clipperz/PM/UI/Common/Components/MessagePanelWithProgressBar.js +++ b/frontend/gamma/js/Clipperz/PM/UI/Common/Components/MessagePanelWithProgressBar.js | |||
@@ -1,120 +1,117 @@ | |||
1 | /* | 1 | /* |
2 | 2 | ||
3 | Copyright 2008-2011 Clipperz Srl | 3 | Copyright 2008-2011 Clipperz Srl |
4 | 4 | ||
5 | This file is part of Clipperz's Javascript Crypto Library. | 5 | This file is part of Clipperz Community Edition. |
6 | Javascript Crypto Library provides web developers with an extensive | 6 | Clipperz Community Edition is an online password manager. |
7 | and efficient set of cryptographic functions. The library aims to | ||
8 | obtain maximum execution speed while preserving modularity and | ||
9 | reusability. | ||
10 | For further information about its features and functionalities please | 7 | For further information about its features and functionalities please |
11 | refer to http://www.clipperz.com | 8 | refer to http://www.clipperz.com. |
12 | 9 | ||
13 | * Javascript Crypto Library is free software: you can redistribute | 10 | * Clipperz Community Edition is free software: you can redistribute |
14 | it and/or modify it under the terms of the GNU Affero General Public | 11 | it and/or modify it under the terms of the GNU Affero General Public |
15 | License as published by the Free Software Foundation, either version | 12 | License as published by the Free Software Foundation, either version |
16 | 3 of the License, or (at your option) any later version. | 13 | 3 of the License, or (at your option) any later version. |
17 | 14 | ||
18 | * Javascript Crypto Library is distributed in the hope that it will | 15 | * Clipperz Community Edition is distributed in the hope that it will |
19 | be useful, but WITHOUT ANY WARRANTY; without even the implied | 16 | be useful, but WITHOUT ANY WARRANTY; without even the implied |
20 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 17 | warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
21 | See the GNU Affero General Public License for more details. | 18 | See the GNU Affero General Public License for more details. |
22 | 19 | ||
23 | * You should have received a copy of the GNU Affero General Public | 20 | * You should have received a copy of the GNU Affero General Public |
24 | License along with Javascript Crypto Library. If not, see | 21 | License along with Clipperz Community Edition. If not, see |
25 | <http://www.gnu.org/licenses/>. | 22 | <http://www.gnu.org/licenses/>. |
26 | 23 | ||
27 | */ | 24 | */ |
28 | 25 | ||
29 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); | 26 | Clipperz.Base.module('Clipperz.PM.UI.Common.Components'); |
30 | 27 | ||
31 | Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar = function(args) { | 28 | Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar = function(args) { |
32 | args = args || {}; | 29 | args = args || {}; |
33 | 30 | ||
34 | Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar.superclass.constructor.apply(this, arguments); | 31 | Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar.superclass.constructor.apply(this, arguments); |
35 | 32 | ||
36 | // this._openFromElement = args.openFromElement || null; | 33 | // this._openFromElement = args.openFromElement || null; |
37 | this._onOkCloseToElement = args.onOkCloseToElement || null; | 34 | this._onOkCloseToElement = args.onOkCloseToElement || null; |
38 | this._onCancelCloseToElement = args.onCancelCloseToElement|| null; | 35 | this._onCancelCloseToElement = args.onCancelCloseToElement|| null; |
39 | 36 | ||
40 | this._canCancelWhileProcessing= ((typeof(args.canCancelWhileProcessing) == 'undefined') ? true : args.canCancelWhileProcessing); | 37 | this._canCancelWhileProcessing= ((typeof(args.canCancelWhileProcessing) == 'undefined') ? true : args.canCancelWhileProcessing); |
41 | 38 | ||
42 | return this; | 39 | return this; |
43 | } | 40 | } |
44 | 41 | ||
45 | //============================================================================= | 42 | //============================================================================= |
46 | 43 | ||
47 | Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar, Clipperz.PM.UI.Common.Components.SimpleMessagePanel, { | 44 | Clipperz.Base.extend(Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar, Clipperz.PM.UI.Common.Components.SimpleMessagePanel, { |
48 | 45 | ||
49 | //------------------------------------------------------------------------- | 46 | //------------------------------------------------------------------------- |
50 | 47 | ||
51 | 'toString': function () { | 48 | 'toString': function () { |
52 | return "Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar component"; | 49 | return "Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar component"; |
53 | }, | 50 | }, |
54 | 51 | ||
55 | //------------------------------------------------------------------------- | 52 | //------------------------------------------------------------------------- |
56 | /* | 53 | /* |
57 | 'openFromElement': function () { | 54 | 'openFromElement': function () { |
58 | return this._openFromElement; | 55 | return this._openFromElement; |
59 | }, | 56 | }, |
60 | */ | 57 | */ |
61 | //------------------------------------------------------------------------- | 58 | //------------------------------------------------------------------------- |
62 | 59 | ||
63 | 'onOkCloseToElement': function () { | 60 | 'onOkCloseToElement': function () { |
64 | return this._onOkCloseToElement; | 61 | return this._onOkCloseToElement; |
65 | }, | 62 | }, |
66 | 63 | ||
67 | 'setOnOkCloseToElement': function (anElement) { | 64 | 'setOnOkCloseToElement': function (anElement) { |
68 | this._onOkCloseToElement = anElement; | 65 | this._onOkCloseToElement = anElement; |
69 | }, | 66 | }, |
70 | 67 | ||
71 | //------------------------------------------------------------------------- | 68 | //------------------------------------------------------------------------- |
72 | 69 | ||
73 | 'onCancelCloseToElement': function () { | 70 | 'onCancelCloseToElement': function () { |
74 | return this._onCancelCloseToElement; | 71 | return this._onCancelCloseToElement; |
75 | }, | 72 | }, |
76 | 73 | ||
77 | 'setOnCancelCloseToElement': function (anElement) { | 74 | 'setOnCancelCloseToElement': function (anElement) { |
78 | this._onCancelCloseToElement = anElement; | 75 | this._onCancelCloseToElement = anElement; |
79 | }, | 76 | }, |
80 | 77 | ||
81 | //------------------------------------------------------------------------- | 78 | //------------------------------------------------------------------------- |
82 | 79 | ||
83 | 'canCancelWhileProcessing': function () { | 80 | 'canCancelWhileProcessing': function () { |
84 | return this._canCancelWhileProcessing; | 81 | return this._canCancelWhileProcessing; |
85 | }, | 82 | }, |
86 | 83 | ||
87 | //------------------------------------------------------------------------- | 84 | //------------------------------------------------------------------------- |
88 | 85 | ||
89 | 'deferredShowModal': function (someArgs, aResult) { | 86 | 'deferredShowModal': function (someArgs, aResult) { |
90 | if (someArgs['onOkCloseToElement'] != null) { | 87 | if (someArgs['onOkCloseToElement'] != null) { |
91 | this.setOnOkCloseToElement(someArgs['onOkCloseToElement']); | 88 | this.setOnOkCloseToElement(someArgs['onOkCloseToElement']); |
92 | } | 89 | } |
93 | 90 | ||
94 | if (someArgs['onCancelCloseToElement'] != null) { | 91 | if (someArgs['onCancelCloseToElement'] != null) { |
95 | this.setOnCancelCloseToElement(someArgs['onCancelCloseToElement']); | 92 | this.setOnCancelCloseToElement(someArgs['onCancelCloseToElement']); |
96 | } | 93 | } |
97 | 94 | ||
98 | Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar.superclass.deferredShowModal.apply(this, arguments); | 95 | Clipperz.PM.UI.Common.Components.MessagePanelWithProgressBar.superclass.deferredShowModal.apply(this, arguments); |
99 | return this.deferred(); | 96 | return this.deferred(); |
100 | }, | 97 | }, |
101 | 98 | ||
102 | //------------------------------------------------------------------------- | 99 | //------------------------------------------------------------------------- |
103 | 100 | ||
104 | 'showProgressBar': function () { | 101 | 'showProgressBar': function () { |
105 | varprogressBarElement; | 102 | varprogressBarElement; |
106 | 103 | ||
107 | this.getElement('container').innerHTML = ''; | 104 | this.getElement('container').innerHTML = ''; |
108 | 105 | ||
109 | progressBarElement = this.append(this.getElement('container'), {tag:'div', cls:'progressBarWrapper'}); | 106 | progressBarElement = this.append(this.getElement('container'), {tag:'div', cls:'progressBarWrapper'}); |
110 | this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':progressBarElement})); | 107 | this.addComponent(new Clipperz.PM.UI.Common.Components.ProgressBar({'element':progressBarElement})); |
111 | 108 | ||
112 | if (this.canCancelWhileProcessing() == true) { | 109 | if (this.canCancelWhileProcessing() == true) { |
113 | this.setButtons([{text:"Cancel", result:'CANCEL'}]); | 110 | this.setButtons([{text:"Cancel", result:'CANCEL'}]); |
114 | } else { | 111 | } else { |
115 | this.setButtons([]); | 112 | this.setButtons([]); |
116 | } | 113 | } |
117 | }, | 114 | }, |
118 | 115 | ||
119 | //------------------------------------------------------------------------- | 116 | //------------------------------------------------------------------------- |
120 | 117 | ||