From add756db43deb44cd4df460ce7bd1975a692b343 Mon Sep 17 00:00:00 2001 From: "Duc Doan Hoang Minh (IT - ONL)" Date: Tue, 18 Dec 2018 16:15:03 +0700 Subject: [PATCH] https://github.com/Kademi/keditor/issues/141 --- dist/js/keditor.min.js | 4 ++-- dist/js/keditor.min.js.map | 2 +- src/js/keditor.js | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/dist/js/keditor.min.js b/dist/js/keditor.min.js index 4629894c..50cb9185 100644 --- a/dist/js/keditor.min.js +++ b/dist/js/keditor.min.js @@ -5,6 +5,6 @@ * @version: 1.1.7 * @dependencies: $, $.fn.draggable, $.fn.droppable, $.fn.sortable, Bootstrap (optional), FontAwesome (optional) */ -!function(t){var e=function(){if("undefined"!=typeof console&&o.debug===!0){var t=Array.prototype.slice.apply(arguments);t.unshift("[KEditor]"),console.log.apply(console,t)}},n=function(t){throw new Error("[KEditor] "+t)};t.fn.draggable||n("$.fn.draggable does not exist. Please import $.fn.draggable into your document for continue using KEditor."),t.fn.droppable||n("$.fn.droppable does not exist. Please import $.fn.droppable into your document for continue using KEditor."),t.fn.sortable||n("$.fn.sortable does not exist. Please import $.fn.sortable into your document for continue using KEditor.");var o=function(e,n){this.element=e,this.options=t.extend({},o.DEFAULTS,n),this.init(e)};o.instances={},o.debug=!0,o.version="1.1.7",o.DEFAULTS={niceScrollEnabled:!0,nestedContainerEnabled:!0,btnMoveContainerText:'',btnMoveComponentText:'',btnSettingContainerText:'',btnSettingComponentText:'',btnDuplicateContainerText:'',btnDuplicateComponentText:'',btnDeleteContainerText:'',btnDeleteComponentText:'',tabContainersText:"Containers",tabContainersTitle:"Containers",tabComponentsText:"Components",tabComponentsTitle:"Components",confirmDeleteContainer:"Are you sure that you want to delete this container? This action can not be undo!",confirmDeleteComponent:"Are you sure that you want to delete this component? This action can not be undo!",tabTooltipEnabled:!0,extraTabs:null,defaultComponentType:"blank",sidebarContainer:null,snippetsUrl:"snippets/snippets.html",snippetsTooltipEnabled:!0,snippetsTooltipPosition:"left",snippetsFilterEnabled:!0,snippetsCategoriesSeparator:";",iframeMode:!1,contentStyles:[],contentAreasSelector:null,contentAreasWrapper:'
',containerSettingEnabled:!1,containerSettingInitFunction:null,containerSettingShowFunction:null,containerSettingHideFunction:null,onReady:function(){},onInitFrame:function(t,e,n){},onSidebarToggled:function(t){},onContentChanged:function(t,e){},onBeforeInitContentArea:function(t){},onInitContentArea:function(t){},onBeforeInitContainer:function(t,e){},onInitContainer:function(t,e){},onBeforeContainerDeleted:function(t,e,n){},onContainerDeleted:function(t,e,n){},onContainerChanged:function(t,e,n){},onContainerDuplicated:function(t,e,n,o){},onContainerSelected:function(t,e,n){},onContainerSnippetDropped:function(t,e,n,o){},onComponentReady:function(t){},onBeforeInitComponent:function(t,e){},onInitComponent:function(t,e){},onBeforeComponentDeleted:function(t,e,n){},onComponentDeleted:function(t,e,n){},onComponentChanged:function(t,e,n){},onComponentDuplicated:function(t,e,n,o){},onComponentSelected:function(t,e,n){},onComponentSnippetDropped:function(t,e,n,o){},onBeforeDynamicContentLoad:function(t,e,n){},onDynamicContentLoaded:function(t,e,n,o,i){},onDynamicContentError:function(t,e,n,o,i){}},o.components={blank:{settingEnabled:!1}},o.log=e,o.error=n,o.prototype.init=function(n){var o=this,i=o.options;if(i.iframeMode)n=o.initFrame(n);else if(o.window=window,o.body=t(document.body),n.is("textarea")){e("Target is textarea",n);var a=n.val(),r=t(i.contentAreasWrapper||"
");n.after(r),r.attr({"class":"keditor-ui keditor-wrapper"});var s=r.attr("id");s||(s=o.generateId("wrapper"),r.attr("id",s)),r.html(a),n.addClass("keditor-hidden-element"),n.attr("data-keditor-wrapper","#"+s),n=r}var d,c=o.body;if(c.hasClass("initialized-snippets-list")){e("Snippets list is already initialized!");var l=c.find("#keditor-snippets-list");o.containerSnippets=l.find(".keditor-snippet[data-type=container]"),o.componentSnippets=l.find(".keditor-snippet[data-type^=component]")}else d=o.initSidebar(),c.addClass("initialized-snippets-list");c.hasClass("initialized-click-event-handlers")?e("CLick event handlers is already initialized!"):(o.initKEditorClicks(),c.addClass("initialized-click-event-handlers")),o.initContentAreas(n),d||"function"!=typeof i.onReady||i.onReady.call(o)},o.prototype.generateId=function(t){var e=(new Date).getTime(),n=Math.round(9876543210*Math.random());return"keditor-"+t+"-"+e+n},o.prototype.initNiceScroll=function(n){e("initNiceScroll",n),t.fn.niceScroll&&this.options.niceScrollEnabled?(e("Initialize $.fn.niceScroll"),n.niceScroll({cursorcolor:"#999",cursorwidth:6,railpadding:{top:0,right:0,left:0,bottom:0},cursorborder:"",disablemutationobserver:!0})):e("$.fn.niceScroll does not exist. Use default sidebar.")},o.prototype.initFrame=function(n){e("initFrame",n);var o=this,i=o.options,a=n.is("textarea")?n.val():n.html(),r=t("