Server IP : 192.64.118.117 / Your IP : 3.16.157.168 Web Server : LiteSpeed System : Linux premium56.web-hosting.com 4.18.0-513.24.1.lve.1.el8.x86_64 #1 SMP Thu May 9 15:10:09 UTC 2024 x86_64 User : thecgapy ( 1160) PHP Version : 7.4.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/thecgapy/mobilecreationz.com/wp-content/plugins/fwdsuvp/js/ |
Upload File : |
jQuery(document).ready(function($) { $.each(fwdsuvpPresetsObj, function(i, el){ $("#fwdsuvp_presets_list").append("<option value='" + el.id + "'>" + el.name + "</option>"); setShortodeIntext(); }); $("#fwdsuvp_presets_list").change(function(){ presetId = $("#fwdsuvp_presets_list").val(); setShortodeIntext(); }); function setShortodeIntext(){ if(fwdsuvpMainPlaylistsObj.length > 0){ $("#fwdsuvp_shortocde").val('[fwdsuvp preset_id="' + presetId + '" playlist_id="' + playlistId + '"]'); $("#fwdsuvp_shortocde").show(); }else{ $("#fwdsuvp_shortocde").hide(); } } $("#fwdsuvp_div").hide(); if (fwdsuvpMainPlaylistsObj.length > 0){ $.each(fwdsuvpMainPlaylistsObj, function(i, el){ $("#fwdsuvp_main_playlists_list").append("<option value='" + el.id + "'>" + el.name + "</option>"); }); $("#fwdsuvp_main_playlists_list").change(function(){ playlistId = $("#fwdsuvp_main_playlists_list").val(); setShortodeIntext(); }); var presetId = $("#fwdsuvp_presets_list").val(); var playlistId = $("#fwdsuvp_main_playlists_list").val(); $("#fwdsuvp_shortcode_btn").click(function(){ var shortcode = '[fwdsuvp preset_id="' + presetId + '" playlist_id="' + playlistId + '"]'; if (typeof tinymce != "undefined"){ var editor = tinymce.get("content"); if (editor && (editor instanceof tinymce.Editor) && ($("textarea#content:hidden").length != 0)) { editor.selection.setContent(shortcode); editor.save({no_events: true}); }else{ var text = $("textarea#content").val(); var select_pos1 = $("textarea#content").prop("selectionStart"); var select_pos2 = $("textarea#content").prop("selectionEnd"); var new_text = text.slice(0, select_pos1) + shortcode + text.slice(select_pos2); $("textarea#content").val(new_text); } }else{ var text = $("textarea#content").val(); var select_pos1 = $("textarea#content").prop("selectionStart"); var select_pos2 = $("textarea#content").prop("selectionEnd"); var new_text = text.slice(0, select_pos1) + shortcode + text.slice(select_pos2); $("textarea#content").val(new_text); } $("#fwdsuvp_div").hide(); $("#fwdsuvp_div").fadeIn(600); $("#fwdsuvp_msg").html("The shortcode has been added!"); return false; }); }else{ var td = $("#fwdsuvp_main_playlists_list").parent(); $("#fwdsuvp_main_playlists_list").remove(); td.append("<em style='margin-left:8px;'>No playlists are available.</em>"); $("#fwdsuvp_shortcode_btn").prop("disabled", true); $("#fwdsuvp_shortcode_btn").css("cursor", "default"); } setShortodeIntext(); });