Diffstat (limited to 'frontend/beta/js/Clipperz/YUI/DomQuery.js') (more/less context) (ignore whitespace changes)
-rw-r--r-- | frontend/beta/js/Clipperz/YUI/DomQuery.js | 22 |
1 files changed, 10 insertions, 12 deletions
diff --git a/frontend/beta/js/Clipperz/YUI/DomQuery.js b/frontend/beta/js/Clipperz/YUI/DomQuery.js index 4ad4193..6e54b6c 100644 --- a/frontend/beta/js/Clipperz/YUI/DomQuery.js +++ b/frontend/beta/js/Clipperz/YUI/DomQuery.js | |||
@@ -1,86 +1,84 @@ | |||
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 | /* | 24 | /* |
27 | * yui-ext 0.40 | 25 | * yui-ext 0.40 |
28 | * Copyright(c) 2006, Jack Slocum. | 26 | * Copyright(c) 2006, Jack Slocum. |
29 | */ | 27 | */ |
30 | 28 | ||
31 | /** | 29 | /** |
32 | * @class Ext.DomQuery | 30 | * @class Ext.DomQuery |
33 | * Provides high performance selector/xpath processing by compiling queries into reusable functions. | 31 | * Provides high performance selector/xpath processing by compiling queries into reusable functions. |
34 | * New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in). | 32 | * New pseudo classes and matchers can be plugged. It works on HTML and XML documents (if a content node is passed in). |
35 | * @singleton | 33 | * @singleton |
36 | */ | 34 | */ |
37 | Ext.DomQuery = function(){ | 35 | Ext.DomQuery = function(){ |
38 | var cache = {}, simpleCache = {}, valueCache = {}; | 36 | var cache = {}, simpleCache = {}, valueCache = {}; |
39 | var nonSpace = /\S/; | 37 | var nonSpace = /\S/; |
40 | var trimRe = /^\s*(.*?)\s*$/; | 38 | var trimRe = /^\s*(.*?)\s*$/; |
41 | var tplRe = /\{(\d+)\}/g; | 39 | var tplRe = /\{(\d+)\}/g; |
42 | var modeRe = /^(\s?[\/>]\s?|\s|$)/; | 40 | var modeRe = /^(\s?[\/>]\s?|\s|$)/; |
43 | var clsRes = {}; | 41 | var clsRes = {}; |
44 | 42 | ||
45 | function child(p, index){ | 43 | function child(p, index){ |
46 | var i = 0; | 44 | var i = 0; |
47 | var n = p.firstChild; | 45 | var n = p.firstChild; |
48 | while(n){ | 46 | while(n){ |
49 | if(n.nodeType == 1){ | 47 | if(n.nodeType == 1){ |
50 | i++; | 48 | i++; |
51 | if(i == index){ | 49 | if(i == index){ |
52 | return n; | 50 | return n; |
53 | } | 51 | } |
54 | } | 52 | } |
55 | n = n.nextSibling; | 53 | n = n.nextSibling; |
56 | } | 54 | } |
57 | return null; | 55 | return null; |
58 | }; | 56 | }; |
59 | 57 | ||
60 | function next(d){ | 58 | function next(d){ |
61 | var n = d.nextSibling; | 59 | var n = d.nextSibling; |
62 | while(n && n.nodeType != 1){ | 60 | while(n && n.nodeType != 1){ |
63 | n = n.nextSibling; | 61 | n = n.nextSibling; |
64 | } | 62 | } |
65 | return n; | 63 | return n; |
66 | }; | 64 | }; |
67 | 65 | ||
68 | function prev(d){ | 66 | function prev(d){ |
69 | var n = d.previousSibling; | 67 | var n = d.previousSibling; |
70 | while(n && n.nodeType != 1){ | 68 | while(n && n.nodeType != 1){ |
71 | n = n.previousSibling; | 69 | n = n.previousSibling; |
72 | } | 70 | } |
73 | return n; | 71 | return n; |
74 | }; | 72 | }; |
75 | 73 | ||
76 | function clean(d){ | 74 | function clean(d){ |
77 | var n = d.firstChild, ni = -1; | 75 | var n = d.firstChild, ni = -1; |
78 | while(n){ | 76 | while(n){ |
79 | var nx = n.nextSibling; | 77 | var nx = n.nextSibling; |
80 | if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ | 78 | if(n.nodeType == 3 && !nonSpace.test(n.nodeValue)){ |
81 | d.removeChild(n); | 79 | d.removeChild(n); |
82 | }else{ | 80 | }else{ |
83 | n.nodeIndex = ++ni; | 81 | n.nodeIndex = ++ni; |
84 | } | 82 | } |
85 | n = nx; | 83 | n = nx; |
86 | } | 84 | } |