summaryrefslogtreecommitdiffstats
path: root/js/yui3/gallery-node-optimizations
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2013-01-03 20:41:44 +0100
committerDave Lawrence <dlawrence@mozilla.com>2013-01-03 20:41:44 +0100
commita29bc8846fac5d7bcbe37ed306eb612bfc74acee (patch)
tree20e0b5e7531797d891a912749d068b34903cd7d7 /js/yui3/gallery-node-optimizations
parentf3975a11266aad202f31ce6fe8e86f321c68cd3e (diff)
downloadbugzilla-a29bc8846fac5d7bcbe37ed306eb612bfc74acee.tar.gz
bugzilla-a29bc8846fac5d7bcbe37ed306eb612bfc74acee.tar.xz
More MyDashboard work
Diffstat (limited to 'js/yui3/gallery-node-optimizations')
-rw-r--r--js/yui3/gallery-node-optimizations/gallery-node-optimizations-min.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/js/yui3/gallery-node-optimizations/gallery-node-optimizations-min.js b/js/yui3/gallery-node-optimizations/gallery-node-optimizations-min.js
new file mode 100644
index 000000000..297b60ac6
--- /dev/null
+++ b/js/yui3/gallery-node-optimizations/gallery-node-optimizations-min.js
@@ -0,0 +1 @@
+YUI.add("gallery-node-optimizations",function(e,t){"use strict";var n=/^([a-z]*)\.([-_a-z0-9]+)$/i,r=/^\.([-_a-z0-9]+)$/i,i=/^[a-z]+$/i;e.Node.class_re_prefix="(?:^|\\s)(?:",e.Node.class_re_suffix=")(?:\\s|$)";var s=e.Node.prototype.ancestor;e.Node.prototype.ancestor=function(t,n){if(e.Lang.isString(t)){var o=r.exec(t);if(o&&o.length)return this.getAncestorByClassName(o[1],n);if(i.test(t))return this.getAncestorByTagName(t,n)}return s.apply(this,arguments)},e.Node.prototype.getAncestorByClassName=function(t,n){var r=this._node;n||(r=r.parentNode);while(r&&!e.DOM.hasClass(r,t)){r=r.parentNode;if(!r||!r.tagName)return null}return e.one(r)},e.Node.prototype.getAncestorByTagName=function(t,n){var r=this._node;n||(r=r.parentNode),t=t.toLowerCase();while(r&&r.tagName.toLowerCase()!=t){r=r.parentNode;if(!r||!r.tagName)return null}return e.one(r)},e.Node.prototype.getElementsByClassName=function(t,n){var r=e.Node.getDOMNode(this).getElementsByTagName(n||"*"),i=new e.NodeList;for(var s=0;s<r.length;s++){var o=r[s];e.DOM.hasClass(o,t)&&i.push(o)}return i},e.Node.prototype.getFirstElementByClassName=function(t,n){if(!n||n=="*"||n=="div"){var r=[e.Node.getDOMNode(this)],i=[];while(r.length){for(var s=0;s<r.length;s++){var o=r[s],u=o.children||o.childNodes;for(var a=0;a<u.length;a++){var f=u[a];if(e.DOM.hasClass(f,t))return e.one(f);i.push(f)}}r=i,i=[]}}else{var l=e.Node.getDOMNode(this).getElementsByTagName(n||"*");for(var s=0;s<l.length;s++){var f=l[s];if(e.DOM.hasClass(f,t))return e.one(f)}}return null}},"@VERSION@",{requires:["node-base"]});