var editor=CKEDITOR.editor,ContentPageEdit=function(){function t(t){this.$page=t,this.$form=t.find("> form"),this.$textSaver=this.$form.find("> .textSaver"),this.$textHolder=this.$form.find("> .textHolder"),this.$editCaller=t.find("> .editCaller"),this.$editCaller.click(this.editCalled.bind(this)),this.$textSaver.addClass("hidden"),this.$textSaver.find("button").click(this.save.bind(this))}return t.prototype.editCalled=function(t){t.preventDefault(),this.$editCaller.addClass("hidden"),this.$textHolder.attr("contenteditable","true"),this.editor=CKEDITOR.inline(this.$textHolder.attr("id"),{scayt_sLang:"de_DE",removePlugins:"lite"}),this.$textHolder.focus(),this.$textSaver.removeClass("hidden")},t.prototype.save=function(t){var e=this;t.preventDefault(),$.post(this.$form.attr("action"),{data:this.editor.getData(),_csrf:this.$form.find("> input[name=_csrf]").val()},function(t){"1"==t?(window.setTimeout(function(){e.editor.destroy()},100),e.$textSaver.addClass("hidden"),e.$textHolder.attr("contenteditable","false"),e.$editCaller.removeClass("hidden")):alert("Something went wrong...")})},t}();$(".contentPage").each(function(){new ContentPageEdit($(this))});
//# sourceMappingURL=ContentPageEdit.js.map
