优化后台页面样式和Sidebar

pull/446/head
Karson 2023-07-09 11:44:21 +08:00
parent 1a660364af
commit 37e844181e
19 changed files with 141 additions and 11 deletions

View File

@ -44,7 +44,6 @@ class Index extends Backend
'dashboard' => 'hot', 'dashboard' => 'hot',
'addon' => ['new', 'red', 'badge'], 'addon' => ['new', 'red', 'badge'],
'auth/rule' => __('Menu'), 'auth/rule' => __('Menu'),
'general' => ['new', 'purple'],
], $this->view->site['fixedpage']); ], $this->view->site['fixedpage']);
$action = $this->request->request('action'); $action = $this->request->request('action');
if ($this->request->isPost()) { if ($this->request->isPost()) {

View File

@ -1522,6 +1522,14 @@ table.table-nowrap thead > tr > th {
border-bottom: 1px solid #eee; border-bottom: 1px solid #eee;
border-radius: 0; border-radius: 0;
} }
.sidebar-menu li.active > a > .fa-angle-left,
.sidebar-menu li.active > a > .pull-right-container > .fa-angle-left {
-webkit-transform: rotate(0deg);
-moz-transform: rotate(0deg);
-o-transform: rotate(0deg);
-ms-transform: rotate(0deg);
transform: rotate(0deg);
}
.sidebar-menu li.treeview-open > a > .fa-angle-left, .sidebar-menu li.treeview-open > a > .fa-angle-left,
.sidebar-menu li.treeview-open > a > .pull-right-container > .fa-angle-left { .sidebar-menu li.treeview-open > a > .pull-right-container > .fa-angle-left {
-webkit-transform: rotate(-90deg); -webkit-transform: rotate(-90deg);

File diff suppressed because one or more lines are too long

View File

@ -2481,6 +2481,11 @@
background: transparent; background: transparent;
border-left-color: transparent; border-left-color: transparent;
} }
.skin-black-blue .sidebar-menu li.treeview.active > a,
.skin-black-blue .sidebar-menu li.treeview.treeview-open > a {
background-color: #555299;
border-left-color: #555299;
}
.skin-black-blue .sidebar-menu .treeview-menu { .skin-black-blue .sidebar-menu .treeview-menu {
padding-left: 0; padding-left: 0;
} }
@ -2717,6 +2722,11 @@
background: transparent; background: transparent;
border-left-color: transparent; border-left-color: transparent;
} }
.skin-black-purple .sidebar-menu li.treeview.active > a,
.skin-black-purple .sidebar-menu li.treeview.treeview-open > a {
background-color: #555299;
border-left-color: #555299;
}
.skin-black-purple .sidebar-menu .treeview-menu { .skin-black-purple .sidebar-menu .treeview-menu {
padding-left: 0; padding-left: 0;
} }
@ -2953,6 +2963,11 @@
background: transparent; background: transparent;
border-left-color: transparent; border-left-color: transparent;
} }
.skin-black-green .sidebar-menu li.treeview.active > a,
.skin-black-green .sidebar-menu li.treeview.treeview-open > a {
background-color: #555299;
border-left-color: #555299;
}
.skin-black-green .sidebar-menu .treeview-menu { .skin-black-green .sidebar-menu .treeview-menu {
padding-left: 0; padding-left: 0;
} }
@ -3189,6 +3204,11 @@
background: transparent; background: transparent;
border-left-color: transparent; border-left-color: transparent;
} }
.skin-black-red .sidebar-menu li.treeview.active > a,
.skin-black-red .sidebar-menu li.treeview.treeview-open > a {
background-color: #555299;
border-left-color: #555299;
}
.skin-black-red .sidebar-menu .treeview-menu { .skin-black-red .sidebar-menu .treeview-menu {
padding-left: 0; padding-left: 0;
} }
@ -3425,6 +3445,11 @@
background: transparent; background: transparent;
border-left-color: transparent; border-left-color: transparent;
} }
.skin-black-yellow .sidebar-menu li.treeview.active > a,
.skin-black-yellow .sidebar-menu li.treeview.treeview-open > a {
background-color: #555299;
border-left-color: #555299;
}
.skin-black-yellow .sidebar-menu .treeview-menu { .skin-black-yellow .sidebar-menu .treeview-menu {
padding-left: 0; padding-left: 0;
} }
@ -3661,6 +3686,11 @@
background: transparent; background: transparent;
border-left-color: transparent; border-left-color: transparent;
} }
.skin-black-pink .sidebar-menu li.treeview.active > a,
.skin-black-pink .sidebar-menu li.treeview.treeview-open > a {
background-color: #555299;
border-left-color: #555299;
}
.skin-black-pink .sidebar-menu .treeview-menu { .skin-black-pink .sidebar-menu .treeview-menu {
padding-left: 0; padding-left: 0;
} }

