| Current Path : /var/www/element/data/www/revenuestory.ru/bitrix/js/landing/ui/button/ |
| Current File : /var/www/element/data/www/revenuestory.ru/bitrix/js/landing/ui/button/text_background_color.min.js |
(function(){"use strict";BX.namespace("BX.Landing.UI.Button");BX.Landing.UI.Button.TextBackgroundAction=function(n,t){BX.Landing.UI.Button.EditorAction.apply(this,arguments);this.layout.classList.add("landing-ui-button-editor-action-background");this.colorPicker=new BX.Landing.UI.Tool.ColorPicker(this,this.onColorSelected.bind(this));BX.Landing.UI.Button.TextBackgroundAction.instances.push(this)};BX.Landing.UI.Button.TextBackgroundAction.instances=[];BX.Landing.UI.Button.TextBackgroundAction.hideAll=function(){BX.Landing.UI.Button.TextBackgroundAction.instances.forEach(function(n){n.colorPicker.hide()})};BX.Landing.UI.Button.TextBackgroundAction.prototype={constructor:BX.Landing.UI.Button.TextBackgroundAction,__proto__:BX.Landing.UI.Button.EditorAction.prototype,onClick:function(n){n.preventDefault();n.stopPropagation();var t=BX.Landing.UI.Panel.EditorPanel.getInstance().isFixed()?"fixed":"relative";if(!this.colorPicker.isShown()){this.colorPicker.show(t);BX.Landing.UI.Button.FontAction.hideAll();if(BX.Landing.UI.Button.ChangeTag.menu){BX.Landing.UI.Button.ChangeTag.menu.close()}}else{this.colorPicker.hide()}},onColorSelected:function(n){document.execCommand(this.id,false,n)}}})();
//# sourceMappingURL=text_background_color.map.js