(function(){ $.fn.webuiLayout = function(params){ if(!params) params = {}; var layout = $(this).attr("id"); $("div[position='left']").each(function(index,dom){ var hide = $(dom).attr("hide"); if(hide == "false") params.allowLeftCollapse = false; var resize = $(dom).attr("resize"); if(resize == "false") params.allowLeftResize = false; if($(dom).attr("width")) params.leftWidth = $(dom).attr("width"); }); $("div[position='right']").each(function(index,dom){ var hide = $(dom).attr("hide"); if(hide == "false") params.allowRightCollapse = false; var resize = $(dom).attr("resize"); if(resize == "false") params.allowRightResize = false; if($(dom).attr("width")) params.rightWidth = $(dom).attr("width"); }); $("div[position='top']").each(function(index,dom){ var resize = $(dom).attr("resize"); if(resize == "false") params.allowTopResize = false; if($(dom).attr("height")) params.topHeight = $(dom).attr("height"); }); $("div[position='bottom']").each(function(index,dom){ var resize = $(dom).attr("resize"); if(resize == "false") params.allowBottomResize = false; if($(dom).attr("height")) params.bottomHeight = $(dom).attr("height"); }); $("#"+layout).webLayout(params); }; })(jQuery); $(function(){ $(".web-layout").each(function(index,dom){ var layout = $(dom).attr("id"); if(layout == undefined){ $(dom).attr("id","webLayout"); layout = "wenLayout"; } $("#"+layout).webuiLayout(); }); $(".operating-ct").each(function(index,dom){ $(dom).addClass("n-panel-body"); }); });