芝麻web文件管理V1.00
编辑当前文件:/www/wwwroot/fashionmodelquicktrack.com/wp-content/themes/flatsome/assets/js/admin/admin-menu.js
!function(t){"use strict";const e='
';function n(){t(".ux-menu-item-options").each(((n,i)=>{const a=jQuery(i);a.hasClass("js-attached")||(function(n){n.find("select").on("change",(function(){const i=t(this).attr("id"),a=t(this).val(),c=n.parents("li.menu-item"),d=c.find(".ux-menu-item-options__width"),m=c.find(".ux-menu-item-options__height"),l=c.find(".ux-menu-item-options__media"),r=c.find(".ux-menu-item-options__icon-html"),h=0===o(c);"default"===a&&u([d,m]),"container-width"===a&&u([d,m]),"full-width"===a&&u([d,m]),"custom-size"===a&&s([d,m]),"media"===a&&(s([l]),u([r])),"html"===a&&(s([r]),u([l])),i.startsWith("edit-menu-item-block-")&&(h&&a?c.find(".menu-item-ux-block-indicator").length||c.find(".menu-item-title").before('
'+e+"
"):t(".menu-item-ux-block-indicator",c).remove())})),t(".ux-menu-item-options__media-control",n).on("click",".upload-button",(function(e){e.preventDefault();const n=t(this),i=n.data("item-id"),o=wp.media({multiple:!1}).on("select",(()=>{const e=o.state().get("selection").first().toJSON();t(".placeholder","#menu-item-"+i).attr("src",e.url).css("display","block"),n.parent().find("input:hidden:first").val(e.id).trigger("change"),n.parent().find(".remove-button").show()})).open()})).on("click",".remove-button",(function(e){e.preventDefault();const n=t(this),i=n.data("item-id");t(".placeholder","#menu-item-"+i).attr("src","").hide(),n.parent().find("input:hidden:first").val("").trigger("change"),n.hide()}))}(a),a.addClass("js-attached"))}))}function i(e){t(".ux-menu-item-options",e||document).each(((t,e)=>{const n=jQuery(e),i=n.parents("li.menu-item"),a=i.find(".ux-menu-item-options__section-dropdown");0===o(i)?s([a]):u([a]),n.find("select").trigger("change")}))}function o(t){const e=t.attr("class").match(/menu-item-depth-(\d+)/);return e&&e[1]?parseInt(e[1]):0}function s(t){t.forEach((t=>{t.slideDown()}))}function u(t){t.forEach((t=>{t.slideUp()}))}t(document).ready((()=>{n(),i(),wpNavMenu.menusChanged=!1,t("#menu-to-edit").on("sortstop",(function(t,e){setTimeout((()=>{i(e.item)}),1e3)}))})),t(document).on("menu-item-added",(()=>{n(),i()}))}(jQuery);