芝麻web文件管理V1.00
编辑当前文件:/home2/sdektunc/timucuy.com/wp-content/themes/customizr/assets/back/js/tc_ajax_slider.min.js
var CzrSlider;!function(s){"use strict";s(function(){CzrSlider=function(){this.$body=s("body"),this._action="slider_action",this._nonce=SliderAjax.SliderCheckNonce,this.$_slider_section_box=s("#slider_sectionid"),this.$_slider_fields_box=s("#slider-fields-box"),this.$_tc_post_id=s("input#tc_post_id"),this._check_field="slider_check_field",this._context="attachment",0
").addClass("updated").css("opacity",0).html('
Slider updated
').appendTo("#update-status");e.animate({opacity:.9},function(){e.delay(1200).fadeOut(function(){e.remove()})}),this.$_slider_fields_box.find(".spinner").hide(),this._init_sortable()},_build_data:function(e){var i={};switch(e){case"new_slider":case"select_slider":i=s.extend({},this._data,{post_slider_name:s("select#post_slider_field").val(),new_slider_name:s("input#slider_field").val()}),"attachment"==this._context&&s.extend(i,this._data,{slide_title_field:s("input#slide_title_field").val(),slide_text_field:s("textarea#slide_text_field").val(),slide_color_field:s("input#slide_color_field").val(),slide_button_field:s("input#slide_button_field").val(),slide_link_field:s("select#slide_link_field").val(),slide_custom_link_field:s("input#slide_custom_link_field").val(),slide_link_target_field:s("input#slide_link_target_field").is(":checked")?1:"",slide_link_whole_slide_field:s("input#slide_link_whole_slide_field").is(":checked")?1:""});break;case"delete_slider":i=s.extend({},this._data,{delete_slider:!0,currentpostslider:s("select#post_slider_field").val(),new_slider_name:null});break;case"reorder_slides":i=s.extend({},this._data,{newOrder:this.$_slider_section_box.find("#sortable").sortable("toArray").toString(),currentpostslider:s("select#post_slider_field").val()});break;default:i=this._data}return i[this._check_field]=this.$_slider_check_field.is(":checked")?1:"",i},_init_ext_plugins:function(){this._init_color_picker(),this._init_checkboxes(),this._init_sortable(),this._init_multipicker()},_init_color_picker:function(){if(this._color_picker_on){var e=s("#slide_color_field");switch(this._color_picker_func){case"farbtastic":s("#colorfield").farbtastic(e);break;default:e.wpColorPicker()}}},_init_checkboxes:function(){var t=".czr-toggle-check",e=t+' input[type="checkbox"]',i=function(e){e.each(function(){var e=s(this),i=e.closest(t);i.toggleClass("is-checked",e.is(":checked")),i.find("svg").remove(),i.append(e.is(":checked")?'
':'
')})};this.$_slider_section_box.on("change",e,function(){i(s(this))}),i(s(e))},_init_sortable:function(){this.$_slider_section_box.find("#sortable").sortable({placeholder:"ui-state-highlight"}).disableSelection()},_init_multipicker:function(){"function"==typeof s.fn.czrSelect2&&this.$_slider_section_box.find("select.czr_multiple_picker, select.tc_multiple_picker").czrSelect2({closeOnSelect:!1,formatSelection:function(e){return e.text.replace(/\u2013|\u2014/g,"")}})}}),new CzrSlider})}(jQuery);