"),this.$box.attr("data-title",this.lang.get("choose")),this.$box.addClass("redactor-modal-tab"),this.$box.hide(),this.$box.css({overflow:"auto",height:"300px","line-height":1}),a.append(this.$box),e.ajax.get({url:this.opts.imageManagerJson,success:this._parse.bind(this)})},_parse:function(t){for(var a in t){var i=t[a];if("object"==typeof i){var o=e.dom("
![]()
"),s=i.thumb?i.thumb:i.url;o.attr("src",s),o.attr("data-params",encodeURI(JSON.stringify(i))),o.css({width:"96px",height:"72px",margin:"0 4px 2px 0",cursor:"pointer"}),o.on("click",this._insert.bind(this)),this.$box.append(o)}}},_insert:function(t){t.preventDefault();var a=e.dom(t.target),i=JSON.parse(decodeURI(a.attr("data-params")));this.app.api("module.image.insert",{image:i})}})}(Redactor);
--------------------------------------------------------------------------------
/assets/redactor/plugins/inlinestyle/inlinestyle.min.css:
--------------------------------------------------------------------------------
1 | .redactor-dropdown-inline .redactor-dropdown-item-marked span{font-size:14px;background-color:#fdb833;color:#000;text-decoration:none}.redactor-dropdown-inline .redactor-dropdown-item-code span{font-family:Consolas,Menlo,Monaco,"Courier New",monospace;font-size:13px;background:rgba(0,0,0,.05)}.redactor-dropdown-inline .redactor-dropdown-item-variable span{font-family:Consolas,Menlo,Monaco,"Courier New",monospace;font-size:13px;color:rgba(0,0,0,.5)}.redactor-dropdown-inline .redactor-dropdown-item-shortcut span{font-family:Consolas,Menlo,Monaco,"Courier New",monospace;font-size:12px;padding:.25em;white-space:nowrap;border:1px solid #e5e7e9}.redactor-dropdown-inline .redactor-dropdown-item-sub span,.redactor-dropdown-inline .redactor-dropdown-item-sup span{position:relative;font-size:12px}.redactor-dropdown-inline .redactor-dropdown-item-sup span{top:-3px}.redactor-dropdown-inline .redactor-dropdown-item-sub span{top:3px}
--------------------------------------------------------------------------------
/assets/redactor/plugins/inlinestyle/inlinestyle.min.js:
--------------------------------------------------------------------------------
1 | Redactor.add("plugin","inlinestyle",{translations:{en:{style:"Style"}},init:function(t){this.app=t,this.lang=t.lang,this.toolbar=t.toolbar,this.styles={marked:{title:"Marked",args:"mark"},code:{title:"Code",args:"code"},variable:{title:"Variable",args:"var"},shortcut:{title:"Shortcut",args:"kbd"},sup:{title:"Superscript",args:"sup"},sub:{title:"Subscript",args:"sub"}}},start:function(){var t={};for(var i in this.styles){var s=this.styles[i];t[i]={title:s.title,api:"module.inline.format",args:s.args}}var a=this.toolbar.addButtonAfter("format","inline",{title:this.lang.get("style")});a.setIcon('
'),a.setDropdown(t)}});
--------------------------------------------------------------------------------
/assets/redactor/plugins/limiter/limiter.min.js:
--------------------------------------------------------------------------------
1 | Redactor.add("plugin","limiter",{init:function(t){this.app=t,this.utils=t.utils,this.opts=t.opts,this.editor=t.editor,this.keycodes=t.keycodes},onpasting:function(t){if(this.opts.limiter){t=this.utils.removeInvisibleChars(t);var i=this._getText(),e=t.length+i.length;this.opts.input=!(e>=this.opts.limiter)}},start:function(){this.opts.limiter&&(this._count(),this.editor.getElement().on("keydown.redactor-plugin-limiter",this._limit.bind(this)))},stop:function(){this.editor.getElement().off(".redactor-plugin-limiter"),this.opts.input=!0},_limit:function(t){var i=t.which,e=t.ctrlKey||t.metaKey;i===this.keycodes.BACKSPACE||i===this.keycodes.DELETE||i===this.keycodes.ESC||i===this.keycodes.SHIFT||e&&65===i||e&&88===i||e&&82===i||e&&116===i||-1!==[37,38,39,40].indexOf(i)||this._count(t)},_count:function(t){if(this._getText().length>=this.opts.limiter)return t&&t.preventDefault(),this.opts.input=!1;this.opts.input=!0},_getText:function(){var t=this.editor.getElement().text();return this.utils.removeInvisibleChars(t)}});
--------------------------------------------------------------------------------
/assets/redactor/plugins/properties/properties.min.js:
--------------------------------------------------------------------------------
1 | !function(a){a.add("plugin","properties",{modals:{properties:'
'},translations:{en:{properties:"Properties"}},init:function(t){this.app=t,this.opts=t.opts,this.lang=t.lang,this.$body=t.$body,this.toolbar=t.toolbar,this.inspector=t.inspector,this.selection=t.selection,this.labelStyle={"font-family":"monospace",position:"absolute",padding:"2px 5px","line-height":1,"border-radius":"3px","font-size":"11px",color:"rgba(255, 255, 255, .9)"}},onmodal:{properties:{open:function(t,e){if(this.$block){var i=this._getData(this.$block);e.setData(i)}},opened:function(t,e){e.getField("id").focus()},save:function(t,e){var i=e.getData();this._save(i)}}},onbutton:{properties:{observe:function(t){this._observeButton(t)}}},onclick:function(){},start:function(){var t={title:this.lang.get("properties"),api:"plugin.properties.open",observe:"properties"};this.toolbar.addButton("properties",t).setIcon('
'),this._createLabel()},stop:function(){this._removeLabel()},open:function(){var t=this.selection.getBlock();if(t){this.$block=a.dom(t);var e={title:this.lang.get("properties"),width:"500px",name:"properties",handle:"save",commands:{save:{title:this.lang.get("save")},cancel:{title:this.lang.get("cancel")}}};this.app.api("module.modal.build",e)}},_save:function(t){this.app.api("module.modal.close"),""===t.id?this.$block.removeAttr("id"):this.$block.attr("id",t.id),""===t.classname?this.$block.removeAttr("class"):this.$block.attr("class",t.classname)},_getData:function(t){var e=a.dom(t);return{id:e.attr("id"),classname:e.attr("class")}},_showData:function(t,e){var i="";if(e.id&&(i+="#"+e.id+" "),e.classname&&(i+="."+e.classname),""!==i){var s=a.dom(t).offset();this.$label.css({top:s.top-12+"px",left:s.left+"px","z-index":this.opts.zindex?this.opts.zindex+3:"auto"}),this.$label.html(i),this.$label.show()}else this.$label.hide()},_createLabel:function(){this.$label=a.dom("
"),this.$label.hide(),this.$label.css(this.labelStyle).css("background","rgba(229, 57, 143, .7)"),this.$body.append(this.$label)},_removeLabel:function(){this.$label&&this.$label.remove()},_observeButton:function(t){var e=this.selection.getBlock(),i=this.inspector.parse(e);if(e&&!i.isComponent()){var s=this._getData(e);this._showData(e,s),t.enable()}else t.disable(),this.$label&&this.$label.hide()}})}(Redactor);
--------------------------------------------------------------------------------
/assets/redactor/plugins/specialchars/specialchars.min.js:
--------------------------------------------------------------------------------
1 | !function(c){c.add("plugin","specialchars",{translations:{en:{specialchars:"Special Characters"}},init:function(a){this.app=a,this.lang=a.lang,this.toolbar=a.toolbar,this.insertion=a.insertion,this.chars=["‘","’","“","”","–","—","÷","…","™","•","→","≈","$","€","¢","£","¥","¡","¤","¦","§","¨","©","ª","«","»","¬","®","¯","°","¹","²","³","´","µ","¶","·","¸","º","¼","½","¾","¿","À","Á","Â","Ã","Ä","Å","Æ","Ç","È","É","Ê","Ë","Ì","Í","Î","Ï","Ð","Ñ","Ò","Ó","Ô","Õ","Ö","×","Ø","Ù","Ú","Û","Ü","Ý","Þ","ß","à","á","â","ã","ä","å","æ","ç","è","é","ê","ë","ì","í","î","ï","ð","ñ","ò","ó","ô","õ","ö","ø","ù","ú","û","ü","ý","þ","ÿ","Œ","œ","Ŵ","Ŷ","ŵ","ŷ"]},start:function(){var a={title:this.lang.get("specialchars")},t=this._buildDropdown();this.$button=this.toolbar.addButton("specialchars",a),this.$button.setIcon('
'),this.$button.setDropdown(t)},_set:function(a){this.insertion.insertChar(a)},_buildDropdown:function(){function a(a){a.preventDefault();var t=c.dom(a.target);i._set(t.data("char"))}for(var i=this,t=c.dom('
'),r=0;r
");e.attr({href:"#","data-char":this.chars[r]}),e.css({"line-height":"32px",width:"32px",height:"32px"}),e.html(this.chars[r]),e.on("click",a),t.append(e)}return t}})}(Redactor);
--------------------------------------------------------------------------------
/assets/redactor/plugins/table/table.min.js:
--------------------------------------------------------------------------------
1 | !function(r){r.add("plugin","table",{translations:{en:{table:"Table","insert-table":"Insert table","insert-row-above":"Insert row above","insert-row-below":"Insert row below","insert-column-left":"Insert column left","insert-column-right":"Insert column right","add-head":"Add head","delete-head":"Delete head","delete-column":"Delete column","delete-row":"Delete row","delete-table":"Delete table"}},init:function(e){this.app=e,this.lang=e.lang,this.opts=e.opts,this.caret=e.caret,this.editor=e.editor,this.toolbar=e.toolbar,this.component=e.component,this.inspector=e.inspector,this.insertion=e.insertion,this.selection=e.selection},ondropdown:{table:{observe:function(e){this._observeDropdown(e)}}},onbottomclick:function(){this.insertion.insertToEnd(this.editor.getLastNode(),"table")},start:function(){var e={observe:"table","insert-table":{title:this.lang.get("insert-table"),api:"plugin.table.insert"},"insert-row-above":{title:this.lang.get("insert-row-above"),classname:"redactor-table-item-observable",api:"plugin.table.addRowAbove"},"insert-row-below":{title:this.lang.get("insert-row-below"),classname:"redactor-table-item-observable",api:"plugin.table.addRowBelow"},"insert-column-left":{title:this.lang.get("insert-column-left"),classname:"redactor-table-item-observable",api:"plugin.table.addColumnLeft"},"insert-column-right":{title:this.lang.get("insert-column-right"),classname:"redactor-table-item-observable",api:"plugin.table.addColumnRight"},"add-head":{title:this.lang.get("add-head"),classname:"redactor-table-item-observable",api:"plugin.table.addHead"},"delete-head":{title:this.lang.get("delete-head"),classname:"redactor-table-item-observable",api:"plugin.table.deleteHead"},"delete-column":{title:this.lang.get("delete-column"),classname:"redactor-table-item-observable",api:"plugin.table.deleteColumn"},"delete-row":{title:this.lang.get("delete-row"),classname:"redactor-table-item-observable",api:"plugin.table.deleteRow"},"delete-table":{title:this.lang.get("delete-table"),classname:"redactor-table-item-observable",api:"plugin.table.deleteTable"}},t={title:this.lang.get("table")},n=this.toolbar.addButtonBefore("link","table",t);n.setIcon(''),n.setDropdown(e)},insert:function(){for(var e=this.component.create("table"),t=0;t<2;t++)e.addRow(3);e=this.insertion.insertHtml(e),this.caret.setStart(e)},addRowAbove:function(){var e=this._getComponent();if(e){var t=this.selection.getCurrent(),n=e.addRowTo(t,"before");this.caret.setStart(n)}},addRowBelow:function(){var e=this._getComponent();if(e){var t=this.selection.getCurrent(),n=e.addRowTo(t,"after");this.caret.setStart(n)}},addColumnLeft:function(){var e=this._getComponent();if(e){var t=this.selection.getCurrent();this.selection.save(),e.addColumnTo(t,"left"),this.selection.restore()}},addColumnRight:function(){var e=this._getComponent();if(e){var t=this.selection.getCurrent();this.selection.save(),e.addColumnTo(t,"right"),this.selection.restore()}},addHead:function(){var e=this._getComponent();e&&(this.selection.save(),e.addHead(),this.selection.restore())},deleteHead:function(){var e=this._getComponent();if(e){var t=this.selection.getCurrent();0!==r.dom(t).closest("thead").length?(e.removeHead(),this.caret.setStart(e)):(this.selection.save(),e.removeHead(),this.selection.restore())}},deleteColumn:function(){var e=this._getComponent();if(e){var t=this.selection.getCurrent(),n=r.dom(t).closest("td, th"),i=n.nextElement().get(),o=n.prevElement().get();e.removeColumn(t),i?this.caret.setStart(i):o?this.caret.setEnd(o):this.deleteTable()}},deleteRow:function(){var e=this._getComponent();if(e){var t=this.selection.getCurrent(),n=r.dom(t).closest("tr"),i=n.nextElement().get(),o=n.prevElement().get(),a=r.dom(t).closest("thead");e.removeRow(t),i?this.caret.setStart(i):o?this.caret.setEnd(o):0!==a.length?(e.removeHead(),this.caret.setStart(e)):this.deleteTable()}},deleteTable:function(){var e=this._getTable();e&&this.component.remove(e)},_getTable:function(){var e=this.selection.getCurrent(),t=this.inspector.parse(e);if(t.isTable())return t.getTable()},_getComponent:function(){var e=this.selection.getCurrent(),t=this.inspector.parse(e);if(t.isTable()){var n=t.getTable();return this.component.create("table",n)}},_observeDropdown:function(e){var t=this._getTable(),n=e.getItemsByClass("redactor-table-item-observable"),i=e.getItem("insert-table");t?(this._observeItems(n,"enable"),i.disable()):(this._observeItems(n,"disable"),i.enable())},_observeItems:function(e,t){for(var n=0;n"),n=this._buildRow(e,"");t.append(n),this.$element.prepend(t)},addRow:function(e){var t=this._buildRow(e);return this.$element.append(t),t},addRowTo:function(e,t){return this._addRowTo(e,t)},addColumnTo:function(e,o){var t=r.dom(e),n=t.closest("tr"),i=t.closest("td, th"),a=0;n.find("td, th").each(function(e,t){e===i.get()&&(a=t)}),this.$element.find("tr").each(function(e){var t=r.dom(e).find("td, th").get(a),n=r.dom(t),i=n.clone();i.html(''),"right"===o?n.after(i):n.before(i)})},removeHead:function(){var e=this.$element.find("thead");0!==e.length&&e.remove()},removeRow:function(e){r.dom(e).closest("tr").remove()},removeColumn:function(e){var t=r.dom(e),n=t.closest("tr"),i=t.closest("td, th"),o=0;n.find("td, th").each(function(e,t){e===i.get()&&(o=t)}),this.$element.find("tr").each(function(e){var t=r.dom(e).find("td, th").get(o);r.dom(t).remove()})},_init:function(e){var t,n;if(void 0!==e){var i=r.dom(e),o=i.get(),a=i.closest("figure");0!==a.length?n=(t=a).find("table").get():"TABLE"===o.tagName&&(n=o)}this._buildWrapper(t),this._buildElement(n),this._initWrapper()},_addRowTo:function(e,t){var n=r.dom(e).closest("tr");if(0!==n.length){var i=n.children("td, th").length,o=this._buildRow(i);return n[t](o),o}},_buildRow:function(e,t){t=t||" | ";for(var n=r.dom(" | "),i=0;i'),n.append(o)}return n},_buildElement:function(e){e?this.$element=r.dom(e):(this.$element=r.dom(""),this.append(this.$element))},_buildWrapper:function(e){e=e||"",this.parse(e)},_initWrapper:function(){this.addClass("redactor-component"),this.attr({"data-redactor-type":"table",tabindex:"-1",contenteditable:!1}),this.app.detector.isIe()&&this.removeAttr("contenteditable")}})}(Redactor);
--------------------------------------------------------------------------------
/assets/redactor/plugins/textdirection/textdirection.min.js:
--------------------------------------------------------------------------------
1 | !function(o){o.add("plugin","textdirection",{translations:{en:{"change-text-direction":"RTL-LTR","left-to-right":"Left to Right","right-to-left":"Right to Left"}},init:function(t){this.app=t,this.lang=t.lang,this.block=t.block,this.editor=t.editor,this.toolbar=t.toolbar,this.selection=t.selection},start:function(){var t={};t.ltr={title:this.lang.get("left-to-right"),api:"plugin.textdirection.set",args:"ltr"},t.rtl={title:this.lang.get("right-to-left"),api:"plugin.textdirection.set",args:"rtl"};var i=this.toolbar.addButton("textdirection",{title:this.lang.get("change-text-direction")});i.setIcon(''),i.setDropdown(t)},set:function(t){var i=this.selection.getBlock();if(i&&"LI"===i.tagName){var e=o.dom(i).parents("ul, ol",this.editor.getElement()).last();this.block.add({attr:{dir:t}},!1,e)}else this.block.add({attr:{dir:t}})}})}(Redactor);
--------------------------------------------------------------------------------
/assets/redactor/plugins/textexpander/textexpander.min.js:
--------------------------------------------------------------------------------
1 | Redactor.add("plugin","textexpander",{init:function(e){this.app=e,this.opts=e.opts,this.utils=e.utils,this.editor=e.editor,this.marker=e.marker,this.keycodes=e.keycodes,this.selection=e.selection},start:function(){this.opts.textexpander&&this.editor.getElement().on("keyup.redactor-plugin-textexpander",this._expand.bind(this))},stop:function(){this.editor.getElement().off(".redactor-plugin-textexpander")},_expand:function(e){if(e.which===this.keycodes.SPACE)for(var t=this.opts.textexpander.length,i=0;i')}},open:function(){var t={title:this.lang.get("variable"),width:"600px",name:"variable"};this.$currentItem=this._getCurrent(),this.app.api("module.modal.build",t)},insert:function(t){this.app.api("module.modal.close");var e=t.attr("data-type"),i=this.component.create("variable");i.html(e),this.insertion.insertRaw(i)},remove:function(t){this.component.remove(t)},_getCurrent:function(){var t=this.selection.getCurrent(),e=this.inspector.parse(t);if(e.isComponentType("variable"))return this.component.build(e.getComponent())},_build:function(t){var e=t.getBody(),i=this._buildLabel(),a=this._buildList();this._buildItems(a),e.html(""),e.append(i),e.append(a)},_buildLabel:function(){var t=o.dom("