芝麻web文件管理V1.00
编辑当前文件:/home4/randall/public_html/sl/wp-content/plugins/js_composer-old/assets/js/dist/edit-form.min.js
_.isUndefined(window.vc)&&(window.vc={atts:{}}),(n=>{var i=Backbone.View.extend({events:{},$lg_offset_placeholder_value:!1,$lg_size_placeholder_value:!1,initialize:function(){_.bindAll(this,"setLgPlaceholders")},render:function(){return this},save:function(){var t=[];return this.$el.find(".vc_column_offset_field").each(function(){var e=n(this);e.is(":checkbox:checked")?t.push(e.attr("name")):e.is("select")&&""!==e.val()&&t.push(e.val())}),t},setLgPlaceholders:function(){var e=this.$lg_offset_placeholder_value.val().replace(/[^\d]/g,"");this.$lg_size.find("option:first").text(VcI8nColumnOffsetParam.inherit_default),this.$lg_offset.find("option:first").text(e?VcI8nColumnOffsetParam.inherit+e:"")}});vc.atts.column_offset={parse:function(e){return this.content().find("input.wpb_vc_param_value."+e.param_name).data("vcColumnOffset").save().join(" ")},init:function(e,t){n('[data-column-offset="true"]',t).each(function(){var e=n(this);e.find(".wpb_vc_param_value").data("vcColumnOffset",new i({el:e}).render())})}}})(window.jQuery); _.isUndefined(window.vc)&&(window.vc={atts:{}}),(s=>{var t,n,o;t=wp.media,n=ajaxurl.replace(/admin\-ajax\.php/,"images/wpspin_light.gif"),t.controller.VcCssSingleImage=t.controller.VcSingleImage.extend({setCssEditor:function(e){return e&&(this._css_editor=e),this},updateSelection:function(){var e,t=this.get("selection"),i=this._css_editor.getBackgroundImage();void 0!==i&&""!==i&&-1!==i&&(e=_.map(i.toString().split(/,/),function(e){e=wp.media.model.Attachment.get(e);return e.fetch(),e})),t.reset(e)}}),o=vc.CssEditor=Backbone.View.extend({attrs:{},layouts:["margin","border-width","padding"],positions:["top","right","bottom","left"],$field:!1,simplify:!1,$simplify:!1,events:{"click .vc_icon-remove":"removeImage","click .vc_add-image":"addBackgroundImage","change .vc_simplify":"changeSimplify"},initialize:function(){_.bindAll(this,"setSimplify")},render:function(e){return this.attrs={},this.$simplify=this.$el.find(".vc_simplify"),this.setPlaceholders(),_.isString(e)&&this.parse(e),this},parse:function(e){e=e.split(/\s*(\.[^\{]+)\s*\{\s*([^\}]+)\s*\}\s*/g);e&&e[2]&&this.parseAtts(e[2].replace(/\s+!important/g,""))},addBackgroundImage:function(e){if(e&&e.preventDefault&&e.preventDefault(),window.vc_selectedFilters={},this.image_media)return this.image_media.open("vc_editor");this.image_media=t({state:"vc_single-image",states:[(new t.controller.VcCssSingleImage).setCssEditor(this)]}),this.image_media.on("toolbar:create:vc_single-image",function(e){this.createSelectToolbar(e,{text:window.i18nLocale.set_image})},this.image_media),this.image_media.state("vc_single-image").on("select",this.setBgImage),this.image_media.open("vc_editor")},setBgImage:function(){var i,a,t,e=this.get("selection"),e=(i=e,a=this,t=[],s(".media-modal").addClass("processing-media"),i.each(function(e){t.push(e.get("id"))}),t),n=function(e){if(!window.vc||!window.vc.active_panel)return!1;var e=_.map(e,function(e){return e.attributes}),e=(i.reset(e),_.map(i.models,function(e){return e.attributes})),t=vc.template(s("#vc_css-editor-image-block").html(),_.defaults({},{variable:"img"},vc.templateOptions.custom));a._css_editor.$el.find(".vc_background-image .vc_image").html(t(e[0])),s(".media-modal").removeClass("processing-media"),a._css_editor.$el.closest(".vc_edit-form-tab").trigger("change")};s.ajax({dataType:"json",type:"POST",url:window.ajaxurl,data:{action:"vc_media_editor_add_image",filters:window.vc_selectedFilters,ids:e,vc_inline:!0,_vcnonce:window.vcAdminNonce}}).done(function(e){var t,i,a,r;if("function"==typeof n){for(t=[],a=[],r=0;r
{var t=Backbone.View.extend({events:{change:"setParams"},setParams:function(){var r,e=this.save(),e=this.$el.find('[value="'+e+'"]'),i=vc.edit_element_block_view.content(),n=this.$el;e.length&&(e=e.data("params"),r=[],_.each(e,function(e,a,n){var t,a=i.find("[name="+a+"].wpb_vc_param_value");a.length&&(a.unbind("change.vcParamsPreset"),(t=a.data("vcFieldManager"))&&t.render&&t.render(e),r.push(a),a.val(e).trigger("change"))}),_.each(r,function(e,a){e.bind("change.vcParamsPreset",function(e){_.isUndefined(e.extra_type)&&n.val("")})}))},render:function(){return this.setParams(),this},save:function(){return this.$el.val()}});vc.atts.params_preset={parse:function(e){return n("select[name="+e.param_name+"]",this.content()).val()},init:function(e,a){n(".vc_params-preset-select",a).each(function(){var e=n(this);_.isUndefined(e.data("fieldManager"))&&e.data("fieldManager",new t({el:e}).render())})}}})(window.jQuery); (t=>{new function(){t(".gallery_widget_attached_images_list",this.$view).off("click.removeImage").on("click.removeImage","a.vc_icon-remove",function(e){e.preventDefault();var e=t(this).closest(".edit_form_line"),a=(t(this).parent().remove(),[]);e.find(".added img").each(function(){a.push(t(this).attr("rel"))}),e.find(".gallery_widget_attached_images_ids").val(a.join(",")).trigger("change")}),t(".gallery_widget_attached_images_list").each(function(e){var a=t(this);a.sortable({forcePlaceholderSize:!0,placeholder:"widgets-placeholder-gallery",cursor:"move",items:"li",update:function(){var e=[];t(this).find(".added img").each(function(){e.push(t(this).attr("rel"))}),a.closest(".edit_form_line").find(".gallery_widget_attached_images_ids").val(e.join(",")).trigger("change")}})})};var i=t("#vc_edit-form-tabs");i.length&&(t(".wpb-edit-form").addClass("vc_with-tabs"),i.find(".vc_edit-form-tab-control").removeClass("vc_active").eq(0).addClass("vc_active"),i.find('[data-vc-ui-element="panel-edit-element-tab"]').removeClass("vc_active").eq(0).addClass("vc_active"),i.find(".vc_edit-form-link").on("click",function(e){var a=t(this);e.preventDefault(),i.find(".vc_active").removeClass("vc_active"),a.parent().addClass("vc_active"),t(a.attr("href")).addClass("vc_active").parents(".vc_panel-body").scrollTop(0)}))})(window.jQuery); _.isUndefined(window.vc)&&(window.vc={atts:{}}),(n=>{vc.atts.vc_grid_item={init:function(t,a){!0===vc_user_access().getState("grid_builder")||null===vc_user_access().getState("grid_builder")?this.content().find('[data-vc-shortcode-param-name="'+t.param_name+'"] [data-vc-grid-element="value"]').on("change",function(){var a=n(this).val(),e=n(this).find("[value="+a+"]").data("vcLink");a&&n(this).parents('[data-vc-shortcode-param-name="'+t.param_name+'"]:first').find('[data-vc-grid-item="edit_link"]').attr("href",e)}).trigger("change"):this.content().find('[data-vc-shortcode-param-name="'+t.param_name+'"] .vc_description').remove()},parse:function(a){a=this.content().find('[data-vc-shortcode-param-name="'+a.param_name+'"] [data-vc-grid-element="value"]');return a.length?a.val():""}}})(window.jQuery);