优化控制栏&时间区间回调

pull/354/MERGE
Karson 2021-12-28 16:43:28 +08:00
parent b52df110ee
commit 41fc1d1b3a
2 changed files with 4 additions and 11 deletions

View File

@ -284,13 +284,9 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], functi
}); });
// 切换子菜单显示和菜单小图标的显示 // 切换子菜单显示和菜单小图标的显示
$("[data-menu]").on('click', function () { $("[data-menu='show-submenu']").on('click', function () {
if ($(this).data("menu") == 'show-submenu') { createCookie('show_submenu', $(this).prop("checked") ? 1 : 0);
createCookie('show_submenu', $(this).prop("checked") ? 1 : 0); location.reload();
location.reload();
} else {
nav.toggleClass("disable-top-badge");
}
}); });
// 右侧控制栏切换 // 右侧控制栏切换
@ -369,9 +365,6 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], functi
if ($('ul.sidebar-menu').hasClass('show-submenu')) { if ($('ul.sidebar-menu').hasClass('show-submenu')) {
$("[data-menu='show-submenu']").attr('checked', 'checked'); $("[data-menu='show-submenu']").attr('checked', 'checked');
} }
if (nav.hasClass('disable-top-badge')) {
$("[data-menu='disable-top-badge']").attr('checked', 'checked');
}
var sidebarExpandOnHover = localStorage.getItem('sidebarExpandOnHover'); var sidebarExpandOnHover = localStorage.getItem('sidebarExpandOnHover');
if (sidebarExpandOnHover == '1') { if (sidebarExpandOnHover == '1') {

View File

@ -216,7 +216,7 @@ define(['jquery', 'bootstrap', 'upload', 'validator', 'validator-lang'], functio
$(this).on('cancel.daterangepicker', function (ev, picker) { $(this).on('cancel.daterangepicker', function (ev, picker) {
$(this).val('').trigger('blur'); $(this).val('').trigger('blur');
}); });
$(this).daterangepicker($.extend(true, options, $(this).data() || {}, $(this).data("daterangepicker-options") || {}), callback); $(this).daterangepicker($.extend(true, options, $(this).data() || {}, $(this).data("daterangepicker-options") || {}));
}); });
}); });
} }