芝麻web文件管理V1.00
编辑当前文件:/home4/randall/public_html/sl/wp-content/plugins/js_composer-old/assets/js/dist/grid-builder.min.js
vc.events.on("vc:access:initialize",function(e){e.add("be_editor",vc_user_access().editor("grid_builder")),e.add("classic_editor",!1),vc.events.trigger("vc:access:grid_builder:ready",e)}); (c=>{vc.gridItemEditor=!0,vc.Storage.prototype.getContent=function(){var e;return _.isObject(window.tinymce)&&tinymce.editors.content&&tinymce.editors.content.save(),(e=window.vc_wpnop(c("#content").val())).length?e:vcDefaultGridItemContent},vc.visualComposerView.prototype.rowSortableSelector="> [data-element_type]",vc.visualComposerView.prototype.events={"click #vc_templates-editor-button":"openTemplatesWindow",'click [data-vc-navbar-control="edit"]':"openVcGitemEditForm",'click [data-vc-navbar-control="preview"]':"renderGitemPreview",'change [data-vc-navbar-control="preview_width"]':"setPreviewItemWidth","click #wpb-save-post":"save",'change [data-vc-navbar-control="animation"]':"changeAnimation"},vc.visualComposerView.previewActivated=!1,vc.visualComposerView.prototype.renderGitemPreview=function(e){e&&e.preventDefaul&&e.preventDefault(),this.previewActivated?this.hidePreview():(vc.showSpinner(),this.sendDataGitemPreview())},vc.visualComposerView.prototype.sendDataGitemPreview=function(){var e;c('[data-vc-grid-item="preview"]').html('
').addClass("vc_visible"),(e=c('
').prependTo("body")).find('[name="post_id"]').val(c("#post_ID").val()),e.find('[name="shortcodes_string"]').val(vc.storage.getContent()),e.find('[type="submit"]').trigger("click"),e.remove()},vc.visualComposerView.prototype.showPreview=function(e){c("#wpbakery_content").hide(),c('[data-vc-grid-item="preview"]').addClass("vc_visible"),_.isString(e)&&c('[data-vc-grid-item="navbar_preview_width"] select').val(e),c('[data-vc-grid-item="navbar_preview_width"]').addClass("vc_visible"),vc.hideSpinner(),c('[data-vc-navbar-control="preview"]').text(i18nLocaleGItem.builder),this.previewActivated=!0},vc.visualComposerView.prototype.hidePreview=function(){c("#wpbakery_content").show(),c('[data-vc-grid-item="preview"]').removeClass("vc_visible").empty(),c('[data-vc-grid-item="navbar_preview_width"]').removeClass("vc_visible"),this.previewActivated=!1,c('[data-vc-navbar-control="preview"]').text(i18nLocaleGItem.preview)},vc.visualComposerView.prototype.setPreviewItemWidth=function(e){var t=c("#vc_gitem-preview iframe").get(0).contentWindow;_.isString(e)?c('[data-vc-grid-item="navbar_preview_width"] select').val(e):e&&e.currentTarget&&t.vcSetItemWidth(c(e.currentTarget).val())},vc.visualComposerView.prototype.openVcGitemEditForm=function(e){e&&e.preventDefaul&&e.preventDefault();e=vc.shortcodes.findWhere({shortcode:"vc_gitem"});this.previewActivated&&this.hidePreview(),e&&vc.edit_element_block_view.render(e)},vc.visualComposerView.prototype.setSortable=function(){return c(".wpb_column_container").sortable({forcePlaceholderSize:!0,forceHelperSize:!1,connectWith:".wpb_column_container",placeholder:"vc_placeholder",items:"> .wpb_sortable.wpb_content_element,> .wpb_content_element.vc-non-draggable",cancel:".vc-non-draggable",helper:this.renderPlaceholder,distance:3,scroll:!0,scrollSensitivity:70,cursor:"move",cursorAt:{top:20,left:16},tolerance:"intersect",start:function(){c("#wpbakery_content").addClass("vc_sorting-started"),c(".vc_not_inner_content").addClass("dragging_in")},stop:function(e,t){c("#wpbakery_content").removeClass("vc_sorting-started"),c(".dragging_in").removeClass("dragging_in");var i=t.item.data("element_type"),n=t.item.parent().closest("[data-element_type]").data("element_type"),o=!!_.isUndefined(vc.map[n].allowed_container_element)||vc.map[n].allowed_container_element;vc.check_relevance(n,i)||c(this).sortable("cancel"),_.isObject(vc.map[i])&&(_.isBoolean(vc.map[i].is_container)&&!0===vc.map[i].is_container||!_.isEmpty(vc.map[i].as_parent))&&!0!==o&&o!==t.item.data("element_type").replace(/_inner$/,"")&&c(this).sortable("cancel"),c(".vc_sorting-empty-container").removeClass("vc_sorting-empty-container")},update:this.updateElementsSorting,over:function(e,t){var i=t.item.data("element_type"),n=t.placeholder.closest("[data-element_type]").data("element_type"),o=!!_.isUndefined(vc.map[n].allowed_container_element)||vc.map[n].allowed_container_element;return!vc.check_relevance(n,i)||_.isObject(vc.map[i])&&(_.isBoolean(vc.map[i].is_container)&&!0===vc.map[i].is_container||!_.isEmpty(vc.map[i].as_parent))&&!0!==o&&o!==t.item.data("element_type").replace(/_inner$/,"")?(t.placeholder.addClass("vc_hidden-placeholder"),!1):(t.sender&&t.sender.length&&!t.sender.find("[data-element_type]:visible").length&&t.sender.addClass("vc_sorting-empty-container"),t.placeholder.removeClass("vc_hidden-placeholder"),void t.placeholder.css({maxWidth:t.placeholder.parent().width()}))}}),this},vc.visualComposerView.prototype.changeAnimation=function(e){var t,i=vc.shortcodes.findWhere({shortcode:"vc_gitem_animated_block"});if(!i)return!1;e=c(e.currentTarget),(t=c.extend({},i.get("params"))).animation=e.val(),i.save({params:t}),this.previewActivated&&this.changePreviewAnimation(t.animation)},vc.visualComposerView.prototype.changePreviewAnimation=function(e){var t=c("#vc_gitem-preview iframe").get(0).contentWindow;t&&t.changeAnimation(e)},vc.visualComposerView.prototype.initializeAccessPolicy=function(){this.accessPolicy={be_editor:vc_user_access().editor("grid_builder"),fe_editor:!1,classic_editor:!1}},vc.EditElementPanelView.prototype.ajaxData=function(){var e=this.model.get("params"),t=vc.getMergedParams(this.model.get("shortcode"),_.extend({},vc.getDefaults(this.model.get("shortcode")),e));return _.isUndefined(e.content)||(t.content=e.content),{action:"vc_edit_form",vc_grid_item_editor:"true",tag:this.model.get("shortcode"),post_id:c("#post_ID").val(),params:t,_vcnonce:window.vcAdminNonce}},vc.EditElementPanelView.prototype.fetchSaveSettingsDialogAjaxData=function(){return{action:"vc_action_render_settings_preset_title_prompt",vc_inline:!0,vc_grid_item_editor:!0,_vcnonce:window.vcAdminNonce}},vc.EditElementPanelView.prototype.saveSettingsAjaxData=function(e,t,i,n){return{action:"vc_action_save_settings_preset",shortcode_name:e,is_default:i?1:0,vc_inline:!0,title:t,data:n,vc_grid_item_editor:!0,_vcnonce:window.vcAdminNonce}},vc.EditElementPanelView.prototype.fetchSaveSettingsDialogAjaxData=function(){return{action:"vc_action_render_settings_preset_title_prompt",vc_inline:!0,vc_grid_item_editor:!0,_vcnonce:window.vcAdminNonce}},vc.EditElementPanelView.prototype.loadSettingsAjaxData=function(e){return{action:"vc_action_get_settings_preset",vc_inline:!0,id:e,vc_grid_item_editor:!0,_vcnonce:window.vcAdminNonce}},vc.EditElementPanelView.prototype.deleteSettingsAjaxData=function(e,t){return{action:"vc_action_delete_settings_preset",shortcode_name:e,vc_inline:!0,id:t,vc_grid_item_editor:!0,_vcnonce:window.vcAdminNonce}},vc.EditElementPanelView.prototype.saveAsDefaultSettingsAjaxData=function(e){return{action:"vc_action_set_as_default_settings_preset",shortcode_name:e,id:this.settingsPresetId,vc_inline:!0,vc_grid_item_editor:!0,_vcnonce:window.vcAdminNonce}},vc.EditElementPanelView.prototype.restoreDefaultSettingsAjaxData=function(e){return{action:"vc_action_restore_default_settings_preset",shortcode_name:e,vc_inline:!0,vc_grid_item_editor:!0,_vcnonce:window.vcAdminNonce}},vc.EditElementPanelView.prototype.reloadSettingsMenuContentAjaxData=function(e){return{action:"vc_action_render_settings_preset_popup",shortcode_name:e,vc_inline:!0,vc_grid_item_editor:!0,_vcnonce:window.vcAdminNonce}},vc.EditElementPanelView.prototype.renderSettingsPresetAjaxData=function(e){var t=this.model.get("parent_id");return{action:"vc_edit_form",tag:this.model.get("shortcode"),parent_tag:t?this.model.collection.get(t).get("shortcode"):null,post_id:c("#post_ID").val(),params:e,vc_grid_item_editor:!0,_vcnonce:window.vcAdminNonce}},window.VcGitemView=window.VcColumnView.extend({animatedBlock:!1,cZone:!1,events:{'click > .vc_controls [data-vc-control="delete"]':"deleteShortcode",'click > .vc_controls [data-vc-control="add"]':"addElement",'click > .vc_controls [data-vc-control="edit"]':"editElement",'click > .vc_controls [data-vc-control="clone"]':"clone",'click [data-vc-gitem="add-c"]':"addCZone",'click > .vc_empty [data-vc-gitem="add-ab"]':"addAnimatedBlock"},initialize:function(e){window.VcColumnView.__super__.initialize.call(this,e),vc.shortcodes.on("all",this.setCZoneHeight)},setContent:function(){this.$content=this.$el.find("> .vc_gitem-content"),_.bindAll(this,"savePositionC","startCDragging","stopCDragging")},setCEmpty:function(){this.$content.addClass("vc_empty-c")},unsetCEmpty:function(){this.$content.removeClass("vc_empty-c")},setEmpty:function(){this.$content.addClass("vc_empty")},unsetEmpty:function(){this.$content.removeClass("vc_empty")},checkIsEmpty:function(){vc.shortcodes.where({parent_id:this.model.id,shortcode:"vc_gitem_zone_c"}).length?this.unsetCEmpty():this.setCEmpty(),vc.shortcodes.where({parent_id:this.model.if,shortcode:"vc_gitem_animated_block"}).length?this.unsetEmpty():this.setEmpty(),window.VcColumnView.__super__.checkIsEmpty.call(this)},addAnimatedBlock:function(e){e&&e.preventDefault&&e.preventDefault(),this.animatedBlock||(vc.storage.lock(),e=vc.shortcodes.create({shortcode:"vc_gitem_animated_block",parent_id:this.model.get("id"),order:1,params:vc.getDefaults("vc_gitem_animated_block"),root_id:this.model.get("id")}),vc.storage.lock(),e.view.addZone("a"),e.view.addZone("b"))},addCZone:function(e){var e=c(e.currentTarget),t=e.data("vcPosition");if(this.cZone)return this.updateCZonePosition(e,t),!1;(e=new vc.shortcode({shortcode:"vc_gitem_add_c_zone",params:{cZonePosition:this.getCZoneModelOrder(t),position:t},parent_id:this.model.get("id")})).view=this,vc.add_element_block_view.render(e)},updateCZonePosition:function(e,t){this.setCZonePosition(t),this.setCZoneOrder(t),this.changeCZonePosition(e),this.setCssPosition(e)},setCZoneOrder:function(e){this.cZone.save({order:this.getCZoneModelOrder(e)})},changeCZonePosition:function(e){this.cZone.view.$el.appendTo(e)},setCZonePosition:function(e){this.model.save({params:_.extend({},this.model.get("params")||{},{c_zone_position:e})})},setCZoneHeight:function(){var e=c('[data-vc-gitem="add-c"][data-vc-position="left"]'),t=c('[data-element_type="vc_gitem_animated_block"]'),i=c('[data-vc-gitem="add-c"][data-vc-position="right"]');e.height("auto"),i.height("auto"),t=Math.max(e.height(),t.height(),i.height()),e.css("height",t),i.css("height",t)},getCZoneModelOrder:function(e){var t=this.animatedBlock.get("order");return"top"===e||"left"===e?t-1:t+1},cZoneRemoved:function(){this.cZone=!1,this.$content.find(".vc_zone-added").removeClass("vc_zone-added"),this.setCZonePosition("")},setDraggableC:function(){this.$content.find('[data-vc-gitem="add-c"]').sortable({items:'[data-element_type="vc_gitem_zone_c"]:not(.vc-non-draggable)',connectWith:'[data-vc-gitem="add-c"]',forcePlaceholderSize:!0,forceHelperSize:!1,placeholder:"vc_placeholder",update:this.savePositionC,start:this.startCDragging,stop:this.stopCDragging}).disableSelection()},startCDragging:function(e,t){this.$el.addClass("vc_sorting")},stopCDragging:function(e,t){this.$el.removeClass("vc_sorting")},savePositionC:function(e,t){var t=t.item.parent(),i=t.data("vcPosition")||"bottom";vc.storage.lock(),this.cZone&&this.cZone.save({order:this.getCZoneModelOrder(i)}),this.setCZonePosition(i),this.setCssPosition(t)},setCssPosition:function(e){this.$content.find('[data-vc-gitem="add-c"].vc_zone-added').removeClass("vc_zone-added"),e.addClass("vc_zone-added")},addShortcode:function(e){var t,i=e.model.get("shortcode");e.render(),"vc_gitem_zone_c"===i?(t=this.model.getParam("c_zone_position")||"bottom",t=this.$content.find('[data-vc-gitem="add-c"][data-vc-position="'+t+'"]'),e.$el.appendTo(t.addClass("vc_zone-added")),this.setDraggableC(),this.cZone=e.model):"vc_gitem_animated_block"===i&&(e.$el.appendTo(c('[data-vc-gitem="add-ab"]')),this.animatedBlock=e.model)}}),window.VcGitemAnimatedBlockView=window.VcColumnView.extend({aZone:!1,bZone:!1,currentAnimation:"",events:{'click > .vc_controls [data-vc-control="delete"]':"deleteShortcode",'click > .vc_controls [data-vc-control="add"]':"addElement",'click > .vc_controls [data-vc-control="edit"]':"editElement",'click > .vc_controls [data-vc-control="clone"]':"clone",'click > .vc_empty-a [data-vc-gitem-animated-block="add-a"]':"addAZone",'click > .vc_empty-b [data-vc-gitem-animated-block="add-b"]':"addBZone","click > .vc_gitem-animated-block-content [data-vc-gitem-tab-link]":"activateZone",'click > .vc_gitem-animated-block-content [data-vc-control="edit"]':"showEditForm"},render:function(){var e;return window.VcGitemAnimatedBlockView.__super__.render.call(this),(e=this.model.getParam("animation"))&&c('[data-vc-navbar-control="animation"]').val(e),this},setContent:function(){this.$content=this.$el.find("> .vc_gitem-animated-block-content")},buildDesignHelpers:function(){window.VcGitemAnimatedBlockView.__super__.buildDesignHelpers.call(this),this.setAnimationDropDown(),this.setAnimationClassToBlock()},changeShortcodeParams:function(e){window.VcGitemAnimatedBlockView.__super__.changeShortcodeParams.call(this,e)},setAnimationClassToBlock:function(){var e=this.model.getParam("animation")||"single";this.currentAnimation&&this.$el.removeClass("vc_gitem-animation-"+this.currentAnimation),this.$el.addClass("vc_gitem-animation vc_gitem-animation-"+e),this.currentAnimation=e},setAnimationDropDown:function(){var e=this.model.getParam("animation");e&&c('[data-vc-gitem-animated-block="animation-dropdown"]').val(e),""===e&&this.activateZone({currentTarget:c(".vc_gitem-tab-a").get(0)})},addAZone:function(e){e&&e.preventDefault&&e.preventDefault(),this.addZone("a")},addBZone:function(e){e&&e.preventDefault&&e.preventDefault(),this.addZone("b")},addZone:function(e){this[e+"Zone"]||vc.shortcodes.create({shortcode:"vc_gitem_zone_"+e,parent_id:this.model.get("id"),params:vc.getDefaults("vc_gitem_zone_"+e)})},addTab:function(e,t){t=c('
'+this.getZoneLabel(e)+'
');t.appendTo('[data-vc-gitem-animated-block="tabs"]'),"a"===e&&this.switchZone(t.find("a"))},getZoneLabel:function(e){var t=vc.map["vc_gitem_zone_"+e]||!1;return t&&t.name?t.name:e},activateZone:function(e){var t=c(e.currentTarget);e&&e.preventDefault&&e.preventDefault(),t.hasClass("vc_active")||this.switchZone(t)},showEditForm:function(e){e&&e.preventDefault&&e.preventDefault(),(e=c(e.currentTarget).data("vcZoneModelId"))&&vc.app.views[e]&&vc.app.views[e].editElement()},switchZone:function(e){this.$el.find('[data-vc-gitem-animated-block="tabs"] .vc_active, [data-vc-gitem-animated-block].vc_active').removeClass("vc_active"),e.parent().addClass("vc_active"),this.$el.find('[data-vc-gitem-animated-block="add-'+e.data("vcGitemTabLink")+'"]').addClass("vc_active")},setAEmpty:function(){this.$content.addClass("vc_empty-a")},unsetAEmpty:function(){this.$content.removeClass("vc_empty-a")},setBEmpty:function(){this.$content.addClass("vc_empty-b")},unsetBEmpty:function(){this.$content.removeClass("vc_empty-b")},setEmpty:function(){this.setAEmpty(),this.setBEmpty()},checkIsEmpty:function(){vc.shortcodes.where({parent_id:this.model.get("id"),shortcode:"vc_gitem_zone_a"}).length?this.unsetAEmpty():this.setAEmpty(),vc.shortcodes.where({parent_id:this.model.get("id"),shortcode:"vc_gitem_zone_b"}).length?this.unsetBEmpty():this.setBEmpty()},addShortcode:function(e){var t=e.model.get("shortcode");e.render(),"vc_gitem_zone_a"===t?(e.$el.appendTo(this.$el.find('[data-vc-gitem-animated-block="add-a"]')),this.aZone=e.model,this.addTab("a",e.model.get("id"))):"vc_gitem_zone_b"===t&&(e.$el.appendTo(this.$el.find('[data-vc-gitem-animated-block="add-b"]')),this.bZone=e.model,this.addTab("b",e.model.get("id")))}}),window.VcGitemZoneView=window.VcColumnView.extend({addElement:function(e){e&&e.preventDefault&&e.preventDefault(),vc.storage.lock(),e=vc.shortcodes.create({shortcode:"vc_gitem_row",params:_.extend({},vc.getDefaults("vc_gitem_row")),parent_id:this.model.get("id")}),vc.shortcodes.create({shortcode:"vc_gitem_col",params:_.extend({width:"1/1"},vc.getDefaults("vc_gitem_col")),parent_id:e.get("id")})},buildDesignHelpers:function(){var e,t,i,n=this.model.getParam("css"),o=this.$el.find("> .vc_controls").get(0),a=this.model.getParam("featured_image");this.$el.find('> [data-vc-helper="color"]').remove(),this.$el.find('> [data-vc-helper="image"]').remove(),this.$el.find('> [data-vc-helper="image-featured"]').remove(),(e=n.match(/background\-image:\s*url\(([^\)]+)\)/))&&!_.isUndefined(e[1])&&(t=e[1]),(e=n.match(/background\-color:\s*([^\s\;]+)\b/))&&!_.isUndefined(e[1])&&(i=e[1]),(e=n.match(/background:\s*([^\s]+)\b\s*url\(([^\)]+)\)/))&&!_.isUndefined(e[1])&&(i=e[1],t=e[2]),t&&c('
').insertBefore(o),i&&c('
').insertBefore(o),"yes"===a&&c('
').insertBefore(o)}}),window.VcGitemZoneCView=window.VcGitemZoneView.extend({removeView:function(){window.VcGitemZoneCView.__super__.removeView.call(this);var e=vc.shortcodes.get(this.model.get("parent_id"));e&&vc.app.views[e.get("id")]&&vc.app.views[e.get("id")].cZoneRemoved()}}),window.VcGitemRowView=window.VcRowView.extend({zone:"",sortingSelector:"> [data-element_type=vc_gitem_col]",getChildTag:function(){return"vc_gitem_col"},addElement:function(e){e&&e.preventDefault&&e.preventDefault(),vc.shortcodes.create({shortcode:this.getChildTag(),params:{},parent_id:this.model.id}),this.setActiveLayoutButton()},buildDesignHelpers:function(){}}),window.VcGitemColView=window.VcColumnView.extend({events:{'click > .vc_controls [data-vc-control="delete"]':"deleteShortcode",'click > .vc_controls [data-vc-control="add"]':"addElement",'click > .vc_controls [data-vc-control="edit"]':"editElement",'click > .vc_controls [data-vc-control="clone"]':"clone","click > .vc_controls [data-vc-align]":"changeTextAlign","click > .wpb_element_wrapper > .vc_empty-container":"addToEmpty"},designHelpersSelector:"> .vc_controls .column_edit",changeTextAlign:function(e){if(e){if(e.preventDefault&&e.preventDefault(),(e=c(e.currentTarget)).hasClass("vc_active"))return!1;e.parent().find(".vc_active").removeClass("vc_active"),e.addClass("vc_active"),_.defer(this.setTextAlign,e.data("vcAlign")||"left")}else this.$el.find('> .vc_controls [data-vc-align="'+(this.model.getParam("align")||"left")+'"]').addClass("vc_active")},setTextAlign:function(e){e=_.extend({},this.model.get("params"),{align:e});this.model.save({params:e})},render:function(){return _.bindAll(this,"setTextAlign"),window.VcGitemColView.__super__.render.call(this),this.changeTextAlign(void 0),this}}),vc.AddElementUIPanelBackendEditor.prototype.createElement=function(e){e&&e.preventDefault&&e.preventDefault();var t,i,n=!1,e=c(e.currentTarget).data("tag");!1!==this.model&&"vc_gitem_add_c_zone"===this.model.get("shortcode")?(this.model.view.setCZonePosition(this.model.getParam("position")),vc.storage.lock(),i=vc.shortcodes.create({shortcode:"vc_gitem_zone_c",parent_id:this.model.get("parent_id"),params:_.extend({},vc.getDefaults("vc_gitem_zone_c")),order:this.model.getParam("cZonePosition")}),this.model.view.cZone=i,vc.storage.lock(),t=vc.shortcodes.create({shortcode:"vc_gitem_row",params:_.extend({},vc.getDefaults("vc_gitem_row")),parent_id:i.get("id")}),vc.storage.lock(),n=vc.shortcodes.create({shortcode:"vc_gitem_col",params:_.extend({width:"1/1"},vc.getDefaults("vc_gitem_col")),parent_id:t.get("id")}).get("id"),i=null):!1!==this.model&&(n=this.model.get("id")),t=vc.shortcodes.create({shortcode:e,parent_id:n,params:vc.getDefaults(e),root_id:vc.shortcodes.findWhere({shortcode:"vc_gitem"})||!1}),"vc_gitem_row"===e&&vc.shortcodes.create({shortcode:"vc_gitem_col",params:{width:"1/1"},parent_id:t.get("id"),root_id:t.get("id")}),this.model=t,i=!(_.isBoolean(vc.getMapped(e).show_settings_on_create)&&!1===vc.getMapped(e).show_settings_on_create),this.model.get("shortcode"),this.hide(),i&&this.showEditForm()},vc.TemplatesPanelViewBackend.prototype.templateLoadPreviewAction="vc_grid_item_editor_load_template_preview",vc.TemplatesPanelViewBackend.prototype.renderTemplate=function(t){_.each(vc.filters.templates,function(e){t=e(t)}),vc.storage.setContent(t),vc.shortcodes.fetch({reset:!0}),this.hide()},c(document).ready(function(){c('[name="screen_columns"][value="1"]').trigger("click"),c("#screen-meta-links, #screen-meta").hide()})})(window.jQuery);