Current Path : /var/www/www-root/data/webdav/www/www.monolith-realty.ru/bitrix/js/landing/ |
Current File : /var/www/www-root/data/webdav/www/www.monolith-realty.ru/bitrix/js/landing/page_object.min.js |
(function(){"use strict";BX.namespace("BX.Landing");BX.Landing.PageObject=function(){this.store={};this.store.topPanel=null;this.store.designPanel=null;this.store.contentPanel=null;this.store.inlineEditor=null;this.store.contentPanelEditorPanel=null;this.store.linkEditorPanel=null;this.store.linkEditor=null;this.store.view=null};BX.Landing.PageObject.getInstance=function(){if(!BX.Landing.PageObject.instance&&!BX.Landing.PageObject.instance){BX.Landing.PageObject.instance=new BX.Landing.PageObject}return BX.Landing.PageObject.instance||BX.Landing.PageObject.instance};BX.Landing.PageObject.instance=null;BX.Landing.PageObject.prototype={top:function(){return new Promise(function(n,e){if(!this.store.topPanel&&window.parent){this.store.topPanel=window.parent.document.querySelector(".landing-ui-panel-top")}if(!this.store.topPanel){this.store.topPanel=window.document.querySelector(".landing-ui-panel-top")}if(this.store.topPanel){n(this.store.topPanel);this.store.topPanel=null}else{e("Top panel unavailable");console.warn("Top panel unavailable")}}.bind(this))},design:function(){return new Promise(function(n,e){n(BX.Landing.UI.Panel.StylePanel.getInstance())}.bind(this))},content:function(){return new Promise(function(n,e){n(BX.Landing.UI.Panel.ContentEdit.getInstance())}.bind(this))},inlineEditor:function(){return new Promise(function(n,e){n(BX.Landing.UI.Panel.EditorPanel.getInstance())}.bind(this))},view:function(){return new Promise(function(n,e){if(!this.store.view&&window.parent){this.store.view=window.parent.document.querySelector(".landing-ui-view")}if(!this.store.view){this.store.view=window.document.querySelector(".landing-ui-view")}if(this.store.view){n(this.store.view);this.store.view=null}else{e("View iframe unavailable");console.warn("View iframe unavailable")}}.bind(this))},blocks:function(){return new Promise(function(n){if(!this.store.blocks&&window.parent){this.store.blocks=window.parent.BX.Landing.Block.storage}if(this.store.blocks){n(this.store.blocks);this.store.blocks=null}else{reject("Blocks unavailable")}}.bind(this))}}})(); //# sourceMappingURL=page_object.map.js