]> git.wh0rd.org - tt-rss.git/blobdiff - lib/dojo/behavior.js
upgrade dojo to 1.8.3 (refs #570)
[tt-rss.git] / lib / dojo / behavior.js
index 3420fec2088394f96a2740f574636d321f4aaf36..40d5d6a7ff75ecdf1cc7c81d5703beb47d131f45 100644 (file)
@@ -1,94 +1,8 @@
 /*
-       Copyright (c) 2004-2010, The Dojo Foundation All Rights Reserved.
+       Copyright (c) 2004-2012, The Dojo Foundation All Rights Reserved.
        Available via Academic Free License >= 2.1 OR the modified BSD license.
        see: http://dojotoolkit.org/license for details
 */
 
-
-if(!dojo._hasResource["dojo.behavior"]){
-dojo._hasResource["dojo.behavior"]=true;
-dojo.provide("dojo.behavior");
-dojo.behavior=new function(){
-function _1(_2,_3){
-if(!_2[_3]){
-_2[_3]=[];
-}
-return _2[_3];
-};
-var _4=0;
-function _5(_6,_7,_8){
-var _9={};
-for(var x in _6){
-if(typeof _9[x]=="undefined"){
-if(!_8){
-_7(_6[x],x);
-}else{
-_8.call(_7,_6[x],x);
-}
-}
-}
-};
-this._behaviors={};
-this.add=function(_a){
-var _b={};
-_5(_a,this,function(_c,_d){
-var _e=_1(this._behaviors,_d);
-if(typeof _e["id"]!="number"){
-_e.id=_4++;
-}
-var _f=[];
-_e.push(_f);
-if((dojo.isString(_c))||(dojo.isFunction(_c))){
-_c={found:_c};
-}
-_5(_c,function(_10,_11){
-_1(_f,_11).push(_10);
-});
-});
-};
-var _12=function(_13,_14,_15){
-if(dojo.isString(_14)){
-if(_15=="found"){
-dojo.publish(_14,[_13]);
-}else{
-dojo.connect(_13,_15,function(){
-dojo.publish(_14,arguments);
-});
-}
-}else{
-if(dojo.isFunction(_14)){
-if(_15=="found"){
-_14(_13);
-}else{
-dojo.connect(_13,_15,_14);
-}
-}
-}
-};
-this.apply=function(){
-_5(this._behaviors,function(_16,id){
-dojo.query(id).forEach(function(_17){
-var _18=0;
-var bid="_dj_behavior_"+_16.id;
-if(typeof _17[bid]=="number"){
-_18=_17[bid];
-if(_18==(_16.length)){
-return;
-}
-}
-for(var x=_18,_19;_19=_16[x];x++){
-_5(_19,function(_1a,_1b){
-if(dojo.isArray(_1a)){
-dojo.forEach(_1a,function(_1c){
-_12(_17,_1c,_1b);
-});
-}
-});
-}
-_17[bid]=_16.length;
-});
-});
-};
-};
-dojo.addOnLoad(dojo.behavior,"apply");
-}
+//>>built
+define("dojo/behavior",["./_base/kernel","./_base/lang","./_base/array","./_base/connect","./query","./ready"],function(_1,_2,_3,_4,_5,_6){_1.deprecated("dojo.behavior","Use dojo/on with event delegation (on.selector())");var _7=function(){function _8(_9,_a){if(!_9[_a]){_9[_a]=[];}return _9[_a];};var _b=0;function _c(_d,_e,_f){var _10={};for(var x in _d){if(typeof _10[x]=="undefined"){if(!_f){_e(_d[x],x);}else{_f.call(_e,_d[x],x);}}}};this._behaviors={};this.add=function(_11){_c(_11,this,function(_12,_13){var _14=_8(this._behaviors,_13);if(typeof _14["id"]!="number"){_14.id=_b++;}var _15=[];_14.push(_15);if((_2.isString(_12))||(_2.isFunction(_12))){_12={found:_12};}_c(_12,function(_16,_17){_8(_15,_17).push(_16);});});};var _18=function(_19,_1a,_1b){if(_2.isString(_1a)){if(_1b=="found"){_4.publish(_1a,[_19]);}else{_4.connect(_19,_1b,function(){_4.publish(_1a,arguments);});}}else{if(_2.isFunction(_1a)){if(_1b=="found"){_1a(_19);}else{_4.connect(_19,_1b,_1a);}}}};this.apply=function(){_c(this._behaviors,function(_1c,id){_5(id).forEach(function(_1d){var _1e=0;var bid="_dj_behavior_"+_1c.id;if(typeof _1d[bid]=="number"){_1e=_1d[bid];if(_1e==(_1c.length)){return;}}for(var x=_1e,_1f;_1f=_1c[x];x++){_c(_1f,function(_20,_21){if(_2.isArray(_20)){_3.forEach(_20,function(_22){_18(_1d,_22,_21);});}});}_1d[bid]=_1c.length;});});};};_1.behavior=new _7();_6(_1.behavior,"apply");return _1.behavior;});
\ No newline at end of file