src/pyams_skin/resources/js/ext/tinymce/dev/classes/ui/ColorButton.min.js
changeset 557 bca7a7e058a3
equal deleted inserted replaced
-1:000000000000 557:bca7a7e058a3
       
     1 define("tinymce/ui/ColorButton",["tinymce/ui/PanelButton","tinymce/dom/DOMUtils"],function(b,a){var c=a.DOM;return b.extend({init:function(d){this._super(d);this.addClass("colorbutton")},color:function(d){if(d){this._color=d;this.getEl("preview").style.backgroundColor=d;return this}return this._color},resetColor:function(){this._color=null;this.getEl("preview").style.backgroundColor=null;return this},renderHtml:function(){var d=this,h=d._id,f=d.classPrefix;var e=d.settings.icon?f+"ico "+f+"i-"+d.settings.icon:"";var g=d.settings.image?" style=\"background-image: url('"+d.settings.image+"')\"":"";return('<div id="'+h+'" class="'+d.classes()+'" role="button" tabindex="-1" aria-haspopup="true"><button role="presentation" hidefocus="1" type="button" tabindex="-1">'+(e?'<i class="'+e+'"'+g+"></i>":"")+'<span id="'+h+'-preview" class="'+f+'preview"></span>'+(d._text?(e?" ":"")+(d._text):"")+'</button><button type="button" class="'+f+'open" hidefocus="1" tabindex="-1"> <i class="'+f+'caret"></i></button></div>')},postRender:function(){var d=this,e=d.settings.onclick;d.on("click",function(f){if(f.aria&&f.aria.key=="down"){return}if(f.control==d&&!c.getParent(f.target,"."+d.classPrefix+"open")){f.stopImmediatePropagation();e.call(d,f)}});delete d.settings.onclick;return d._super()}})});