Файл: Main Website Files/assets/js/froala_editor/js/plugins/block_styles.min.js
Строк: 64
<?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.refreshBlockStyles=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,{blockStyle:{title:"Block Style",icon:"fa fa-magic",refreshOnShow:a.Editable.prototype.refreshBlockStyles,callback:function(a,b,c){this.blockStyle(b,c)},undo:!0}}),a.Editable.DEFAULTS=a.extend(a.Editable.DEFAULTS,{defaultBlockStyle:{"f-italic":"Italic","f-typewriter":"Typewriter","f-spaced":"Spaced","f-uppercase":"Uppercase"},blockStylesToggle:!0,blockStyles:{}}),a.Editable.prototype.command_dispatcher=a.extend(a.Editable.prototype.command_dispatcher,{blockStyle:function(a){var b=this.buildDropdownBlockStyle(a),c=this.buildDropdownButton(a,b);return c}}),a.Editable.prototype.buildDropdownBlockStyle=function(){var a='<ul class="fr-dropdown-menu fr-block-style">';return a+="</ul>"},a.Editable.prototype.blockStyle=function(b){this.saveSelectionByMarkers(),this.wrapText(),this.restoreSelectionByMarkers();var c=this.getSelectionElements()[0].tagName;this.saveSelectionByMarkers();for(var d=this.getSelectionElements(),e=0;e<d.length;e++){var f=d[e];f!=this.$element.get(0)&&f.tagName==c&&(a(f).find(d).length>0||(a(f).hasClass(b)?(a(f).removeClass(b),""===a(f).attr("class")&&a(f).removeAttr("class")):(this.options.blockStylesToggle&&a(f).removeAttr("class"),a(f).addClass(b))))}this.cleanupLists(),this.restoreSelectionByMarkers(),this.triggerEvent("blockStyle")}}(jQuery);
?>