View File

@ -198,6 +198,11 @@
background: transparent; background: transparent;
border-left-color: transparent; border-left-color: transparent;
} }
.skin-black-blue .sidebar-menu li.treeview.active > a,
.skin-black-blue .sidebar-menu li.treeview.treeview-open > a {
background-color: #181f23;
border-left-color: #181f23;
}
.skin-black-blue .sidebar-menu .treeview-menu { .skin-black-blue .sidebar-menu .treeview-menu {
padding-left: 0; padding-left: 0;
} }

View File

@ -198,6 +198,11 @@
background: transparent; background: transparent;
border-left-color: transparent; border-left-color: transparent;
} }
.skin-black-green .sidebar-menu li.treeview.active > a,
.skin-black-green .sidebar-menu li.treeview.treeview-open > a {
background-color: #181f23;
border-left-color: #181f23;
}
.skin-black-green .sidebar-menu .treeview-menu { .skin-black-green .sidebar-menu .treeview-menu {
padding-left: 0; padding-left: 0;
} }

View File

@ -198,6 +198,11 @@
background: transparent; background: transparent;
border-left-color: transparent; border-left-color: transparent;
} }
.skin-black-pink .sidebar-menu li.treeview.active > a,
.skin-black-pink .sidebar-menu li.treeview.treeview-open > a {
background-color: #181f23;
border-left-color: #181f23;
}
.skin-black-pink .sidebar-menu .treeview-menu { .skin-black-pink .sidebar-menu .treeview-menu {
padding-left: 0; padding-left: 0;
} }

View File

@ -198,6 +198,11 @@
background: transparent; background: transparent;
border-left-color: transparent; border-left-color: transparent;
} }
.skin-black-purple .sidebar-menu li.treeview.active > a,
.skin-black-purple .sidebar-menu li.treeview.treeview-open > a {
background-color: #181f23;
border-left-color: #181f23;
}
.skin-black-purple .sidebar-menu .treeview-menu { .skin-black-purple .sidebar-menu .treeview-menu {
padding-left: 0; padding-left: 0;
} }

View File

@ -198,6 +198,11 @@
background: transparent; background: transparent;
border-left-color: transparent; border-left-color: transparent;
} }
.skin-black-red .sidebar-menu li.treeview.active > a,
.skin-black-red .sidebar-menu li.treeview.treeview-open > a {
background-color: #181f23;
border-left-color: #181f23;
}
.skin-black-red .sidebar-menu .treeview-menu { .skin-black-red .sidebar-menu .treeview-menu {
padding-left: 0; padding-left: 0;
} }

View File

@ -198,6 +198,11 @@
background: transparent; background: transparent;
border-left-color: transparent; border-left-color: transparent;
} }
.skin-black-yellow .sidebar-menu li.treeview.active > a,
.skin-black-yellow .sidebar-menu li.treeview.treeview-open > a {
background-color: #181f23;
border-left-color: #181f23;
}
.skin-black-yellow .sidebar-menu .treeview-menu { .skin-black-yellow .sidebar-menu .treeview-menu {
padding-left: 0; padding-left: 0;
} }

View File

