From: Anthony Talarico Date: Mon, 11 Feb 2019 20:18:17 +0000 (-0500) Subject: adding reset function when shortcode is reset or the page is reset X-Git-Url: http://cvs2.gaslightmedia.com/gitweb/?a=commitdiff_plain;h=6afeaf940d5e7d94a0bf8c8109d9dd27357db029;p=WP-Plugins%2Fglm-member-db.git adding reset function when shortcode is reset or the page is reset --- diff --git a/js/shortcodeBuilder.js b/js/shortcodeBuilder.js index 6aac3a78..5bc25c39 100644 --- a/js/shortcodeBuilder.js +++ b/js/shortcodeBuilder.js @@ -1,9 +1,3 @@ -/** - * Other needed Admin JS code - * Block level comments used temporarily to make finding sections of the code easier - * a lot of duplicate code and unnecessary variables I need to clean up, need to change case from camel case to snake case - * need to create a function for setting the editor content because it is duplicated a few times - */ jQuery(function ($) { var shortcode_string = $("
", { text: '[glm-members-list', @@ -43,6 +37,7 @@ jQuery(function ($) { tile.appendTo(elHook); } function setupAttributes(state){ + $(".shortcode-selection").each(function() { this.selectedIndex = 0 }); $("#shortcode-preview").empty(); $(".shortcode-tile-container").empty(); shortcodeAttributes = {