Current Path : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/rest/ |
Current File : /var/www/www-root/data/www/www.monolith-realty.ru/bitrix/js/rest/appplacement.min.js |
(function(){BX.namespace("BX.rest");if(!!BX.rest.Placement){return}BX.rest.Placement=function(t){this.param={placement:"",layout:"",node:"",list:[],extendedList:new Map,ajaxUrl:location.href};this.setParameters(t);this.loaded={}};BX.rest.Placement.prototype={setParameters:function(t){for(var e in t){if(t.hasOwnProperty(e)){if(e==="extendedList"){t["extendedList"].forEach(function(t){this.param["extendedList"].set(t["id"],t)}.bind(this))}else{this.param[e]=t[e]}}}},getAppNode:function(t){return BX(this.param.node.replace("#ID#",t))},showApp:function(t){BX.show(this.getAppNode(t))},load:function(t,e){this.showApp(t);if(!this.loaded[t]){BX.ajax.post(this.param.ajaxUrl,{placement_action:"load",app:t,placement_options:e,sessid:BX.bitrix_sessid()},BX.delegate(function(e){this.getAppNode(t).innerHTML=e;this.appLoaded(t)},this))}this.param.current=t},appLoaded:function(t){this.loaded[t]=true},unload:function(t){var e=BX.rest.AppLayout.get(t);if(!!e){e.destroy()}this.loaded[t]=false},destroy:function(){for(var t in this.loaded){if(this.loaded.hasOwnProperty(t)){this.unload(t)}}}}})(); //# sourceMappingURL=appplacement.map.js