Diffstat (limited to 'frontend/gamma/js/Clipperz/YUI') (more/less context) (show whitespace changes)
-rw-r--r-- | frontend/gamma/js/Clipperz/YUI/DomHelper.js | 29 | ||||
-rw-r--r-- | frontend/gamma/js/Clipperz/YUI/DomQuery.js | 22 | ||||
-rw-r--r-- | frontend/gamma/js/Clipperz/YUI/Utils.js | 22 |
3 files changed, 31 insertions, 42 deletions
diff --git a/frontend/gamma/js/Clipperz/YUI/DomHelper.js b/frontend/gamma/js/Clipperz/YUI/DomHelper.js index 87c74f5..0a1f9fe 100644 --- a/frontend/gamma/js/Clipperz/YUI/DomHelper.js +++ b/frontend/gamma/js/Clipperz/YUI/DomHelper.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.YUI) == 'undefined') { Clipperz.YUI = {}; } | 25 | if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } |
28 | 26 | ||
29 | 27 | ||
30 | /** | 28 | /** |
31 | * @class Clipperz.ext.DomHelper | 29 | * @class Clipperz.ext.DomHelper |
32 | * Utility class for working with DOM and/or Templates. It transparently supports using HTML fragments or DOM. | 30 | * Utility class for working with DOM and/or Templates. It transparently supports using HTML fragments or DOM. |
33 | * 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>. | 31 | * 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>. |
34 | * @singleton | 32 | * @singleton |
35 | */ | 33 | */ |
36 | Clipperz.YUI.DomHelper = new function(){ | 34 | Clipperz.YUI.DomHelper = new function(){ |
37 | /**@private*/ | 35 | /**@private*/ |
38 | var d = document; | 36 | var d = document; |
@@ -427,44 +425,39 @@ Clipperz.YUI.DomHelper.Template.prototype = { | |||
427 | el = el.dom ? el.dom : YAHOO.util.Dom.get(el); | 425 | el = el.dom ? el.dom : YAHOO.util.Dom.get(el); |
428 | var newNode = Clipperz.YUI.DomHelper.insertHtml('afterEnd', el, this.applyTemplate(values)); | 426 | var newNode = Clipperz.YUI.DomHelper.insertHtml('afterEnd', el, this.applyTemplate(values)); |
429 | return returnElement ? YAHOO.Element.get(newNode, true) : newNode; | 427 | return returnElement ? YAHOO.Element.get(newNode, true) : newNode; |
430 | }, | 428 | }, |
431 | 429 | ||
432 | /** | 430 | /** |
433 | * Applies the supplied values to the template and append the new node(s) to el | 431 | * Applies the supplied values to the template and append the new node(s) to el |
434 | * @param {String/HTMLElement/Element} el The context element | 432 | * @param {String/HTMLElement/Element} el The context element |
435 | * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) | 433 | * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) |
436 | * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.Element | 434 | * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.Element |
437 | * @return {HTMLElement} The new node | 435 | * @return {HTMLElement} The new node |
438 | */ | 436 | */ |
439 | append : function(el, values, returnElement){ | 437 | append : function(el, values, returnElement){ |
440 | var sanitizedValues; | 438 | var sanitizedValues; |
441 | var key; | 439 | var key; |
442 | 440 | ||
443 | // sanitizedValues = MochiKit.Base.map(sanitizedValues) | ||
444 | //console.log("values", values); | ||
445 | sanitizedValues = {}; | 441 | sanitizedValues = {}; |
446 | for (key in values) { | 442 | for (key in values) { |
447 | sanitizedValues[key] = Clipperz.Base.sanitizeString(values[key]); | 443 | sanitizedValues[key] = Clipperz.Base.sanitizeString(values[key]); |
448 | } | 444 | } |
449 | //console.log("sanitizedValues", sanitizedValues); | ||
450 | // el = el.dom ? el.dom : YAHOO.util.Dom.get(el); | ||
451 | el = (typeof el == 'string') ? YAHOO.util.Dom.get(el) : el; | 445 | el = (typeof el == 'string') ? YAHOO.util.Dom.get(el) : el; |
452 | //Clipperz.log(this.applyTemplate(sanitizedValues)); | ||
453 | var newNode = Clipperz.YUI.DomHelper.insertHtml('beforeEnd', el, this.applyTemplate(sanitizedValues)); | 446 | var newNode = Clipperz.YUI.DomHelper.insertHtml('beforeEnd', el, this.applyTemplate(sanitizedValues)); |
454 | // return returnElement ? YAHOO.Element.get(newNode, true) : newNode; | 447 | |
455 | return newNode; | 448 | return newNode; |
456 | }, | 449 | }, |
457 | 450 | ||
458 | /** | 451 | /** |
459 | * Applies the supplied values to the template and overwrites the content of el with the new node(s) | 452 | * Applies the supplied values to the template and overwrites the content of el with the new node(s) |
460 | * @param {String/HTMLElement/Element} el The context element | 453 | * @param {String/HTMLElement/Element} el The context element |
461 | * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) | 454 | * @param {Object} values The template values. Can be an array if your params are numeric (i.e. {0}) or an object (i.e. {foo: 'bar'}) |
462 | * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.Element | 455 | * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.Element |
463 | * @return {HTMLElement} The new node | 456 | * @return {HTMLElement} The new node |
464 | */ | 457 | */ |
465 | overwrite : function(el, values, returnElement){ | 458 | overwrite : function(el, values, returnElement){ |
466 | el = el.dom ? el.dom : YAHOO.util.Dom.get(el); | 459 | el = el.dom ? el.dom : YAHOO.util.Dom.get(el); |
467 | el.innerHTML = ''; | 460 | el.innerHTML = ''; |
468 | var newNode = Clipperz.YUI.DomHelper.insertHtml('beforeEnd', el, this.applyTemplate(values)); | 461 | var newNode = Clipperz.YUI.DomHelper.insertHtml('beforeEnd', el, this.applyTemplate(values)); |
469 | return returnElement ? YAHOO.Element.get(newNode, true) : newNode; | 462 | return returnElement ? YAHOO.Element.get(newNode, true) : newNode; |
470 | } | 463 | } |
diff --git a/frontend/gamma/js/Clipperz/YUI/DomQuery.js b/frontend/gamma/js/Clipperz/YUI/DomQuery.js index 76d0fae..c1af0ca 100644 --- a/frontend/gamma/js/Clipperz/YUI/DomQuery.js +++ b/frontend/gamma/js/Clipperz/YUI/DomQuery.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.YUI) == 'undefined') { Clipperz.YUI = {}; } | 25 | if (typeof(Clipperz.YUI) == 'undefined') { Clipperz.YUI = {}; } |
28 | 26 | ||
29 | 27 | ||
30 | /* | 28 | /* |
31 | * yui-ext 0.40 | 29 | * yui-ext 0.40 |
32 | * Copyright(c) 2006, Jack Slocum. | 30 | * Copyright(c) 2006, Jack Slocum. |
33 | */ | 31 | */ |
34 | 32 | ||
35 | /** | 33 | /** |
36 | * @class Clipperz.YUI.DomQuery | 34 | * @class Clipperz.YUI.DomQuery |
37 | * Provides high performance selector/xpath processing by compiling queries into reusable functions. | 35 | * Provides high performance selector/xpath processing by compiling queries into reusable functions. |
38 | * New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in). | 36 | * New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in). |
diff --git a/frontend/gamma/js/Clipperz/YUI/Utils.js b/frontend/gamma/js/Clipperz/YUI/Utils.js index e9929fc..4def842 100644 --- a/frontend/gamma/js/Clipperz/YUI/Utils.js +++ b/frontend/gamma/js/Clipperz/YUI/Utils.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 YAHOO == 'undefined') { YAHOO = {}; }; | 24 | if (typeof YAHOO == 'undefined') { YAHOO = {}; }; |
27 | if (typeof YAHOO.util == 'undefined') { YAHOO.util = {}; }; | 25 | if (typeof YAHOO.util == 'undefined') { YAHOO.util = {}; }; |
28 | if (typeof YAHOO.util.Dom == 'undefined') { YAHOO.util.Dom = {}; }; | 26 | if (typeof YAHOO.util.Dom == 'undefined') { YAHOO.util.Dom = {}; }; |
29 | 27 | ||
30 | YAHOO.extend = function(subc, superc, overrides) { | 28 | YAHOO.extend = function(subc, superc, overrides) { |
31 | var F = function() {}; | 29 | var F = function() {}; |
32 | F.prototype=superc.prototype; | 30 | F.prototype=superc.prototype; |
33 | subc.prototype=new F(); | 31 | subc.prototype=new F(); |
34 | subc.prototype.constructor=subc; | 32 | subc.prototype.constructor=subc; |
35 | subc.superclass=superc.prototype; | 33 | subc.superclass=superc.prototype; |
36 | if (superc.prototype.constructor == Object.prototype.constructor) { | 34 | if (superc.prototype.constructor == Object.prototype.constructor) { |
37 | superc.prototype.constructor=superc; | 35 | superc.prototype.constructor=superc; |
38 | } | 36 | } |