Файл: Main Website Files/assets/js/froala_editor/js/plugins/inline_styles.min.js
Строк: 121
<?php
/*!
* froala_editor v1.2.6 (http://editor.froala.com)
* License http://editor.froala.com/license
* Copyright 2014-2015 Froala Labs
*/
!function(a){a.Editable.prototype.refreshInlineStyles=function(){var b=this.getSelectionElements()[0],c=b.tagName.toLowerCase();this.$bttn_wrapper.find(".fr-block-style").empty();var d=this.options.blockStyles[c];if(void 0===d&&(d=this.options.defaultBlockStyle),void 0!==d){this.$bttn_wrapper.find('.fr-dropdown > button[data-name="blockStyle"].fr-trigger').removeAttr("disabled");for(var e in d){var f=d[e],g="";a(b).hasClass(e)&&(g=' class="active"'),this.$bttn_wrapper.find(".fr-block-style").append(a("<li"+g+">").append(a('<a href="#" data-text="true">').text(f).addClass(e)).attr("data-cmd","blockStyle").attr("data-val",e))}}},a.Editable.commands=a.extend(a.Editable.commands,{inlineStyle:{title:"Inline Style",icon:"fa fa-pencil",refreshOnShow:a.Editable.prototype.refreshInlineStyles,callback:function(a,b){this.applyInlineStyles(b)},callbackWithoutSelection:function(a,b){this.applyInlineStyles(b)}}}),a.Editable.DEFAULTS=a.extend(a.Editable.DEFAULTS,{inlineStyles:{"Big Red":"font-size: 20px; color: red;","Small Blue":"font-size: 14px; color: blue;"}}),a.Editable.prototype.command_dispatcher=a.extend(a.Editable.prototype.command_dispatcher,{inlineStyle:function(a){var b=this.buildDropdownInlineStyle(),c=this.buildDropdownButton(a,b);return c}}),a.Editable.prototype.buildDropdownInlineStyle=function(){var a='<ul class="fr-dropdown-menu fr-inline-style">';for(var b in this.options.inlineStyles)a+='<li data-cmd="inlineStyle" data-val="'+b+'"><a href="#" style="'+this.options.inlineStyles[b]+'">'+b+"</a></li>";return a+="</ul>"},a.Editable.prototype.applyInlineStyles=function(b){this.insertHTML(""!==this.text()?this.start_marker+'<span data-fr-verified="true" style="'+this.options.inlineStyles[b]+'">'+this.text()+"</span>"+this.end_marker:'<span data-fr-verified="true" style="'+this.options.inlineStyles[b]+'">'+this.markers_html+a.Editable.INVISIBLE_SPACE+"</span>"),this.restoreSelectionByMarkers(),this.triggerEvent("inlineStyle")},a.Editable.prototype.startInInlineStyles=function(a){for(var b in this.options.inlineStyles[a])this._startInFontExec(b.replace(/([A-Z])/g,"-$1").toLowerCase(),null,this.options.inlineStyles[a][b]);this.triggerEvent("inlineStyle")}}(jQuery);
?>