summaryrefslogtreecommitdiffstats
path: root/js/yui3/recordset-indexer
diff options
context:
space:
mode:
authorDave Lawrence <dlawrence@mozilla.com>2012-12-04 22:13:12 +0100
committerDave Lawrence <dlawrence@mozilla.com>2012-12-04 22:13:12 +0100
commit1ee605864f227d40cc83e798dc117ad8e01acb64 (patch)
tree42cc3ff5007202fad4932941b477ac96d5ea0643 /js/yui3/recordset-indexer
parentb061ce481380dfd01f85ea84ef700eb7589433e3 (diff)
downloadbugzilla-1ee605864f227d40cc83e798dc117ad8e01acb64.tar.gz
bugzilla-1ee605864f227d40cc83e798dc117ad8e01acb64.tar.xz
Bug 818091 - Install a full copy of YUI3 into the js directory for use with new extensions/projects
Diffstat (limited to 'js/yui3/recordset-indexer')
-rw-r--r--js/yui3/recordset-indexer/recordset-indexer-min.js7
1 files changed, 7 insertions, 0 deletions
diff --git a/js/yui3/recordset-indexer/recordset-indexer-min.js b/js/yui3/recordset-indexer/recordset-indexer-min.js
new file mode 100644
index 000000000..b00e48c6c
--- /dev/null
+++ b/js/yui3/recordset-indexer/recordset-indexer-min.js
@@ -0,0 +1,7 @@
+/*
+YUI 3.7.3 (build 5687)
+Copyright 2012 Yahoo! Inc. All rights reserved.
+Licensed under the BSD License.
+http://yuilibrary.com/license/
+*/
+YUI.add("recordset-indexer",function(e,t){function n(e){n.superclass.constructor.apply(this,arguments)}e.mix(n,{NS:"indexer",NAME:"recordsetIndexer",ATTRS:{hashTables:{value:{}},keys:{value:{}}}}),e.extend(n,e.Plugin.Base,{initializer:function(t){var n=this.get("host");this.onHostEvent("add",e.bind("_defAddHash",this),n),this.onHostEvent("remove",e.bind("_defRemoveHash",this),n),this.onHostEvent("update",e.bind("_defUpdateHash",this),n)},destructor:function(e){},_setHashTable:function(e){var t=this.get("host"),n={},r=0,i=t.getLength();for(;r<i;r++)n[t._items[r].getValue(e)]=t._items[r];return n},_defAddHash:function(t){var n=this.get("hashTables");e.each(n,function(n,r){e.each(t.added||t.updated,function(e){e.getValue(r)&&(n[e.getValue(r)]=e)})})},_defRemoveHash:function(t){var n=this.get("hashTables"),r;e.each(n,function(n,i){e.each(t.removed||t.overwritten,function(e){r=e.getValue(i),r&&n[r]===e&&delete n[r]})})},_defUpdateHash:function(e){e.added=e.updated,e.removed=e.overwritten,this._defAddHash(e),this._defRemoveHash(e)},createTable:function(e){var t=this.get("hashTables");return t[e]=this._setHashTable(e),this.set("hashTables",t),t[e]},getTable:function(e){return this.get("hashTables")[e]}}),e.namespace("Plugin").RecordsetIndexer=n},"3.7.3",{requires:["recordset-base","plugin"]});