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/gamma/js/Clipperz/YUI | |
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/gamma/js/Clipperz/YUI') (more/less context) (ignore 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,46 +1,44 @@ | |||
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; |
39 | var tempTableEl = null; | 37 | var tempTableEl = null; |
40 | /** True to force the use of DOM instead of html fragments @type Boolean */ | 38 | /** True to force the use of DOM instead of html fragments @type Boolean */ |
41 | this.useDom = false; | 39 | this.useDom = false; |
42 | 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; | 40 | 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; |
43 | /** | 41 | /** |
44 | * Applies a style specification to an element | 42 | * Applies a style specification to an element |
45 | * @param {String/HTMLElement} el The element to apply styles to | 43 | * @param {String/HTMLElement} el The element to apply styles to |
46 | * @param {String/Object/Function} styles A style specification string eg "width:100px", or object in the form {width:"100px"}, or | 44 | * @param {String/Object/Function} styles A style specification string eg "width:100px", or object in the form {width:"100px"}, or |
@@ -419,60 +417,55 @@ Clipperz.YUI.DomHelper.Template.prototype = { | |||
419 | /** | 417 | /** |
420 | * Applies the supplied values to the template and inserts the new node(s) after el | 418 | * Applies the supplied values to the template and inserts the new node(s) after el |
421 | * @param {String/HTMLElement/Element} el The context element | 419 | * @param {String/HTMLElement/Element} el The context element |
422 | * @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'}) | 420 | * @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'}) |
423 | * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.Element | 421 | * @param {<i>Boolean</i>} returnElement (optional) true to return a YAHOO.Element |
424 | * @return {HTMLElement} The new node | 422 | * @return {HTMLElement} The new node |
425 | */ | 423 | */ |
426 | insertAfter : function(el, values, returnElement){ | 424 | insertAfter : function(el, values, returnElement){ |
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 | } |
471 | }; | 464 | }; |
472 | /** | 465 | /** |
473 | * Alias for applyTemplate | 466 | * Alias for applyTemplate |
474 | * @method | 467 | * @method |
475 | */ | 468 | */ |
476 | Clipperz.YUI.DomHelper.Template.prototype.apply = Clipperz.YUI.DomHelper.Template.prototype.applyTemplate; | 469 | Clipperz.YUI.DomHelper.Template.prototype.apply = Clipperz.YUI.DomHelper.Template.prototype.applyTemplate; |
477 | 470 | ||
478 | Clipperz.YUI.Template = Clipperz.YUI.DomHelper.Template; | 471 | Clipperz.YUI.Template = Clipperz.YUI.DomHelper.Template; |
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,46 +1,44 @@ | |||
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). |
39 | * @singleton | 37 | * @singleton |
40 | */ | 38 | */ |
41 | Clipperz.YUI.DomQuery = function(){ | 39 | Clipperz.YUI.DomQuery = function(){ |
42 | var cache = {}, simpleCache = {}, valueCache = {}; | 40 | var cache = {}, simpleCache = {}, valueCache = {}; |
43 | var nonSpace = /\S/; | 41 | var nonSpace = /\S/; |
44 | var trimRe = /^\s*(.*?)\s*$/; | 42 | var trimRe = /^\s*(.*?)\s*$/; |
45 | var tplRe = /\{(\d+)\}/g; | 43 | var tplRe = /\{(\d+)\}/g; |
46 | var modeRe = /^(\s?[\/>]\s?|\s|$)/; | 44 | var modeRe = /^(\s?[\/>]\s?|\s|$)/; |
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,46 +1,44 @@ | |||
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 | } |
39 | 37 | ||
40 | if (overrides) { | 38 | if (overrides) { |
41 | for (var i in overrides) { | 39 | for (var i in overrides) { |
42 | subc.prototype[i]=overrides[i]; | 40 | subc.prototype[i]=overrides[i]; |
43 | } | 41 | } |
44 | } | 42 | } |
45 | }; | 43 | }; |
46 | 44 | ||