Sha256: 600e6f77765b3ce65b4ff3ffb1c32de72829c77c426381badc7ea868d0e683d5

Contents?: true

Size: 1.84 KB

Versions: 1

Compression:

Stored size: 1.84 KB

Contents

/*!
 * froala_editor v1.1.6 (http://editor.froala.com)
 * Copyright 2014-2014 Froala
 */
$.Editable.commands=$.extend($.Editable.commands,{blockStyle:{title:"Block Style",icon:"fa fa-magic"}}),$.Editable.DEFAULTS=$.extend($.Editable.DEFAULTS,{defaultBlockStyle:{"f-italic":"Italic","f-typewriter":"Typewriter","f-spaced":"Spaced","f-uppercase":"Uppercase"},blockStylesToggle:!0,blockStyles:{}}),$.Editable.prototype.execCommand=$.extend($.Editable.prototype.execCommand,{blockStyle:function(a,b,c){this.blockStyle(b,c)}}),$.Editable.prototype.command_dispatcher=$.extend($.Editable.prototype.command_dispatcher,{blockStyle:function(a){var b=this.buildDropdownBlockStyle(a),c=this.buildDropdownButton(a,b);this.$bttn_wrapper.append(c),this.addListener("refresh",this.updateBlockStyles),this.registerRefreshEvent("blockStyle",function(a){this.refreshBlockStyle(a)})}}),$.Editable.prototype.buildDropdownBlockStyle=function(){var a='<ul class="fr-dropdown-menu fr-block-style">';return a+="</ul>"},$.Editable.prototype.activeBlockTag=function(){return $('.active[data-cmd="formatBlock"]').data("val")},$.Editable.prototype.updateBlockStyles=function(){var a=this.activeBlockTag();this.$bttn_wrapper.find(".fr-block-style").empty();var b=this.options.blockStyles[a];if(void 0===b&&(b=this.options.defaultBlockStyle),void 0!==b)for(var c in b){var d=b[c];this.$bttn_wrapper.find(".fr-block-style").append($("<li>").append($('<a href="#" data-text="true">').text(d).addClass(c)).attr("data-cmd","blockStyle").attr("data-val",c))}},$.Editable.prototype.refreshBlockStyle=function(a){this.disabledList.indexOf("blockStyle")>=0&&$(a).parents(".fr-dropdown .fr-trigger").prop("disabled",!0),$(a).removeClass("active"),this.isActive($(a).data("cmd"),$(a).data("val"))&&$(a).addClass("active")},$.Editable.prototype.blockStyle=function(a,b){var c=this.activeBlockTag();this.formatBlock(c,a,b)};

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
wysiwyg-rails-1.1.6 app/assets/javascripts/plugins/block_styles.min.js