界面框架初步提交
This commit is contained in:
78
src/main/webapp/static/pages/scripts/home.js
Normal file
78
src/main/webapp/static/pages/scripts/home.js
Normal file
@@ -0,0 +1,78 @@
|
||||
var home = function () {
|
||||
|
||||
var decorator_init = function() {
|
||||
|
||||
//解决sitemesh3中body属性无法加载问题
|
||||
if($("#metaId")[0] && $("#metaId").val() != "")
|
||||
$("body").attr("id",$("#metaId").val());
|
||||
if($("#metaClass")[0] && $("#metaClass").val() != "")
|
||||
$("body").attr("class",$("#metaClass").val());
|
||||
|
||||
}
|
||||
|
||||
|
||||
//菜单选择触发事件
|
||||
var menu_action_init = function() {
|
||||
|
||||
//顶部导航顶级菜单事件
|
||||
$(".mega-menu li a").click(function(e){
|
||||
|
||||
var $this = $(this);
|
||||
var next_ul = $this.next("ul");
|
||||
var prev_ul = $this.parents("ul");
|
||||
var menuId = "#menu_" + $this.attr("id");
|
||||
|
||||
if(next_ul.length) {
|
||||
return false;
|
||||
}
|
||||
|
||||
if(prev_ul.hasClass("dropdown-menu")) {
|
||||
$this = prev_ul;
|
||||
}
|
||||
|
||||
$(".mega-menu li.active").removeClass("active")
|
||||
$this.parent("li").addClass("active");
|
||||
|
||||
if ($(menuId).length){
|
||||
$(".page-sidebar>.accordion").addClass("hide");
|
||||
$(menuId).removeClass("hide");
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return {
|
||||
init: function () {
|
||||
decorator_init();
|
||||
menu_action_init();
|
||||
},
|
||||
setIframeHeight: function (iframe) {
|
||||
|
||||
if (iframe) {
|
||||
var iframeWin = iframe.contentWindow;
|
||||
if (iframeWin.document.body) {
|
||||
iframe.height = iframeWin.document.body.clientHeight;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
}();
|
||||
|
||||
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
|
||||
home.init();
|
||||
|
||||
setIframeHeight($("#mainFrame"));
|
||||
|
||||
|
||||
});
|
||||
1
src/main/webapp/static/pages/scripts/table-datatables-managed.min.js
vendored
Normal file
1
src/main/webapp/static/pages/scripts/table-datatables-managed.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user