]> git.wh0rd.org - tt-rss.git/blobdiff - lib/dijit/layout/ContentPane.js
lib: Upgrade Dojo and Dijit from 1.8.3 to 1.12.1
[tt-rss.git] / lib / dijit / layout / ContentPane.js
index 1e2a2036bb4bc93d266d26b714d4361da824dbee..5edf9876429e536ebb1870f3d0f3eede3b95e7b6 100644 (file)
@@ -1,2 +1,2 @@
 //>>built
-define("dijit/layout/ContentPane",["dojo/_base/kernel","dojo/_base/lang","../_Widget","./_ContentPaneResizeMixin","dojo/string","dojo/html","dojo/i18n!../nls/loading","dojo/_base/array","dojo/_base/declare","dojo/_base/Deferred","dojo/dom","dojo/dom-attr","dojo/_base/window","dojo/_base/xhr","dojo/i18n"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,_c,_d,_e,_f){return _9("dijit.layout.ContentPane",[_3,_4],{href:"",content:"",extractContent:false,parseOnLoad:true,parserScope:_1._scopeName,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'><span class='dijitInline dijitIconLoading'></span>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'><span class='dijitInline dijitIconError'></span>${errorState}</span>",isLoaded:false,baseClass:"dijitContentPane",ioArgs:{},onLoadDeferred:null,_setTitleAttr:null,stopParser:true,template:false,create:function(_10,_11){if((!_10||!_10.template)&&_11&&!("href" in _10)&&!("content" in _10)){var df=_d.doc.createDocumentFragment();_11=_b.byId(_11);while(_11.firstChild){df.appendChild(_11.firstChild);}_10=_2.delegate(_10,{content:df});}this.inherited(arguments,[_10,_11]);},postMixInProperties:function(){this.inherited(arguments);var _12=_f.getLocalization("dijit","loading",this.lang);this.loadingMessage=_5.substitute(this.loadingMessage,_12);this.errorMessage=_5.substitute(this.errorMessage,_12);},buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode;}this.domNode.title="";if(!_c.get(this.domNode,"role")){this.domNode.setAttribute("role","group");}},startup:function(){this.inherited(arguments);if(this._contentSetter){_8.forEach(this._contentSetter.parseResults,function(obj){if(!obj._started&&!obj._destroyed&&_2.isFunction(obj.startup)){obj.startup();obj._started=true;}},this);}},setHref:function(_13){_1.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.","","2.0");return this.set("href",_13);},_setHrefAttr:function(_14){this.cancel();this.onLoadDeferred=new _a(_2.hitch(this,"cancel"));this.onLoadDeferred.addCallback(_2.hitch(this,"onLoad"));this._set("href",_14);if(this.preload||(this._created&&this._isShown())){this._load();}else{this._hrefChanged=true;}return this.onLoadDeferred;},setContent:function(_15){_1.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use set('content', ...) instead.","","2.0");this.set("content",_15);},_setContentAttr:function(_16){this._set("href","");this.cancel();this.onLoadDeferred=new _a(_2.hitch(this,"cancel"));if(this._created){this.onLoadDeferred.addCallback(_2.hitch(this,"onLoad"));}this._setContent(_16||"");this._isDownloaded=false;return this.onLoadDeferred;},_getContentAttr:function(){return this.containerNode.innerHTML;},cancel:function(){if(this._xhrDfd&&(this._xhrDfd.fired==-1)){this._xhrDfd.cancel();}delete this._xhrDfd;this.onLoadDeferred=null;},uninitialize:function(){if(this._beingDestroyed){this.cancel();}this.inherited(arguments);},destroyRecursive:function(_17){if(this._beingDestroyed){return;}this.inherited(arguments);},_onShow:function(){this.inherited(arguments);if(this.href){if(!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow)){return this.refresh();}}},refresh:function(){this.cancel();this.onLoadDeferred=new _a(_2.hitch(this,"cancel"));this.onLoadDeferred.addCallback(_2.hitch(this,"onLoad"));this._load();return this.onLoadDeferred;},_load:function(){this._setContent(this.onDownloadStart(),true);var _18=this;var _19={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};if(_2.isObject(this.ioArgs)){_2.mixin(_19,this.ioArgs);}var _1a=(this._xhrDfd=(this.ioMethod||_e.get)(_19));_1a.addCallback(function(_1b){try{_18._isDownloaded=true;_18._setContent(_1b,false);_18.onDownloadEnd();}catch(err){_18._onError("Content",err);}delete _18._xhrDfd;return _1b;});_1a.addErrback(function(err){if(!_1a.canceled){_18._onError("Download",err);}delete _18._xhrDfd;return err;});delete this._hrefChanged;},_onLoadHandler:function(_1c){this._set("isLoaded",true);try{this.onLoadDeferred.callback(_1c);}catch(e){console.error("Error "+this.widgetId+" running custom onLoad code: "+e.message);}},_onUnloadHandler:function(){this._set("isLoaded",false);try{this.onUnload();}catch(e){console.error("Error "+this.widgetId+" running custom onUnload code: "+e.message);}},destroyDescendants:function(_1d){if(this.isLoaded){this._onUnloadHandler();}var _1e=this._contentSetter;_8.forEach(this.getChildren(),function(_1f){if(_1f.destroyRecursive){_1f.destroyRecursive(_1d);}});if(_1e){_8.forEach(_1e.parseResults,function(_20){if(_20.destroyRecursive&&_20.domNode&&_20.domNode.parentNode==_d.body()){_20.destroyRecursive(_1d);}});delete _1e.parseResults;}if(!_1d){_6._emptyNode(this.containerNode);}delete this._singleChild;},_setContent:function(_21,_22){this.destroyDescendants();var _23=this._contentSetter;if(!(_23&&_23 instanceof _6._ContentSetter)){_23=this._contentSetter=new _6._ContentSetter({node:this.containerNode,_onError:_2.hitch(this,this._onError),onContentError:_2.hitch(this,function(e){var _24=this.onContentError(e);try{this.containerNode.innerHTML=_24;}catch(e){console.error("Fatal "+this.id+" could not change content due to "+e.message,e);}})});}var _25=_2.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:!_21.domNode&&this.parseOnLoad,parserScope:this.parserScope,startup:false,dir:this.dir,lang:this.lang,textDir:this.textDir},this._contentSetterParams||{});_23.set((_2.isObject(_21)&&_21.domNode)?_21.domNode:_21,_25);delete this._contentSetterParams;if(this.doLayout){this._checkIfSingleChild();}if(!_22){if(this._started){delete this._started;this.startup();this._scheduleLayout();}this._onLoadHandler(_21);}},_onError:function(_26,err,_27){this.onLoadDeferred.errback(err);var _28=this["on"+_26+"Error"].call(this,err);if(_27){console.error(_27,err);}else{if(_28){this._setContent(_28,true);}}},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage;},onContentError:function(){},onDownloadError:function(){return this.errorMessage;},onDownloadEnd:function(){}});});
\ No newline at end of file
+define("dijit/layout/ContentPane",["dojo/_base/kernel","dojo/_base/lang","../_Widget","../_Container","./_ContentPaneResizeMixin","dojo/string","dojo/html","dojo/_base/array","dojo/_base/declare","dojo/_base/Deferred","dojo/dom","dojo/dom-attr","dojo/dom-construct","dojo/_base/xhr","dojo/i18n","dojo/when","dojo/i18n!../nls/loading"],function(_1,_2,_3,_4,_5,_6,_7,_8,_9,_a,_b,_c,_d,_e,_f,_10){return _9("dijit.layout.ContentPane",[_3,_4,_5],{href:"",content:"",extractContent:false,parseOnLoad:true,parserScope:_1._scopeName,preventCache:false,preload:false,refreshOnShow:false,loadingMessage:"<span class='dijitContentPaneLoading'><span class='dijitInline dijitIconLoading'></span>${loadingState}</span>",errorMessage:"<span class='dijitContentPaneError'><span class='dijitInline dijitIconError'></span>${errorState}</span>",isLoaded:false,baseClass:"dijitContentPane",ioArgs:{},onLoadDeferred:null,_setTitleAttr:null,stopParser:true,template:false,markupFactory:function(_11,_12,_13){var _14=new _13(_11,_12);return !_14.href&&_14._contentSetter&&_14._contentSetter.parseDeferred&&!_14._contentSetter.parseDeferred.isFulfilled()?_14._contentSetter.parseDeferred.then(function(){return _14;}):_14;},create:function(_15,_16){if((!_15||!_15.template)&&_16&&!("href" in _15)&&!("content" in _15)){_16=_b.byId(_16);var df=_16.ownerDocument.createDocumentFragment();while(_16.firstChild){df.appendChild(_16.firstChild);}_15=_2.delegate(_15,{content:df});}this.inherited(arguments,[_15,_16]);},postMixInProperties:function(){this.inherited(arguments);var _17=_f.getLocalization("dijit","loading",this.lang);this.loadingMessage=_6.substitute(this.loadingMessage,_17);this.errorMessage=_6.substitute(this.errorMessage,_17);},buildRendering:function(){this.inherited(arguments);if(!this.containerNode){this.containerNode=this.domNode;}this.domNode.removeAttribute("title");},startup:function(){this.inherited(arguments);if(this._contentSetter){_8.forEach(this._contentSetter.parseResults,function(obj){if(!obj._started&&!obj._destroyed&&_2.isFunction(obj.startup)){obj.startup();obj._started=true;}},this);}},_startChildren:function(){_8.forEach(this.getChildren(),function(obj){if(!obj._started&&!obj._destroyed&&_2.isFunction(obj.startup)){obj.startup();obj._started=true;}});if(this._contentSetter){_8.forEach(this._contentSetter.parseResults,function(obj){if(!obj._started&&!obj._destroyed&&_2.isFunction(obj.startup)){obj.startup();obj._started=true;}},this);}},setHref:function(_18){_1.deprecated("dijit.layout.ContentPane.setHref() is deprecated. Use set('href', ...) instead.","","2.0");return this.set("href",_18);},_setHrefAttr:function(_19){this.cancel();this.onLoadDeferred=new _a(_2.hitch(this,"cancel"));this.onLoadDeferred.then(_2.hitch(this,"onLoad"));this._set("href",_19);if(this.preload||(this._created&&this._isShown())){this._load();}else{this._hrefChanged=true;}return this.onLoadDeferred;},setContent:function(_1a){_1.deprecated("dijit.layout.ContentPane.setContent() is deprecated.  Use set('content', ...) instead.","","2.0");this.set("content",_1a);},_setContentAttr:function(_1b){this._set("href","");this.cancel();this.onLoadDeferred=new _a(_2.hitch(this,"cancel"));if(this._created){this.onLoadDeferred.then(_2.hitch(this,"onLoad"));}this._setContent(_1b||"");this._isDownloaded=false;return this.onLoadDeferred;},_getContentAttr:function(){return this.containerNode.innerHTML;},cancel:function(){if(this._xhrDfd&&(this._xhrDfd.fired==-1)){this._xhrDfd.cancel();}delete this._xhrDfd;this.onLoadDeferred=null;},destroy:function(){this.cancel();this.inherited(arguments);},destroyRecursive:function(_1c){if(this._beingDestroyed){return;}this.inherited(arguments);},_onShow:function(){this.inherited(arguments);if(this.href){if(!this._xhrDfd&&(!this.isLoaded||this._hrefChanged||this.refreshOnShow)){return this.refresh();}}},refresh:function(){this.cancel();this.onLoadDeferred=new _a(_2.hitch(this,"cancel"));this.onLoadDeferred.then(_2.hitch(this,"onLoad"));this._load();return this.onLoadDeferred;},_load:function(){this._setContent(this.onDownloadStart(),true);var _1d=this;var _1e={preventCache:(this.preventCache||this.refreshOnShow),url:this.href,handleAs:"text"};if(_2.isObject(this.ioArgs)){_2.mixin(_1e,this.ioArgs);}var _1f=(this._xhrDfd=(this.ioMethod||_e.get)(_1e)),_20;_1f.then(function(_21){_20=_21;try{_1d._isDownloaded=true;return _1d._setContent(_21,false);}catch(err){_1d._onError("Content",err);}},function(err){if(!_1f.canceled){_1d._onError("Download",err);}delete _1d._xhrDfd;return err;}).then(function(){_1d.onDownloadEnd();delete _1d._xhrDfd;return _20;});delete this._hrefChanged;},_onLoadHandler:function(_22){this._set("isLoaded",true);try{this.onLoadDeferred.resolve(_22);}catch(e){console.error("Error "+this.widgetId+" running custom onLoad code: "+e.message);}},_onUnloadHandler:function(){this._set("isLoaded",false);try{this.onUnload();}catch(e){console.error("Error "+this.widgetId+" running custom onUnload code: "+e.message);}},destroyDescendants:function(_23){if(this.isLoaded){this._onUnloadHandler();}var _24=this._contentSetter;_8.forEach(this.getChildren(),function(_25){if(_25.destroyRecursive){_25.destroyRecursive(_23);}else{if(_25.destroy){_25.destroy(_23);}}_25._destroyed=true;});if(_24){_8.forEach(_24.parseResults,function(_26){if(!_26._destroyed){if(_26.destroyRecursive){_26.destroyRecursive(_23);}else{if(_26.destroy){_26.destroy(_23);}}_26._destroyed=true;}});delete _24.parseResults;}if(!_23){_d.empty(this.containerNode);}delete this._singleChild;},_setContent:function(_27,_28){_27=this.preprocessContent(_27);this.destroyDescendants();var _29=this._contentSetter;if(!(_29&&_29 instanceof _7._ContentSetter)){_29=this._contentSetter=new _7._ContentSetter({node:this.containerNode,_onError:_2.hitch(this,this._onError),onContentError:_2.hitch(this,function(e){var _2a=this.onContentError(e);try{this.containerNode.innerHTML=_2a;}catch(e){console.error("Fatal "+this.id+" could not change content due to "+e.message,e);}})});}var _2b=_2.mixin({cleanContent:this.cleanContent,extractContent:this.extractContent,parseContent:!_27.domNode&&this.parseOnLoad,parserScope:this.parserScope,startup:false,dir:this.dir,lang:this.lang,textDir:this.textDir},this._contentSetterParams||{});var p=_29.set((_2.isObject(_27)&&_27.domNode)?_27.domNode:_27,_2b);var _2c=this;return _10(p&&p.then?p:_29.parseDeferred,function(){delete _2c._contentSetterParams;if(!_28){if(_2c._started){_2c._startChildren();_2c._scheduleLayout();}_2c._onLoadHandler(_27);}});},preprocessContent:function(_2d){return _2d;},_onError:function(_2e,err,_2f){this.onLoadDeferred.reject(err);var _30=this["on"+_2e+"Error"].call(this,err);if(_2f){console.error(_2f,err);}else{if(_30){this._setContent(_30,true);}}},onLoad:function(){},onUnload:function(){},onDownloadStart:function(){return this.loadingMessage;},onContentError:function(){},onDownloadError:function(){return this.errorMessage;},onDownloadEnd:function(){}});});
\ No newline at end of file