File manager - Edit - /home/theblueo/questionnaire/wp-content/plugins/sfwd-lms/assets/js/learndash-admin-shortcodes.min.js
Back
var learndash_shortcodes=jQuery.extend(learndash_shortcodes||{},{tinymce_editor:null,show_popup_html:function(){"undefined"!=typeof learndash_admin_shortcodes_assets&&""!=learndash_admin_shortcodes_assets||(learndash_admin_shortcodes_assets={});var e=jQuery("#learndash_shortcodes_holder").length;if(e)learndash_shortcodes.popup_show();else{jQuery("body").append('<div id="learndash_shortcodes_holder" style="display: none;"><div id="learndash_shortcodes"></div></div>');var s={action:"learndash_generate_shortcodes_content",atts:learndash_admin_shortcodes_assets};jQuery.ajax({type:"POST",url:ajaxurl,dataType:"html",cache:!1,data:s,error:function(e,s,t){},success:function(e){void 0!==e&&jQuery("#learndash_shortcodes").html(e),learndash_shortcodes.popup_init(),learndash_shortcodes.popup_show()}})}},popup_show:function(){if("thickbox"===learndash_admin_shortcodes_assets.popup_type){var e=learndash_shortcodes.get_tinymce_url();tb_show(learndash_admin_shortcodes_assets.popup_title,e)}else if("jQuery-dialog"===learndash_admin_shortcodes_assets.popup_type){var s=jQuery(window).width(),t=.9*s,a=jQuery(window).height(),o=.9*a;jQuery("#learndash_shortcodes").dialog({title:learndash_admin_shortcodes_assets.popup_title,dialogClass:"wp-dialog ld-shortcodes",autoOpen:!0,draggable:!1,width:t,height:o,modal:!0,resizable:!1,closeOnEscape:!0,position:{my:"center",at:"center",of:window},open:function(){jQuery(".ui-widget-overlay").bind("click",function(){jQuery("#my-dialog").dialog("close")})},create:function(){jQuery(".ui-dialog-titlebar-close").addClass("ui-button")}}),learndash_shortcodes.popup_set_dimensions(),jQuery("#learndash_shortcodes").dialog("open")}},popup_set_dimensions:function(){var e=jQuery(window).width(),s=.9*e,t=jQuery(window).height(),a=.9*t;if(jQuery("#learndash_shortcodes").dialog("option","width",s),jQuery("#learndash_shortcodes").dialog("option","height",a),window.isRtl){var o=parseInt(jQuery(".ui-dialog.ld-shortcodes").css("left")),r=parseInt(jQuery(".ui-dialog.ld-shortcodes").css("right"));r=-1*o,jQuery(".ui-dialog.ld-shortcodes").css("right",r+"px")}},get_tinymce_url:function(){var e=jQuery(window).width(),s=jQuery(window).height(),t=950<e?950:e,a=s;t-=80,a-=84;var o="#TB_inline?width="+t+"&height="+a+"&inlineId=learndash_shortcodes";return o},tinymce_callback:function(e){learndash_shortcodes.tinymce_editor=e,learndash_shortcodes.show_popup_html()},qt_callback:function(){learndash_shortcodes.tinymce_editor=null,learndash_shortcodes.show_popup_html()},popup_init:function(){jQuery("#learndash_shortcodes_tabs a").click(function(e){e.preventDefault(),learndash_shortcodes.tabs_switch(jQuery(this))}),learndash_shortcodes.tabs_switch(jQuery("#learndash_shortcodes a").first()),jQuery("form.learndash_shortcodes_form").submit(function(e){e.preventDefault(),tb_remove(),learndash_shortcodes.popup_submit(this)}),jQuery(window).resize(function(){learndash_shortcodes.popup_set_dimensions()})},tabs_switch:function(e){jQuery("#learndash_shortcodes_sections .hidable").hide(),jQuery("#learndash_shortcodes_sections #tabs-"+e.attr("data-nav")).show(),jQuery("#learndash_shortcodes_tabs li").removeClass("current"),e.parent().addClass("current")},get_selected_text:function(){var e=document.getElementById("content"),s=e.selectionStart,t=e.selectionEnd;return e.value.substring(s,t)},popup_submit:function(e){"jQuery-dialog"===learndash_admin_shortcodes_assets.popup_type&&jQuery("#learndash_shortcodes").dialog("close");var s=jQuery(e).attr("shortcode_slug"),t=jQuery(e).attr("shortcode_type");void 0===t&&(t=1);var a="["+s,o=e.elements,r="";if(o.length>0)for(var d=0;d<o.length;){var n=o[d];switch(n.type){case"textarea":2==t?r=n.value:a+=" "+n.name+'="'+n.value.replace(/"/g,'\\"')+'"';break;case"checkbox":n.checked&&void 0!==n.value&&""!=n.value&&"0"!=n.value&&(a+=" "+n.name+'="'+n.value.replace(/"/g,'\\"')+'"');break;case"submit":break;case"select-multiple":var i=jQuery(n).attr("name").replace("[]",""),l="";jQuery(":selected",n).each(function(e,s){var t=jQuery(s).val();void 0!==t&&""!=t&&(l.length>0&&(l+=","),l+=t.replace(/"/g,'\\"'))}),l.length>0&&(a+=" "+i+'="'+l+'"');break;case"select-one":case"text":default:void 0!==n.value&&""!=n.value&&(a+=" "+n.name+'="'+n.value.replace(/"/g,'\\"')+'"')}d+=1}a+="]",2==t&&""!=r&&(a+=r,a+="[/"+s+"]"),null!==learndash_shortcodes.tinymce_editor?learndash_shortcodes.tinymce_editor.setContent(a):"undefined"!=typeof QTags&&QTags.insertContent(a)}});
| ver. 1.4 |
Github
|
.
| PHP 7.0.33 | Generation time: 0.02 |
proxy
|
phpinfo
|
Settings