![]() Server : Apache System : Linux server2.corals.io 4.18.0-348.2.1.el8_5.x86_64 #1 SMP Mon Nov 15 09:17:08 EST 2021 x86_64 User : corals ( 1002) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system Directory : /home/corals/www/wp-content/themes/dt-the7/inc/admin/assets/js/elementor/ |
tinymce.PluginManager.add("the7_elementor_elements",(function(e,t){window.jQuery;var n,o=tinymce.Env.iOS;const a="the7-p-gap";function i(t){var n=e.$(t).parents("[contenteditable]");return n&&"false"===n.attr("contenteditable")}function l(e){/\D/g.test(this.value)&&(this.value=this.value.replace(/[^\d.]+/g,""))}e.addButton("the7_elements",{type:"menubutton",text:"The7 Elements",tooltip:"The7 Elements",icon:!1,menu:[{text:"Gap",onclick:function(){u.open(e,(function(t){e.execCommand("mceInsertContent",!1,`<hr style="padding-bottom:${t.value}${t.unit}" class="${a}">`)}),{value:"30",unit:"px"})}}]}),e.addButton("wp_the7_gap_edit",{tooltip:"Edit|button",icon:"dashicon dashicons-edit",onclick:function(){var t,n,o,a;t=e.selection.getNode(),a=e.$(t),o=function(e){var t={value:"0",unit:"px"};const n=e[0].style.paddingBottom,o=n.match(/^(\d+(?:\.\d+)?)\s?k?(px|em|%|rem)$/),a=o?o[1]:null,i=o?o[2]:null;return null==a&&null==i||(t.value=a,t.unit=i),t}(a),a.attr("data-wp-editing",1),n=function(t){e.undoManager.transact((function(){a.css({"padding-bottom":`${t.value}${t.unit}`}),a.attr("data-mce-style",a.attr("style")),e.nodeChanged()})),a.removeAttr("data-wp-editing")},u.open(e,n,o)}}),e.addButton("wp_the7_gap_remove",{tooltip:"Remove",icon:"dashicon dashicons-no",onclick:function(){var t;t=e.selection.getNode(),e.dom.remove(t),e.nodeChanged(),e.undoManager.add()}}),e.once("preinit",(function(){e.wp&&e.wp._createToolbar&&(n=e.wp._createToolbar(["wp_the7_gap_edit","wp_the7_gap_remove"]))})),o&&e.on("init",(function(){e.on("touchstart",(function(e){"IMG"!==e.target.nodeName||i(e.target)||(touchOnImage=!0)})),e.dom.bind(e.getDoc(),"touchmove",(function(){touchOnImage=!1})),e.on("touchend",(function(t){if(touchOnImage&&"IMG"===t.target.nodeName&&!i(t.target)){var o=t.target;touchOnImage=!1,window.setTimeout((function(){e.selection.select(o),e.nodeChanged()}),100)}else n&&n.hide()}))})),e.on("wptoolbar",(function(e){e.element.className===a&&(e.toolbar=n)}));var u={open:function(e,t,n){var o=e.windowManager.open({title:"Add Gap",items:{type:"container",layout:"flex",direction:"column",align:"left",padding:15,spacing:10,minWidth:250,items:[{type:"label",name:"preview",text:"Gap value:"},{type:"form",layout:"flex",direction:"row",padding:0,items:[{name:"value",value:n.value,type:"textbox",size:3,flex:1,style:"width:35px",spellcheck:!1},{name:"unit",type:"listbox",value:n.unit,values:[{text:"px",value:"px"},{text:"em",value:"em"},{text:"rem",value:"rem"},{text:"%",value:"%"}]}]}]},onSubmit:function(){var e=o.toJSON();e.value=e.value.replace(/\.+$/,""),t(o.toJSON())}});o.find("#value")[0].$el.on("keyup",l)}}}));