Diffstat (limited to 'frontend/beta/js/Clipperz/YUI/MessageBox.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/YUI/MessageBox.js | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/frontend/beta/js/Clipperz/YUI/MessageBox.js b/frontend/beta/js/Clipperz/YUI/MessageBox.js index ec33d7d..c7b4702 100644 --- a/frontend/beta/js/Clipperz/YUI/MessageBox.js +++ b/frontend/beta/js/Clipperz/YUI/MessageBox.js | |||
@@ -1,72 +1,69 @@ | |||
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.YUI.MessageBox = function(){ | 26 | Clipperz.YUI.MessageBox = function(){ |
30 | var dlg, opt, mask; | 27 | var dlg, opt, mask; |
31 | var bodyEl, msgEl, textboxEl, textareaEl, progressEl, pp; | 28 | var bodyEl, msgEl, textboxEl, textareaEl, progressEl, pp; |
32 | var buttons, activeTextEl, bwidth; | 29 | var buttons, activeTextEl, bwidth; |
33 | 30 | ||
34 | var handleButton = function(button){ | 31 | var handleButton = function(button){ |
35 | if(typeof opt.fn == 'function'){ | 32 | if(typeof opt.fn == 'function'){ |
36 | if(opt.fn.call(opt.scope||window, button, activeTextEl.dom.value) !== false){ | 33 | if(opt.fn.call(opt.scope||window, button, activeTextEl.dom.value) !== false){ |
37 | dlg.hide(); | 34 | dlg.hide(); |
38 | } | 35 | } |
39 | }else{ | 36 | }else{ |
40 | dlg.hide(); | 37 | dlg.hide(); |
41 | } | 38 | } |
42 | }; | 39 | }; |
43 | 40 | ||
44 | return { | 41 | return { |
45 | updateButtons: function(b){ | 42 | updateButtons: function(b){ |
46 | var width = 0; | 43 | var width = 0; |
47 | if(!b){ | 44 | if(!b){ |
48 | buttons['ok'].hide(); | 45 | buttons['ok'].hide(); |
49 | buttons['cancel'].hide(); | 46 | buttons['cancel'].hide(); |
50 | buttons['yes'].hide(); | 47 | buttons['yes'].hide(); |
51 | buttons['no'].hide(); | 48 | buttons['no'].hide(); |
52 | return width; | 49 | return width; |
53 | } | 50 | } |
54 | for(var k in buttons){ | 51 | for(var k in buttons){ |
55 | if(typeof buttons[k] != 'function'){ | 52 | if(typeof buttons[k] != 'function'){ |
56 | if(b[k]){ | 53 | if(b[k]){ |
57 | buttons[k].show(); | 54 | buttons[k].show(); |
58 | buttons[k].setText(typeof b[k] == 'string' ? b[k] : YAHOO.ext.MessageBox.buttonText[k]); | 55 | buttons[k].setText(typeof b[k] == 'string' ? b[k] : YAHOO.ext.MessageBox.buttonText[k]); |
59 | width += buttons[k].el.getWidth()+15; | 56 | width += buttons[k].el.getWidth()+15; |
60 | }else{ | 57 | }else{ |
61 | buttons[k].hide(); | 58 | buttons[k].hide(); |
62 | } | 59 | } |
63 | } | 60 | } |
64 | } | 61 | } |
65 | return width; | 62 | return width; |
66 | }, | 63 | }, |
67 | 64 | ||
68 | getDialog : function(){ | 65 | getDialog : function(){ |
69 | if(!dlg){ | 66 | if(!dlg){ |
70 | dlg = new YAHOO.ext.BasicDialog('mb-dlg', { | 67 | dlg = new YAHOO.ext.BasicDialog('mb-dlg', { |
71 | autoCreate:true, | 68 | autoCreate:true, |
72 | shadow:true, | 69 | shadow:true, |