@ -67,6 +67,7 @@ define(['jquery', 'bootstrap', 'backend', 'addtabs', 'adminlte', 'form'], functi
var visible = nextul.is(":visible"); var visible = nextul.is(":visible");
if (nextul.length == 0) { if (nextul.length == 0) {
$(this).parents("li").addClass("active"); $(this).parents("li").addClass("active");
$(this).closest(".treeview").addClass("treeview-open");
} else { } else {
} }
e.stopPropagation(); e.stopPropagation();

View File

@ -61,8 +61,10 @@ define(['jquery', 'bootstrap', 'upload', 'validator', 'validator-lang'], functio
var msg = ret.hasOwnProperty("msg") && ret.msg !== "" ? ret.msg : __('Operation completed'); var msg = ret.hasOwnProperty("msg") && ret.msg !== "" ? ret.msg : __('Operation completed');
parent.Toastr.success(msg); parent.Toastr.success(msg);
parent.$(".btn-refresh").trigger("click"); parent.$(".btn-refresh").trigger("click");
var index = parent.Layer.getFrameIndex(window.name); if (window.name) {
parent.Layer.close(index); var index = parent.Layer.getFrameIndex(window.name);
parent.Layer.close(index);
}
return false; return false;
}, function (data, ret) { }, function (data, ret) {
that.holdSubmit(false); that.holdSubmit(false);
@ -513,13 +515,27 @@ define(['jquery', 'bootstrap', 'upload', 'validator', 'validator-lang'], functio
var baseregex = /^([a-z0-9\_]+)([>|<|=|\!]=?)(.*)$/i, strregex = /^('|")(.*)('|")$/, regregex = /^regex:(.*)$/; var baseregex = /^([a-z0-9\_]+)([>|<|=|\!]=?)(.*)$/i, strregex = /^('|")(.*)('|")$/, regregex = /^regex:(.*)$/;
// @formatter:off // @formatter:off
var operator_result = { var operator_result = {
'>': function(a, b) { return a > b; }, '>': function (a, b) {
'>=': function(a, b) { return a >= b; }, return a > b;
'<': function(a, b) { return a < b; }, },
'<=': function(a, b) { return a <= b; }, '>=': function (a, b) {
'==': function(a, b) { return a == b; }, return a >= b;
'!=': function(a, b) { return a != b; }, },
'in': function(a, b) { return b.split(/\,/).indexOf(a) > -1; }, '<': function (a, b) {
return a < b;
},
'<=': function (a, b) {
return a <= b;
},
'==': function (a, b) {
return a == b;
},
'!=': function (a, b) {
return a != b;
},
'in': function (a, b) {
return b.split(/\,/).indexOf(a) > -1;
},
'regex': function (a, b) { 'regex': function (a, b) {
var regParts = b.match(/^\/(.*?)\/([gim]*)$/); var regParts = b.match(/^\/(.*?)\/([gim]*)$/);
var regexp = regParts ? new RegExp(regParts[1], regParts[2]) : new RegExp(b); var regexp = regParts ? new RegExp(regParts[1], regParts[2]) : new RegExp(b);

View File

@ -1552,6 +1552,10 @@ table.table-nowrap {
} }
} }
.sidebar-menu li.active > a > .fa-angle-left, .sidebar-menu li.active > a > .pull-right-container > .fa-angle-left {
.rotate(0deg);
}
.sidebar-menu li.treeview-open > a > .fa-angle-left, .sidebar-menu li.treeview-open > a > .pull-right-container > .fa-angle-left { .sidebar-menu li.treeview-open > a > .fa-angle-left, .sidebar-menu li.treeview-open > a > .pull-right-container > .fa-angle-left {
.rotate(-90deg); .rotate(-90deg);
} }

View File

@ -99,6 +99,13 @@
border-left-color: transparent; border-left-color: transparent;
} }
li.treeview {
&.active > a,&.treeview-open > a {
background-color: @sidebar-dark-submenu-bg;
border-left-color: @sidebar-dark-submenu-bg;
}
}
.treeview-menu { .treeview-menu {
padding-left: 0; padding-left: 0;

View File

@ -99,6 +99,13 @@
border-left-color: transparent; border-left-color: transparent;
} }
li.treeview {
&.active > a,&.treeview-open > a {
background-color: @sidebar-dark-submenu-bg;
border-left-color: @sidebar-dark-submenu-bg;
}
}
.treeview-menu { .treeview-menu {
padding-left: 0; padding-left: 0;

View File

@ -99,6 +99,13 @@
border-left-color: transparent; border-left-color: transparent;
} }
li.treeview {
&.active > a,&.treeview-open > a {
background-color: @sidebar-dark-submenu-bg;
border-left-color: @sidebar-dark-submenu-bg;
}
}
.treeview-menu { .treeview-menu {
padding-left: 0; padding-left: 0;

View File

@ -99,6 +99,13 @@
border-left-color: transparent; border-left-color: transparent;
} }
li.treeview {
&.active > a,&.treeview-open > a {
background-color: @sidebar-dark-submenu-bg;
border-left-color: @sidebar-dark-submenu-bg;
}
}
.treeview-menu { .treeview-menu {
padding-left: 0; padding-left: 0;

View File

@ -99,6 +99,13 @@
border-left-color: transparent; border-left-color: transparent;
} }
li.treeview {
&.active > a,&.treeview-open > a {
background-color: @sidebar-dark-submenu-bg;
border-left-color: @sidebar-dark-submenu-bg;
}
}
.treeview-menu { .treeview-menu {
padding-left: 0; padding-left: 0;

View File

@ -99,6 +99,13 @@
border-left-color: transparent; border-left-color: transparent;
} }
li.treeview {
&.active > a,&.treeview-open > a {
background-color: @sidebar-dark-submenu-bg;
border-left-color: @sidebar-dark-submenu-bg;
}
}
.treeview-menu { .treeview-menu {
padding-left: 0; padding-left: 0;