PluginProbe
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar / 3.2.9
NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar v3.2.9
3.3.1 3.3.0 3.2.14 3.2.13 3.2.12 3.2.11 3.2.10 3.2.9 3.2.8 3.2.7 trunk 0.2.5.5 0.2.5.6 0.2.5.7 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.1.2 1.1.3 1.1.4 1.2.0 1.2.1 All 156 releases
notificationx / vendor / wpdeveloper / lib-utility / scripts / udx.happ.json_editor.js

udx.happ.json_editor.js in NotificationX – FOMO, Live Sales Notification, WooCommerce Sales Popup, GDPR, Social Proof, Announcement Banner & Floating Notification Bar 3.2.9, at vendor/wpdeveloper/lib-utility/scripts/udx.happ.json_editor.js

1 lines 2.4 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 Application.define("core.json_editor",function(a){a=jQuery.extend(!0,{container:!1,instance:"editor",options:{},json:null,callback:function(a){return a},actions:{save:function(){return null},validate:function(){return null}}},"object"==typeof a?a:{});var b="object"==typeof a.container?a.container.get(0):document.getElementById(a.container.replace("#","")),c=function(a,b){var c=this;c._args="object"==typeof b.options?b.options:{},c.options=jQuery.extend(!0,{change:function(){return null},history:!0,mode:"editor",search:!0},"object"==typeof b.options?b.options:{}),c.__=new JSONEditor(a,c.options,"undefined"!=typeof c._args.json?c._args.json:null),c.schema=!1,c.save=function(){if(c.schema&&!c.validate())return!1;try{c._args.actions.save(schema.get())}catch(a){return!1}return!0},c.set=function(b,d){return d=jQuery.extend(!0,{name:null,schema:null},"object"==typeof d?d:{}),c.schema="object"==typeof d.schema&&null!=d.schema?d.schema:!1,c.schema?jQuery("button.jsoneditor-validate-object",a).show():jQuery("button.jsoneditor-validate-object",a).hide(),"string"==typeof d.name?c.__.set(b,d.name):c.__.set(b)},c.get=function(){return console.log("JSON EDITOR: GET"),c.__.get()},c.validate=function(){if("object"!=typeof c.schema||"undefined"==typeof validate)return!0;c.last_validation=validate(c.get(),c.schema);try{c._args.actions.validate(c.last_validation)}catch(a){return!1}return c.last_validation.valid},c._update_menu=function(){var b=jQuery("button.jsoneditor-save-object",a),d=document.createElement("button");d.title="Validate",d.className="jsoneditor-menu jsoneditor-validate-object",d.appendChild(document.createTextNode("Validate")),d.style.display="none",d.onclick=function(){c.validate()},b.click(function(){c.save()}).after(d)},jQuery.each(c.__,function(a,b){"undefined"==typeof c[a]&&(c[a]=b)}),c._update_menu()};async.parallel({js:function(a){ud.load.js({JSONEditor:"//ud-cdn.com/js/ud.json.editor/latest/ud.json.editor.js",validate:"//ud-cdn.com/js/ud.json.validate/1.0/ud.json.validate.js"},function(){a(null,!0)})},css:function(a){window._flags="undefined"!=typeof window._flags?window._flags:{},"undefined"!=typeof window._flags.json_editor_css&&window._flags.json_editor_css||(ud.load.css("//ud-cdn.com/js/ud.json.editor/latest/assets/ud.json.editor.css"),window._flags.json_editor_css=!0),a(null,!0)}},function(){if("function"==typeof a.callback){var d=null;switch(a.instance){case"editor":d=new c(b,a);break;case"formatter":d=new JSONformatter(b,a.options)}a.callback(d)}})});