/* * This file taken from "Cherry Plugin": http://www.cherryframework.com/update/meet-the-cherry-plugin-bare-functionalities-no-strings-attached/ * Makes small changes 2015-08 * */ var animate_shortcode_generator_url = animate_plugin_data.url + 'admin/shortcodes/', animateSelectedShortcodeType, animate_tb_dialog_helper = { animateSelectedShortcodeType: '', needsPreview: false, setUpButtons: function(){ var a = this; jQuery("#animatedialog-cancel-button").click(function(){ a.closeDialog() }); jQuery("#animatedialog-insert-button").click(function(){ a.insertAction() }); }, setupShortcodeType: function ( shortcode ) { animateSelectedShortcodeType = shortcode; this.animateSelectedShortcodeType = shortcode; }, loadShortcodeDetails: function() { if (animateSelectedShortcodeType) { var a = this; // Clean out the table rows before applying the new ones. jQuery( '#animatedialog-options-table' ).html( '' ); jQuery.getScript(animate_shortcode_generator_url + "shortcodes/my_" + animateSelectedShortcodeType + ".js", function () { a.initializeDialog(); // Set the default content to the highlighted text, for certain shortcode types. switch ( animateSelectedShortcodeType ) { case 'box': case 'ilink': case 'quote': case 'button': case 'abbr': case 'unordered_list': case 'ordered_list': case 'typography': jQuery('input#value-content').val( selectedText ); case 'toggle': jQuery('textarea#value-content').val( selectedText ); break; } }) } }, initializeDialog: function (){ if (typeof frameworkShortcodeAtts == "undefined") { jQuery("#animatedialog-shortcode-options").append("

"+animate_plugin_data.error_loading_details_for_shortcode+": " + animateSelectedShortcodeType + "

"); } else { var a = frameworkShortcodeAtts.attributes, b = jQuery("#animatedialog-options-table"); // Clean out the table rows before applying the new ones. b.html( '' ); for (var c in a) { var f = "mytheme-value-" + a[c].id, d = a[c].isRequired ? "mytheme-required" : "", g = jQuery(''); var requiredSpan = ''; if (a[c].isRequired) { requiredSpan = '*'; } // End IF Statement jQuery("