Diffstat (limited to 'frontend/beta/js/Clipperz/YUI') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/YUI/Collapser.js | 15 | ||||
-rw-r--r-- | frontend/beta/js/Clipperz/YUI/DomHelper.js | 15 | ||||
-rw-r--r-- | frontend/beta/js/Clipperz/YUI/DomQuery.js | 15 | ||||
-rw-r--r-- | frontend/beta/js/Clipperz/YUI/Drawer.js | 15 | ||||
-rw-r--r-- | frontend/beta/js/Clipperz/YUI/IBLayoutManager.js | 15 | ||||
-rw-r--r-- | frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js | 15 | ||||
-rw-r--r-- | frontend/beta/js/Clipperz/YUI/MessageBox.js | 15 |
7 files changed, 42 insertions, 63 deletions
diff --git a/frontend/beta/js/Clipperz/YUI/Collapser.js b/frontend/beta/js/Clipperz/YUI/Collapser.js index 5c0ac0f..b104877 100644 --- a/frontend/beta/js/Clipperz/YUI/Collapser.js +++ b/frontend/beta/js/Clipperz/YUI/Collapser.js | |||
@@ -1,73 +1,70 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } | 27 | if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } |
31 | 28 | ||
32 | //found on YUI-EXT forum (http://www.yui-ext.com/forum/viewtopic.php?t=683&highlight=accordion) | 29 | //found on YUI-EXT forum (http://www.yui-ext.com/forum/viewtopic.php?t=683&highlight=accordion) |
33 | Clipperz.YUI.Collapser = function(clickEl, collapseEl, initiallyCollapsed) { | 30 | Clipperz.YUI.Collapser = function(clickEl, collapseEl, initiallyCollapsed) { |
34 | this.clickEl = getEl(clickEl); | 31 | this.clickEl = getEl(clickEl); |
35 | this.collapseEl = getEl(collapseEl); | 32 | this.collapseEl = getEl(collapseEl); |
36 | this.clickEl.addClass('collapser-expanded'); | 33 | this.clickEl.addClass('collapser-expanded'); |
37 | if (initiallyCollapsed == true) { | 34 | if (initiallyCollapsed == true) { |
38 | this.afterCollapse(); | 35 | this.afterCollapse(); |
39 | } | 36 | } |
40 | this.clickEl.mon('click', function(){ | 37 | this.clickEl.mon('click', function(){ |
41 | this.collapsed === true ? this.expand() : this.collapse(); | 38 | this.collapsed === true ? this.expand() : this.collapse(); |
42 | }, this, true); | 39 | }, this, true); |
43 | }; | 40 | }; |
44 | 41 | ||
45 | Clipperz.YUI.Collapser.prototype = { | 42 | Clipperz.YUI.Collapser.prototype = { |
46 | 'collapse': function(){ | 43 | 'collapse': function(){ |
47 | this.collapseEl.clip(); | 44 | this.collapseEl.clip(); |
48 | this.collapseEl.setHeight(1, true, .35, this.afterCollapse.createDelegate(this), YAHOO.util.Easing.easeOut); | 45 | this.collapseEl.setHeight(1, true, .35, this.afterCollapse.createDelegate(this), YAHOO.util.Easing.easeOut); |
49 | this.clickEl.replaceClass('collapser-expanded','collapser-collapsed'); | 46 | this.clickEl.replaceClass('collapser-expanded','collapser-collapsed'); |
50 | }, | 47 | }, |
51 | 48 | ||
52 | 'afterCollapse': function(){ | 49 | 'afterCollapse': function(){ |
53 | this.collapsed = true; | 50 | this.collapsed = true; |
54 | this.collapseEl.setDisplayed(false); | 51 | this.collapseEl.setDisplayed(false); |
55 | this.clickEl.replaceClass('collapser-expanded','collapser-collapsed'); | 52 | this.clickEl.replaceClass('collapser-expanded','collapser-collapsed'); |
56 | }, | 53 | }, |
57 | 54 | ||
58 | 'expand': function(){ | 55 | 'expand': function(){ |
59 | this.collapseEl.setDisplayed(true); | 56 | this.collapseEl.setDisplayed(true); |
60 | this.collapseEl.autoHeight(true, .35, this.afterExpand.createDelegate(this), YAHOO.util.Easing.easeOut); | 57 | this.collapseEl.autoHeight(true, .35, this.afterExpand.createDelegate(this), YAHOO.util.Easing.easeOut); |
61 | this.clickEl.replaceClass('collapser-collapsed','collapser-expanded'); | 58 | this.clickEl.replaceClass('collapser-collapsed','collapser-expanded'); |
62 | }, | 59 | }, |
63 | 60 | ||
64 | 'afterExpand': function(){ | 61 | 'afterExpand': function(){ |
65 | this.collapsed = false; | 62 | this.collapsed = false; |
66 | this.collapseEl.unclip(); | 63 | this.collapseEl.unclip(); |
67 | this.collapseEl.setStyle('height', ''); | 64 | this.collapseEl.setStyle('height', ''); |
68 | this.clickEl.replaceClass('collapser-collapsed','collapser-expanded'); | 65 | this.clickEl.replaceClass('collapser-collapsed','collapser-expanded'); |
69 | }, | 66 | }, |
70 | 67 | ||
71 | //----------------------------------------------------- | 68 | //----------------------------------------------------- |
72 | __syntaxFix__: '__syntaxFix__' | 69 | __syntaxFix__: '__syntaxFix__' |
73 | }; | 70 | }; |
diff --git a/frontend/beta/js/Clipperz/YUI/DomHelper.js b/frontend/beta/js/Clipperz/YUI/DomHelper.js index 4f8acde..05edc49 100644 --- a/frontend/beta/js/Clipperz/YUI/DomHelper.js +++ b/frontend/beta/js/Clipperz/YUI/DomHelper.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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.ext) == 'undefined') { Clipperz.ext = {}; } | 27 | if (typeof(Clipperz.ext) == 'undefined') { Clipperz.ext = {}; } |
31 | 28 | ||
32 | /** | 29 | /** |
33 | * @class Clipperz.YUI.DomHelper | 30 | * @class Clipperz.YUI.DomHelper |
34 | * Utility class for working with DOM and/or Templates. It transparently supports using HTML fragments or DOM. | 31 | * Utility class for working with DOM and/or Templates. It transparently supports using HTML fragments or DOM. |
35 | * For more information see <a href="http://www.jackslocum.com/yui/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/">this blog post with examples</a>. | 32 | * For more information see <a href="http://www.jackslocum.com/yui/2006/10/06/domhelper-create-elements-using-dom-html-fragments-or-templates/">this blog post with examples</a>. |
36 | * @singleton | 33 | * @singleton |
37 | */ | 34 | */ |
38 | Clipperz.YUI.DomHelper = new function(){ | 35 | Clipperz.YUI.DomHelper = new function(){ |
39 | /**@private*/ | 36 | /**@private*/ |
40 | var d = document; | 37 | var d = document; |
41 | var tempTableEl = null; | 38 | var tempTableEl = null; |
42 | /** True to force the use of DOM instead of html fragments @type Boolean */ | 39 | /** True to force the use of DOM instead of html fragments @type Boolean */ |
43 | this.useDom = false; | 40 | this.useDom = false; |
44 | var emptyTags = /^(?:base|basefont|br|frame|hr|img|input|isindex|link|meta|nextid|range|spacer|wbr|audioscope|area|param|keygen|col|limittext|spot|tab|over|right|left|choose|atop|of)$/i; | 41 | var emptyTags = /^(?:base|basefont|br|frame|hr|img|input|isindex|link|meta|nextid|range|spacer|wbr|audioscope|area|param|keygen|col|limittext|spot|tab|over|right|left|choose|atop|of)$/i; |
45 | /** | 42 | /** |
46 | * Applies a style specification to an element | 43 | * Applies a style specification to an element |
47 | * @param {String/HTMLElement} el The element to apply styles to | 44 | * @param {String/HTMLElement} el The element to apply styles to |
48 | * @param {String/Object/Function} styles A style specification string eg "width:100px", or object in the form {width:"100px"}, or | 45 | * @param {String/Object/Function} styles A style specification string eg "width:100px", or object in the form {width:"100px"}, or |
49 | * a function which returns such a specification. | 46 | * a function which returns such a specification. |
50 | */ | 47 | */ |
51 | this.applyStyles = function(el, styles){ | 48 | this.applyStyles = function(el, styles){ |
52 | if(styles){ | 49 | if(styles){ |
53 | var D = YAHOO.util.Dom; | 50 | var D = YAHOO.util.Dom; |
54 | if (typeof styles == "string"){ | 51 | if (typeof styles == "string"){ |
55 | var re = /\s?([a-z\-]*)\:([^;]*);?/gi; | 52 | var re = /\s?([a-z\-]*)\:([^;]*);?/gi; |
56 | var matches; | 53 | var matches; |
57 | while ((matches = re.exec(styles)) != null){ | 54 | while ((matches = re.exec(styles)) != null){ |
58 | D.setStyle(el, matches[1], matches[2]); | 55 | D.setStyle(el, matches[1], matches[2]); |
59 | } | 56 | } |
60 | }else if (typeof styles == "object"){ | 57 | }else if (typeof styles == "object"){ |
61 | for (var style in styles){ | 58 | for (var style in styles){ |
62 | D.setStyle(el, style, styles[style]); | 59 | D.setStyle(el, style, styles[style]); |
63 | } | 60 | } |
64 | }else if (typeof styles == "function"){ | 61 | }else if (typeof styles == "function"){ |
65 | Clipperz.YUI.DomHelper.applyStyles(el, styles.call()); | 62 | Clipperz.YUI.DomHelper.applyStyles(el, styles.call()); |
66 | } | 63 | } |
67 | } | 64 | } |
68 | }; | 65 | }; |
69 | 66 | ||
70 | // build as innerHTML where available | 67 | // build as innerHTML where available |
71 | /** @ignore */ | 68 | /** @ignore */ |
72 | var createHtml = function(o){ | 69 | var createHtml = function(o){ |
73 | var b = ''; | 70 | var b = ''; |
74 | 71 | ||
75 | if(typeof(o['html']) != 'undefined') { | 72 | if(typeof(o['html']) != 'undefined') { |
76 | o['html'] = Clipperz.Base.sanitizeString(o['html']); | 73 | o['html'] = Clipperz.Base.sanitizeString(o['html']); |
77 | } else if (typeof(o['htmlString']) != 'undefined') { | 74 | } else if (typeof(o['htmlString']) != 'undefined') { |
78 | o['html'] = o['htmlString']; | 75 | o['html'] = o['htmlString']; |
79 | delete o.htmlString; | 76 | delete o.htmlString; |
80 | } | 77 | } |
81 | 78 | ||
82 | b += '<' + o.tag; | 79 | b += '<' + o.tag; |
83 | for(var attr in o){ | 80 | for(var attr in o){ |
84 | if(attr == 'tag' || attr == 'children' || attr == 'html' || typeof o[attr] == 'function') continue; | 81 | if(attr == 'tag' || attr == 'children' || attr == 'html' || typeof o[attr] == 'function') continue; |
85 | if(attr == 'style'){ | 82 | if(attr == 'style'){ |
86 | var s = o['style']; | 83 | var s = o['style']; |
87 | if(typeof s == 'function'){ | 84 | if(typeof s == 'function'){ |
88 | s = s.call(); | 85 | s = s.call(); |
89 | } | 86 | } |
90 | if(typeof s == 'string'){ | 87 | if(typeof s == 'string'){ |
91 | b += ' style="' + s + '"'; | 88 | b += ' style="' + s + '"'; |
92 | }else if(typeof s == 'object'){ | 89 | }else if(typeof s == 'object'){ |
93 | b += ' style="'; | 90 | b += ' style="'; |
94 | for(var key in s){ | 91 | for(var key in s){ |
95 | if(typeof s[key] != 'function'){ | 92 | if(typeof s[key] != 'function'){ |
96 | b += key + ':' + s[key] + ';'; | 93 | b += key + ':' + s[key] + ';'; |
97 | } | 94 | } |
98 | } | 95 | } |
99 | b += '"'; | 96 | b += '"'; |
100 | } | 97 | } |
101 | }else{ | 98 | }else{ |
102 | if(attr == 'cls'){ | 99 | if(attr == 'cls'){ |
103 | b += ' class="' + o['cls'] + '"'; | 100 | b += ' class="' + o['cls'] + '"'; |
104 | }else if(attr == 'htmlFor'){ | 101 | }else if(attr == 'htmlFor'){ |
105 | b += ' for="' + o['htmlFor'] + '"'; | 102 | b += ' for="' + o['htmlFor'] + '"'; |
106 | }else{ | 103 | }else{ |
107 | b += ' ' + attr + '="' + o[attr] + '"'; | 104 | b += ' ' + attr + '="' + o[attr] + '"'; |
108 | } | 105 | } |
109 | } | 106 | } |
110 | } | 107 | } |
111 | if(emptyTags.test(o.tag)){ | 108 | if(emptyTags.test(o.tag)){ |
112 | b += ' />'; | 109 | b += ' />'; |
113 | }else{ | 110 | }else{ |
114 | b += '>'; | 111 | b += '>'; |
115 | if(o.children){ | 112 | if(o.children){ |
116 | for(var i = 0, len = o.children.length; i < len; i++) { | 113 | for(var i = 0, len = o.children.length; i < len; i++) { |
117 | b += createHtml(o.children[i], b); | 114 | b += createHtml(o.children[i], b); |
118 | } | 115 | } |
119 | } | 116 | } |
120 | if(o.html){ | 117 | if(o.html){ |
diff --git a/frontend/beta/js/Clipperz/YUI/DomQuery.js b/frontend/beta/js/Clipperz/YUI/DomQuery.js index 84aac08..4ad4193 100644 --- a/frontend/beta/js/Clipperz/YUI/DomQuery.js +++ b/frontend/beta/js/Clipperz/YUI/DomQuery.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 | /* | 26 | /* |
30 | * yui-ext 0.40 | 27 | * yui-ext 0.40 |
31 | * Copyright(c) 2006, Jack Slocum. | 28 | * Copyright(c) 2006, Jack Slocum. |
32 | */ | 29 | */ |
33 | 30 | ||
34 | /** | 31 | /** |
35 | * @class Ext.DomQuery | 32 | * @class Ext.DomQuery |
36 | * Provides high performance selector/xpath processing by compiling queries into reusable functions. | 33 | * Provides high performance selector/xpath processing by compiling queries into reusable functions. |
37 | * New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in). | 34 | * New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in). |
38 | * @singleton | 35 | * @singleton |
39 | */ | 36 | */ |
40 | Ext.DomQuery = function(){ | 37 | Ext.DomQuery = function(){ |
41 | var cache = {}, simpleCache = {}, valueCache = {}; | 38 | var cache = {}, simpleCache = {}, valueCache = {}; |
42 | var nonSpace = /\S/; | 39 | var nonSpace = /\S/; |
43 | var trimRe = /^\s*(.*?)\s*$/; | 40 | var trimRe = /^\s*(.*?)\s*$/; |
44 | var tplRe = /\{(\d+)\}/g; | 41 | var tplRe = /\{(\d+)\}/g; |
45 | var modeRe = /^(\s?[\/>]\s?|\s|$)/; | 42 | var modeRe = /^(\s?[\/>]\s?|\s|$)/; |
46 | var clsRes = {}; | 43 | var clsRes = {}; |
47 | 44 | ||
48 | function child(p, index){ | 45 | function child(p, index){ |
49 | var i = 0; | 46 | var i = 0; |
50 | var n = p.firstChild; | 47 | var n = p.firstChild; |
51 | while(n){ | 48 | while(n){ |
52 | if(n.nodeType == 1){ | 49 | if(n.nodeType == 1){ |
53 | i++; | 50 | i++; |
54 | if(i == index){ | 51 | if(i == index){ |
55 | return n; | 52 | return n; |
56 | } | 53 | } |
57 | } | 54 | } |
58 | n = n.nextSibling; | 55 | n = n.nextSibling; |
59 | } | 56 | } |
60 | return null; | 57 | return null; |
61 | }; | 58 | }; |
62 | 59 | ||
63 | function next(d){ | 60 | function next(d){ |
64 | var n = d.nextSibling; | 61 | var n = d.nextSibling; |
65 | while(n && n.nodeType != 1){ | 62 | while(n && n.nodeType != 1){ |
66 | n = n.nextSibling; | 63 | n = n.nextSibling; |
67 | } | 64 | } |
68 | return n; | 65 | return n; |
69 | }; | 66 | }; |
70 | 67 | ||
71 | function prev(d){ | 68 | function prev(d){ |
72 | var n = d.previousSibling; | 69 | var n = d.previousSibling; |
73 | while(n && n.nodeType != 1){ | 70 | while(n && n.nodeType != 1){ |
74 | n = n.previousSibling; | 71 | n = n.previousSibling; |
75 | } | 72 | } |
76 | return n; | 73 | return n; |
77 | }; | 74 | }; |
78 | 75 | ||
79 | function clean(d){ | 76 | function clean(d){ |
80 | var n = d.firstChild, ni = -1; | 77 | var n = d.firstChild, ni = -1; |
81 | while(n){ | 78 | while(n){ |
82 | var nx = n.nextSibling; | 79 | var nx = n.nextSibling; |
83 | if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ | 80 | if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ |
84 | d.removeChild(n); | 81 | d.removeChild(n); |
85 | }else{ | 82 | }else{ |
86 | n.nodeIndex = ++ni; | 83 | n.nodeIndex = ++ni; |
87 | } | 84 | } |
88 | n = nx; | 85 | n = nx; |
89 | } | 86 | } |
90 | return this; | 87 | return this; |
91 | }; | 88 | }; |
92 | 89 | ||
93 | function byClassName(c, a, v){ | 90 | function byClassName(c, a, v){ |
94 | if(!v){ | 91 | if(!v){ |
95 | return c; | 92 | return c; |
96 | } | 93 | } |
97 | var re = clsRes[v]; | 94 | var re = clsRes[v]; |
98 | if(!re){ | 95 | if(!re){ |
99 | re = new RegExp('(?:^|\\s)(?:' + v + ')(?:\\s|$)'); | 96 | re = new RegExp('(?:^|\\s)(?:' + v + ')(?:\\s|$)'); |
100 | clsRes[v] = re; | 97 | clsRes[v] = re; |
101 | } | 98 | } |
102 | var r = []; | 99 | var r = []; |
103 | for(var i = 0, ci; ci = c[i]; i++){ | 100 | for(var i = 0, ci; ci = c[i]; i++){ |
104 | if(re.test(ci.className)){ | 101 | if(re.test(ci.className)){ |
105 | r[r.length] = ci; | 102 | r[r.length] = ci; |
106 | } | 103 | } |
107 | } | 104 | } |
108 | return r; | 105 | return r; |
109 | }; | 106 | }; |
110 | 107 | ||
111 | function convert(c){ | 108 | function convert(c){ |
112 | if(c.slice){ | 109 | if(c.slice){ |
113 | return c; | 110 | return c; |
114 | } | 111 | } |
115 | var r = []; | 112 | var r = []; |
116 | for(var i = 0, l = c.length; i < l; i++){ | 113 | for(var i = 0, l = c.length; i < l; i++){ |
117 | r[r.length] = c[i]; | 114 | r[r.length] = c[i]; |
118 | } | 115 | } |
119 | return r; | 116 | return r; |
120 | }; | 117 | }; |
diff --git a/frontend/beta/js/Clipperz/YUI/Drawer.js b/frontend/beta/js/Clipperz/YUI/Drawer.js index 394912e..508bfe5 100644 --- a/frontend/beta/js/Clipperz/YUI/Drawer.js +++ b/frontend/beta/js/Clipperz/YUI/Drawer.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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } | 27 | if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } |
31 | 28 | ||
32 | 29 | ||
33 | Clipperz.YUI.Drawer = function(anElement, aRegion) { | 30 | Clipperz.YUI.Drawer = function(anElement, aRegion) { |
34 | this._status = 'slideIn'; | 31 | this._status = 'slideIn'; |
35 | 32 | ||
36 | this._element = YAHOO.ext.Element.get(anElement); | 33 | this._element = YAHOO.ext.Element.get(anElement); |
37 | this._region = aRegion || null; | 34 | this._region = aRegion || null; |
38 | 35 | ||
39 | this._collapsedElement = this.element().getChildrenByClassName("drawer-collapsed")[0]; | 36 | this._collapsedElement = this.element().getChildrenByClassName("drawer-collapsed")[0]; |
40 | this._contentElement = this.element().getChildrenByClassName("drawer-content")[0]; | 37 | this._contentElement = this.element().getChildrenByClassName("drawer-content")[0]; |
41 | 38 | ||
42 | 39 | ||
43 | this._wholeCollapedElement = this.enhanceCollapsedElement(); | 40 | this._wholeCollapedElement = this.enhanceCollapsedElement(); |
44 | this._wholeCollapedElement.setWidth(this.region().element().getWidth()); | 41 | this._wholeCollapedElement.setWidth(this.region().element().getWidth()); |
45 | this._wholeCollapedElement.setHeight(this.region().element().getHeight()); | 42 | this._wholeCollapedElement.setHeight(this.region().element().getHeight()); |
46 | 43 | ||
47 | this._contentWrapper = this.enhanceContentElement(); | 44 | this._contentWrapper = this.enhanceContentElement(); |
48 | this._contentElementActor = new YAHOO.ext.Actor(this.contentWrapper().dom); | 45 | this._contentElementActor = new YAHOO.ext.Actor(this.contentWrapper().dom); |
49 | this.contentElementActor().hide(); | 46 | this.contentElementActor().hide(); |
50 | 47 | ||
51 | this._contentWidth = 200; | 48 | this._contentWidth = 200; |
52 | }; | 49 | }; |
53 | 50 | ||
54 | YAHOO.extendX(Clipperz.YUI.Drawer, YAHOO.ext.util.Observable, { | 51 | YAHOO.extendX(Clipperz.YUI.Drawer, YAHOO.ext.util.Observable, { |
55 | 52 | ||
56 | 'element': function() { | 53 | 'element': function() { |
57 | return this._element; | 54 | return this._element; |
58 | }, | 55 | }, |
59 | 56 | ||
60 | //----------------------------------------------------- | 57 | //----------------------------------------------------- |
61 | 58 | ||
62 | 'status': function() { | 59 | 'status': function() { |
63 | return this._status; | 60 | return this._status; |
64 | }, | 61 | }, |
65 | 62 | ||
66 | 'setStatus': function(aValue) { | 63 | 'setStatus': function(aValue) { |
67 | this._status = aValue; | 64 | this._status = aValue; |
68 | }, | 65 | }, |
69 | 66 | ||
70 | //----------------------------------------------------- | 67 | //----------------------------------------------------- |
71 | 68 | ||
72 | 'collapsedElement': function() { | 69 | 'collapsedElement': function() { |
73 | return this._collapsedElement; | 70 | return this._collapsedElement; |
74 | }, | 71 | }, |
75 | 72 | ||
76 | //----------------------------------------------------- | 73 | //----------------------------------------------------- |
77 | 74 | ||
78 | 'contentElement': function() { | 75 | 'contentElement': function() { |
79 | return this._contentElement; | 76 | return this._contentElement; |
80 | }, | 77 | }, |
81 | 78 | ||
82 | //----------------------------------------------------- | 79 | //----------------------------------------------------- |
83 | 80 | ||
84 | 'contentElementActor': function() { | 81 | 'contentElementActor': function() { |
85 | return this._contentElementActor; | 82 | return this._contentElementActor; |
86 | }, | 83 | }, |
87 | 84 | ||
88 | //----------------------------------------------------- | 85 | //----------------------------------------------------- |
89 | 86 | ||
90 | 'contentWrapper': function() { | 87 | 'contentWrapper': function() { |
91 | return this._contentWrapper; | 88 | return this._contentWrapper; |
92 | }, | 89 | }, |
93 | 90 | ||
94 | //----------------------------------------------------- | 91 | //----------------------------------------------------- |
95 | 92 | ||
96 | 'contentWidth': function() { | 93 | 'contentWidth': function() { |
97 | return this._contentWidth; | 94 | return this._contentWidth; |
98 | }, | 95 | }, |
99 | 96 | ||
100 | //----------------------------------------------------- | 97 | //----------------------------------------------------- |
101 | 98 | ||
102 | 'region': function() { | 99 | 'region': function() { |
103 | return this._region; | 100 | return this._region; |
104 | }, | 101 | }, |
105 | 102 | ||
106 | //----------------------------------------------------- | 103 | //----------------------------------------------------- |
107 | 104 | ||
108 | 'enhanceCollapsedElement': function() { | 105 | 'enhanceCollapsedElement': function() { |
109 | varwrapper; | 106 | varwrapper; |
110 | var link; | 107 | var link; |
111 | 108 | ||
112 | wrapper = this.collapsedElement().wrap({tag:'div', cls:'drawer-collapsedElement-wrapper', children:[ | 109 | wrapper = this.collapsedElement().wrap({tag:'div', cls:'drawer-collapsedElement-wrapper', children:[ |
113 | {tag:'div', cls:'drawer-pin-button', children:[ | 110 | {tag:'div', cls:'drawer-pin-button', children:[ |
114 | {tag:'a', cls:'drawer-pin-button', href:"#", children:[ | 111 | {tag:'a', cls:'drawer-pin-button', href:"#", children:[ |
115 | {tag:'img', src:'./images/directLogins/drawer/mm-expand.gif'} | 112 | {tag:'img', src:'./images/directLogins/drawer/mm-expand.gif'} |
116 | ]} | 113 | ]} |
117 | ]} | 114 | ]} |
118 | ]}); | 115 | ]}); |
119 | 116 | ||
120 | link = wrapper.getChildrenByClassName('drawer-pin-button', 'a')[0]; | 117 | link = wrapper.getChildrenByClassName('drawer-pin-button', 'a')[0]; |
diff --git a/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js b/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js index 626b699..6e2138e 100644 --- a/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js +++ b/frontend/beta/js/Clipperz/YUI/IBLayoutManager.js | |||
@@ -1,114 +1,111 @@ | |||
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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } | 27 | if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } |
31 | 28 | ||
32 | 29 | ||
33 | Clipperz.YUI.IBLayoutManager = function(container, config) { | 30 | Clipperz.YUI.IBLayoutManager = function(container, config) { |
34 | var regionName; | 31 | var regionName; |
35 | varelement; | 32 | varelement; |
36 | 33 | ||
37 | config = config || {}; | 34 | config = config || {}; |
38 | 35 | ||
39 | Clipperz.YUI.IBLayoutManager.superclass.constructor.call(this, container); | 36 | Clipperz.YUI.IBLayoutManager.superclass.constructor.call(this, container); |
40 | this.hideOnLayout = config.hideOnLayout || false; | 37 | this.hideOnLayout = config.hideOnLayout || false; |
41 | 38 | ||
42 | element = YAHOO.ext.Element.get(container); | 39 | element = YAHOO.ext.Element.get(container); |
43 | element.setStyle('position', 'absolute'); | 40 | element.setStyle('position', 'absolute'); |
44 | element.setStyle('overflow', 'hidden'); | 41 | element.setStyle('overflow', 'hidden'); |
45 | 42 | ||
46 | for (regionName in config.regions) { | 43 | for (regionName in config.regions) { |
47 | var newRegion; | 44 | var newRegion; |
48 | 45 | ||
49 | newRegion = new new Clipperz.YUI.IBLayoutRegion(this, regionName, config.regions[regionName]); | 46 | newRegion = new new Clipperz.YUI.IBLayoutRegion(this, regionName, config.regions[regionName]); |
50 | this.addRegion(regionName, newRegion); | 47 | this.addRegion(regionName, newRegion); |
51 | } | 48 | } |
52 | 49 | ||
53 | this.layout(); | 50 | this.layout(); |
54 | }; | 51 | }; |
55 | 52 | ||
56 | YAHOO.extendX(Clipperz.YUI.IBLayoutManager, YAHOO.ext.LayoutManager, { | 53 | YAHOO.extendX(Clipperz.YUI.IBLayoutManager, YAHOO.ext.LayoutManager, { |
57 | 54 | ||
58 | 'toString': function() { | 55 | 'toString': function() { |
59 | return "IBLayoutManager (" + this.el.id + ")"; | 56 | return "IBLayoutManager (" + this.el.id + ")"; |
60 | }, | 57 | }, |
61 | 58 | ||
62 | //----------------------------------------------------- | 59 | //----------------------------------------------------- |
63 | 60 | ||
64 | 'add': function(aName, aPanel) { | 61 | 'add': function(aName, aPanel) { |
65 | var regionName; | 62 | var regionName; |
66 | 63 | ||
67 | regionName = aName.toLowerCase(); | 64 | regionName = aName.toLowerCase(); |
68 | return this.regions[regionName].add(aPanel); | 65 | return this.regions[regionName].add(aPanel); |
69 | }, | 66 | }, |
70 | 67 | ||
71 | //----------------------------------------------------- | 68 | //----------------------------------------------------- |
72 | 69 | ||
73 | 'addRegion': function(aRegion) { | 70 | 'addRegion': function(aRegion) { |
74 | var regionName; | 71 | var regionName; |
75 | 72 | ||
76 | regionName = aRegion.name().toLowerCase(); | 73 | regionName = aRegion.name().toLowerCase(); |
77 | if (!this.regions[regionName]) { | 74 | if (!this.regions[regionName]) { |
78 | //MochiKit.Logging.logDebug("--- adding region with name: " + aRegion.name()); | 75 | //MochiKit.Logging.logDebug("--- adding region with name: " + aRegion.name()); |
79 | this.regions[regionName] = aRegion; | 76 | this.regions[regionName] = aRegion; |
80 | } else { | 77 | } else { |
81 | // ???? | 78 | // ???? |
82 | } | 79 | } |
83 | 80 | ||
84 | return aRegion; | 81 | return aRegion; |
85 | }, | 82 | }, |
86 | 83 | ||
87 | //----------------------------------------------------- | 84 | //----------------------------------------------------- |
88 | 85 | ||
89 | 'getRegion': function(target){ | 86 | 'getRegion': function(target){ |
90 | return this.regions[target.toLowerCase()]; | 87 | return this.regions[target.toLowerCase()]; |
91 | }, | 88 | }, |
92 | 89 | ||
93 | //----------------------------------------------------- | 90 | //----------------------------------------------------- |
94 | 91 | ||
95 | 'layout': function(){ | 92 | 'layout': function(){ |
96 | varregion; | 93 | varregion; |
97 | 94 | ||
98 | //MochiKit.Logging.logDebug(">>> IBLayoutManager.layout - regions: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(this.regions))); | 95 | //MochiKit.Logging.logDebug(">>> IBLayoutManager.layout - regions: " + Clipperz.Base.serializeJSON(MochiKit.Base.keys(this.regions))); |
99 | for (region in this.regions) { | 96 | for (region in this.regions) { |
100 | //MochiKit.Logging.logDebug("--- IBLayoutManager.layout - region: " + region); | 97 | //MochiKit.Logging.logDebug("--- IBLayoutManager.layout - region: " + region); |
101 | this.regions[region].layout(); | 98 | this.regions[region].layout(); |
102 | } | 99 | } |
103 | //MochiKit.Logging.logDebug("<<< IBLayoutManager.layout"); | 100 | //MochiKit.Logging.logDebug("<<< IBLayoutManager.layout"); |
104 | }, | 101 | }, |
105 | 102 | ||
106 | //----------------------------------------------------- | 103 | //----------------------------------------------------- |
107 | 104 | ||
108 | 'getSize': function() { | 105 | 'getSize': function() { |
109 | return this.el.getSize(); | 106 | return this.el.getSize(); |
110 | }, | 107 | }, |
111 | 108 | ||
112 | //----------------------------------------------------- | 109 | //----------------------------------------------------- |
113 | __syntaxFix__: '__syntaxFix__' | 110 | __syntaxFix__: '__syntaxFix__' |
114 | }); | 111 | }); |
diff --git a/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js b/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js index 2fd4377..f8e0cb1 100644 --- a/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.js +++ b/frontend/beta/js/Clipperz/YUI/IBLayoutRegion.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 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } | 26 | if (typeof(Clipperz) == 'undefined') { Clipperz = {}; } |
30 | if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } | 27 | if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } |
31 | 28 | ||
32 | 29 | ||
33 | Clipperz.YUI.IBLayoutRegion = function(aManager, aName, aConfig) { | 30 | Clipperz.YUI.IBLayoutRegion = function(aManager, aName, aConfig) { |
34 | this._configuration = aConfig; | 31 | this._configuration = aConfig; |
35 | 32 | ||
36 | //Clipperz.YUI.IBLayoutRegion.superclass.constructor.call(); | 33 | //Clipperz.YUI.IBLayoutRegion.superclass.constructor.call(); |
37 | Clipperz.YUI.IBLayoutRegion.superclass.constructor.call(this, aManager, aConfig, aName); | 34 | Clipperz.YUI.IBLayoutRegion.superclass.constructor.call(this, aManager, aConfig, aName); |
38 | }; | 35 | }; |
39 | 36 | ||
40 | YAHOO.extendX(Clipperz.YUI.IBLayoutRegion, YAHOO.ext.LayoutRegion, { | 37 | YAHOO.extendX(Clipperz.YUI.IBLayoutRegion, YAHOO.ext.LayoutRegion, { |
41 | 38 | ||
42 | 'toString': function() { | 39 | 'toString': function() { |
43 | return "IBLayoutRegion (" + this.name() + ")"; | 40 | return "IBLayoutRegion (" + this.name() + ")"; |
44 | }, | 41 | }, |
45 | 42 | ||
46 | //----------------------------------------------------- | 43 | //----------------------------------------------------- |
47 | 44 | ||
48 | 'name': function() { | 45 | 'name': function() { |
49 | return this.position; | 46 | return this.position; |
50 | }, | 47 | }, |
51 | 48 | ||
52 | //----------------------------------------------------- | 49 | //----------------------------------------------------- |
53 | 50 | ||
54 | 'manager': function() { | 51 | 'manager': function() { |
55 | return this.mgr; | 52 | return this.mgr; |
56 | }, | 53 | }, |
57 | 54 | ||
58 | 'configuration': function() { | 55 | 'configuration': function() { |
59 | return this._configuration; | 56 | return this._configuration; |
60 | }, | 57 | }, |
61 | 58 | ||
62 | //----------------------------------------------------- | 59 | //----------------------------------------------------- |
63 | 60 | ||
64 | 'getAttributeValue': function(anAttribute) { | 61 | 'getAttributeValue': function(anAttribute) { |
65 | var result; | 62 | var result; |
66 | 63 | ||
67 | switch(anAttribute) { | 64 | switch(anAttribute) { |
68 | case "top": | 65 | case "top": |
69 | result = this.element().getTop(); | 66 | result = this.element().getTop(); |
70 | break; | 67 | break; |
71 | case "left": | 68 | case "left": |
72 | result = this.element().getLeft(); | 69 | result = this.element().getLeft(); |
73 | break; | 70 | break; |
74 | case "bottom": | 71 | case "bottom": |
75 | result = this.element().getBottom(); | 72 | result = this.element().getBottom(); |
76 | break; | 73 | break; |
77 | case "right": | 74 | case "right": |
78 | result = this.element().getRight(); | 75 | result = this.element().getRight(); |
79 | break; | 76 | break; |
80 | case "height": | 77 | case "height": |
81 | result = this.element().getHeight(); | 78 | result = this.element().getHeight(); |
82 | break; | 79 | break; |
83 | case "width": | 80 | case "width": |
84 | result = this.element().getWidth(); | 81 | result = this.element().getWidth(); |
85 | break; | 82 | break; |
86 | } | 83 | } |
87 | //MochiKit.Logging.logDebug("--- " + this.name() + " [" + anAttribute + "] = " + result); | 84 | //MochiKit.Logging.logDebug("--- " + this.name() + " [" + anAttribute + "] = " + result); |
88 | 85 | ||
89 | return result; | 86 | return result; |
90 | }, | 87 | }, |
91 | 88 | ||
92 | //----------------------------------------------------- | 89 | //----------------------------------------------------- |
93 | 90 | ||
94 | 'normalizeConfigureValue': function(aConfigurationValue) { | 91 | 'normalizeConfigureValue': function(aConfigurationValue) { |
95 | var result; | 92 | var result; |
96 | 93 | ||
97 | //MochiKit.Logging.logDebug("--- normalizeConfigureValue - " + aConfigurationValue); | 94 | //MochiKit.Logging.logDebug("--- normalizeConfigureValue - " + aConfigurationValue); |
98 | if (typeof(aConfigurationValue) == 'number') { | 95 | if (typeof(aConfigurationValue) == 'number') { |
99 | result = aConfigurationValue; | 96 | result = aConfigurationValue; |
100 | } else if (aConfigurationValue == 'auto') { | 97 | } else if (aConfigurationValue == 'auto') { |
101 | result = aConfigurationValue; | 98 | result = aConfigurationValue; |
102 | } else { | 99 | } else { |
103 | var splitValues; | 100 | var splitValues; |
104 | var referenceValue; | 101 | var referenceValue; |
105 | var deltaValue; | 102 | var deltaValue; |
106 | var targetRegion; | 103 | var targetRegion; |
107 | var targetAttribute; | 104 | var targetAttribute; |
108 | 105 | ||
109 | splitValues = aConfigurationValue.split('+'); | 106 | splitValues = aConfigurationValue.split('+'); |
110 | referenceValue = Clipperz.Base.trim(splitValues[0]); | 107 | referenceValue = Clipperz.Base.trim(splitValues[0]); |
111 | deltaValue = Clipperz.Base.trim(splitValues[1] || ""); | 108 | deltaValue = Clipperz.Base.trim(splitValues[1] || ""); |
112 | 109 | ||
113 | splitValues = referenceValue.split('.'); | 110 | splitValues = referenceValue.split('.'); |
114 | targetRegion = splitValues[0]; | 111 | targetRegion = splitValues[0]; |
115 | targetAttribute = splitValues[1]; | 112 | targetAttribute = splitValues[1]; |
116 | 113 | ||
117 | //MochiKit.Logging.logDebug("> " + aConfigurationValue); | 114 | //MochiKit.Logging.logDebug("> " + aConfigurationValue); |
118 | //MochiKit.Logging.logDebug(">> manager: " + this.manager()); | 115 | //MochiKit.Logging.logDebug(">> manager: " + this.manager()); |
119 | //MochiKit.Logging.logDebug(">> targetRegion: " + targetRegion); | 116 | //MochiKit.Logging.logDebug(">> targetRegion: " + targetRegion); |
120 | //MochiKit.Logging.logDebug(">>> " + this.manager().getRegion(targetRegion)); | 117 | //MochiKit.Logging.logDebug(">>> " + this.manager().getRegion(targetRegion)); |
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,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.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, |
73 | draggable:true, | 70 | draggable:true, |
74 | resizable:false, | 71 | resizable:false, |
75 | constraintoviewport:true, | 72 | constraintoviewport:true, |
76 | fixedcenter:true, | 73 | fixedcenter:true, |
77 | shim:true, | 74 | shim:true, |
78 | modal:true, | 75 | modal:true, |
79 | width:400, height:100, | 76 | width:400, height:100, |
80 | buttonAlign:'center', | 77 | buttonAlign:'center', |
81 | closeClick : function(){ | 78 | closeClick : function(){ |
82 | if(opt && opt.buttons && opt.buttons.no && !opt.buttons.cancel){ | 79 | if(opt && opt.buttons && opt.buttons.no && !opt.buttons.cancel){ |
83 | handleButton('no'); | 80 | handleButton('no'); |
84 | }else{ | 81 | }else{ |
85 | handleButton('cancel'); | 82 | handleButton('cancel'); |
86 | } | 83 | } |
87 | } | 84 | } |
88 | }); | 85 | }); |
89 | dlg.closeClick = function(){ | 86 | dlg.closeClick = function(){ |
90 | alert('wtf'); | 87 | alert('wtf'); |
91 | }; | 88 | }; |
92 | mask = dlg.mask; | 89 | mask = dlg.mask; |
93 | dlg.addKeyListener(27, dlg.hide, dlg); | 90 | dlg.addKeyListener(27, dlg.hide, dlg); |
94 | buttons = {}; | 91 | buttons = {}; |
95 | buttons['ok'] = dlg.addButton(this.buttonText['ok'], handleButton.createCallback('ok')); | 92 | buttons['ok'] = dlg.addButton(this.buttonText['ok'], handleButton.createCallback('ok')); |
96 | buttons['yes'] = dlg.addButton(this.buttonText['yes'], handleButton.createCallback('yes')); | 93 | buttons['yes'] = dlg.addButton(this.buttonText['yes'], handleButton.createCallback('yes')); |
97 | buttons['no'] = dlg.addButton(this.buttonText['no'], handleButton.createCallback('no')); | 94 | buttons['no'] = dlg.addButton(this.buttonText['no'], handleButton.createCallback('no')); |
98 | buttons['cancel'] = dlg.addButton(this.buttonText['cancel'], handleButton.createCallback('cancel')); | 95 | buttons['cancel'] = dlg.addButton(this.buttonText['cancel'], handleButton.createCallback('cancel')); |
99 | bodyEl = dlg.body.createChild({ | 96 | bodyEl = dlg.body.createChild({ |
100 | tag:'div', | 97 | tag:'div', |
101 | html:'<span class="ext-mb-text"></span><br /><input type="text" class="ext-mb-input"><textarea class="ext-mb-textarea"></textarea><div class="ext-mb-progress-wrap"><div class="ext-mb-progress"><div class="ext-mb-progress-bar"> </div></div></div>' | 98 | html:'<span class="ext-mb-text"></span><br /><input type="text" class="ext-mb-input"><textarea class="ext-mb-textarea"></textarea><div class="ext-mb-progress-wrap"><div class="ext-mb-progress"><div class="ext-mb-progress-bar"> </div></div></div>' |
102 | }); | 99 | }); |
103 | msgEl = bodyEl.dom.firstChild; | 100 | msgEl = bodyEl.dom.firstChild; |
104 | textboxEl = getEl(bodyEl.dom.childNodes[2]); | 101 | textboxEl = getEl(bodyEl.dom.childNodes[2]); |
105 | textboxEl.enableDisplayMode(); | 102 | textboxEl.enableDisplayMode(); |
106 | textboxEl.addKeyListener([10,13], function(){ | 103 | textboxEl.addKeyListener([10,13], function(){ |
107 | if(dlg.isVisible() && opt && opt.buttons){ | 104 | if(dlg.isVisible() && opt && opt.buttons){ |
108 | if(opt.buttons.ok){ | 105 | if(opt.buttons.ok){ |
109 | handleButton('ok'); | 106 | handleButton('ok'); |
110 | }else if(opt.buttons.yes){ | 107 | }else if(opt.buttons.yes){ |
111 | handleButton('yes'); | 108 | handleButton('yes'); |
112 | } | 109 | } |
113 | } | 110 | } |
114 | }); | 111 | }); |
115 | textareaEl = getEl(bodyEl.dom.childNodes[3]); | 112 | textareaEl = getEl(bodyEl.dom.childNodes[3]); |
116 | textareaEl.enableDisplayMode(); | 113 | textareaEl.enableDisplayMode(); |
117 | progressEl = getEl(bodyEl.dom.childNodes[4]); | 114 | progressEl = getEl(bodyEl.dom.childNodes[4]); |
118 | progressEl.enableDisplayMode(); | 115 | progressEl.enableDisplayMode(); |
119 | pp = getEl(progressEl.dom.firstChild.firstChild); | 116 | pp = getEl(progressEl.dom.firstChild.firstChild); |
120 | } | 117 | } |