Merge branch 'ux' into develop
This commit is contained in:
commit
12c73b457b
|
|
@ -101,7 +101,8 @@ class ServiceProvider extends ModuleServiceProvider
|
|||
'icon' => 'icon-user',
|
||||
'url' => Backend::URL('backend/users/myaccount'),
|
||||
'order' => 400,
|
||||
'context' => 'mysettings'
|
||||
'context' => 'mysettings',
|
||||
'keywords' => 'backend::lang.myaccount.menu_keywords',
|
||||
],
|
||||
]);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -8071,6 +8071,9 @@ label {
|
|||
transition: none;
|
||||
-webkit-box-shadow: none;
|
||||
box-shadow: none;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
}
|
||||
.form-control:focus {
|
||||
-webkit-box-shadow: none;
|
||||
|
|
@ -8425,16 +8428,17 @@ label {
|
|||
border-radius: 2px;
|
||||
}
|
||||
.switch-field .field-switch {
|
||||
padding-left: 105px;
|
||||
padding-left: 75px;
|
||||
float: left;
|
||||
}
|
||||
.custom-switch {
|
||||
display: block;
|
||||
width: 90px;
|
||||
height: 25px;
|
||||
width: 58px;
|
||||
height: 26px;
|
||||
position: relative;
|
||||
text-transform: uppercase;
|
||||
border: 1px solid #999999;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
|
|
@ -8452,14 +8456,14 @@ label {
|
|||
z-index: 4;
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 50%;
|
||||
top: 0;
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
right: 34px;
|
||||
top: 2px;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background-color: #f6f6f6;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-border-radius: 20px;
|
||||
-moz-border-radius: 20px;
|
||||
border-radius: 20px;
|
||||
-webkit-transition: all 0.1s;
|
||||
transition: all 0.1s;
|
||||
}
|
||||
|
|
@ -8481,16 +8485,18 @@ label {
|
|||
filter: alpha(opacity=0);
|
||||
}
|
||||
.custom-switch input:checked ~ .slide-button {
|
||||
right: 0%;
|
||||
right: 2px;
|
||||
}
|
||||
.custom-switch input:checked ~ span {
|
||||
background-color: #8da85e;
|
||||
}
|
||||
.custom-switch input:checked ~ span span:first-of-type {
|
||||
color: #FFFFFF;
|
||||
display: block;
|
||||
}
|
||||
.custom-switch input:checked ~ span span:last-of-type {
|
||||
color: #666666;
|
||||
display: none;
|
||||
}
|
||||
.custom-switch > span {
|
||||
display: block;
|
||||
|
|
@ -8499,28 +8505,34 @@ label {
|
|||
left: 0;
|
||||
width: 100%;
|
||||
background-color: #cc3300;
|
||||
font-size: 11px;
|
||||
-webkit-user-select: none;
|
||||
-moz-user-select: none;
|
||||
-ms-user-select: none;
|
||||
user-select: none;
|
||||
-webkit-border-radius: 3px;
|
||||
-moz-border-radius: 3px;
|
||||
border-radius: 3px;
|
||||
-webkit-border-radius: 20px;
|
||||
-moz-border-radius: 20px;
|
||||
border-radius: 20px;
|
||||
}
|
||||
.custom-switch > span span {
|
||||
z-index: 5;
|
||||
display: block;
|
||||
width: 50%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
top: 1px;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
.custom-switch > span span:last-child {
|
||||
left: 50%;
|
||||
color: #FFFFFF;
|
||||
display: block;
|
||||
}
|
||||
.custom-switch > span span:first-of-type {
|
||||
padding-left: 9px;
|
||||
display: none;
|
||||
color: #666666;
|
||||
}
|
||||
.custom-select .select2-choice {
|
||||
|
|
@ -10186,6 +10198,7 @@ html.cssanimations .cursor-loading-indicator.hide {
|
|||
border: none;
|
||||
text-align: left;
|
||||
outline: none!important;
|
||||
padding: 9px 18px;
|
||||
}
|
||||
.btn[class^="oc-icon-"]:before,
|
||||
.btn[class*=" oc-icon-"]:before {
|
||||
|
|
@ -10856,12 +10869,14 @@ body.dropdown-open .dropdown-overlay {
|
|||
.control-tabs.primary > div > ul.nav-tabs,
|
||||
.control-tabs.primary > div > div > ul.nav-tabs {
|
||||
position: relative;
|
||||
margin-left: -20px;
|
||||
margin-right: -20px;
|
||||
}
|
||||
.control-tabs.primary > ul.nav-tabs:before,
|
||||
.control-tabs.primary > div > ul.nav-tabs:before,
|
||||
.control-tabs.primary > div > div > ul.nav-tabs:before {
|
||||
position: absolute;
|
||||
top: 19px;
|
||||
top: 26px;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
content: ' ';
|
||||
|
|
@ -10873,16 +10888,64 @@ body.dropdown-open .dropdown-overlay {
|
|||
padding-right: 10px;
|
||||
padding-left: 11px;
|
||||
margin-right: 0;
|
||||
margin-left: -30px;
|
||||
background: transparent;
|
||||
}
|
||||
.control-tabs.primary > ul.nav-tabs > li:first-child,
|
||||
.control-tabs.primary > div > ul.nav-tabs > li:first-child,
|
||||
.control-tabs.primary > div > div > ul.nav-tabs > li:first-child {
|
||||
margin-left: 0;
|
||||
padding-left: 15px!important;
|
||||
}
|
||||
.control-tabs.primary > ul.nav-tabs > li a,
|
||||
.control-tabs.primary > div > ul.nav-tabs > li a,
|
||||
.control-tabs.primary > div > div > ul.nav-tabs > li a {
|
||||
font-size: 12px;
|
||||
padding-bottom: 3px;
|
||||
padding: 0 16px;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
z-index: 101;
|
||||
background: transparent;
|
||||
overflow: visible;
|
||||
}
|
||||
.control-tabs.primary > ul.nav-tabs > li a > span.title,
|
||||
.control-tabs.primary > div > ul.nav-tabs > li a > span.title,
|
||||
.control-tabs.primary > div > div > ul.nav-tabs > li a > span.title {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding: 5px 5px 9px 5px;
|
||||
-webkit-box-sizing: border-box;
|
||||
-moz-box-sizing: border-box;
|
||||
box-sizing: border-box;
|
||||
border-top: 1px solid #f0f0f0;
|
||||
z-index: 100;
|
||||
}
|
||||
.control-tabs.primary > ul.nav-tabs > li a > span.title:before,
|
||||
.control-tabs.primary > div > ul.nav-tabs > li a > span.title:before,
|
||||
.control-tabs.primary > div > div > ul.nav-tabs > li a > span.title:before,
|
||||
.control-tabs.primary > ul.nav-tabs > li a > span.title:after,
|
||||
.control-tabs.primary > div > ul.nav-tabs > li a > span.title:after,
|
||||
.control-tabs.primary > div > div > ul.nav-tabs > li a > span.title:after {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
background: transparent url(../images/primary-tab-shape.png) no-repeat left -31px;
|
||||
width: 16px;
|
||||
height: 26px;
|
||||
display: block;
|
||||
top: -1px;
|
||||
z-index: 100;
|
||||
}
|
||||
.control-tabs.primary > ul.nav-tabs > li a > span.title:before,
|
||||
.control-tabs.primary > div > ul.nav-tabs > li a > span.title:before,
|
||||
.control-tabs.primary > div > div > ul.nav-tabs > li a > span.title:before {
|
||||
left: -16px;
|
||||
}
|
||||
.control-tabs.primary > ul.nav-tabs > li a > span.title:after,
|
||||
.control-tabs.primary > div > ul.nav-tabs > li a > span.title:after,
|
||||
.control-tabs.primary > div > div > ul.nav-tabs > li a > span.title:after {
|
||||
right: -16px;
|
||||
background-position: -61px -31px;
|
||||
}
|
||||
.control-tabs.primary > ul.nav-tabs > li:last-child,
|
||||
.control-tabs.primary > div > ul.nav-tabs > li:last-child,
|
||||
|
|
@ -10899,12 +10962,36 @@ body.dropdown-open .dropdown-overlay {
|
|||
.control-tabs.primary > ul.nav-tabs > li.active a:before,
|
||||
.control-tabs.primary > div > ul.nav-tabs > li.active a:before,
|
||||
.control-tabs.primary > div > div > ul.nav-tabs > li.active a:before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
top: 26px;
|
||||
height: 1px;
|
||||
right: 2px;
|
||||
left: 0;
|
||||
top: 19px;
|
||||
border-bottom: 1px solid #ec8017;
|
||||
content: ' ';
|
||||
background-color: #fafafa;
|
||||
}
|
||||
.control-tabs.primary > ul.nav-tabs > li.active a,
|
||||
.control-tabs.primary > div > ul.nav-tabs > li.active a,
|
||||
.control-tabs.primary > div > div > ul.nav-tabs > li.active a {
|
||||
z-index: 107;
|
||||
}
|
||||
.control-tabs.primary > ul.nav-tabs > li.active a > span.title,
|
||||
.control-tabs.primary > div > ul.nav-tabs > li.active a > span.title,
|
||||
.control-tabs.primary > div > div > ul.nav-tabs > li.active a > span.title {
|
||||
z-index: 105;
|
||||
border-top-color: #d6d6d6;
|
||||
}
|
||||
.control-tabs.primary > ul.nav-tabs > li.active a > span.title:before,
|
||||
.control-tabs.primary > div > ul.nav-tabs > li.active a > span.title:before,
|
||||
.control-tabs.primary > div > div > ul.nav-tabs > li.active a > span.title:before {
|
||||
background-position: left 0;
|
||||
z-index: 107;
|
||||
}
|
||||
.control-tabs.primary > ul.nav-tabs > li.active a > span.title:after,
|
||||
.control-tabs.primary > div > ul.nav-tabs > li.active a > span.title:after,
|
||||
.control-tabs.primary > div > div > ul.nav-tabs > li.active a > span.title:after {
|
||||
background-position: -61px 0;
|
||||
z-index: 107;
|
||||
}
|
||||
.control-tabs.secondary > ul.nav-tabs > li,
|
||||
.control-tabs.secondary > div > ul.nav-tabs > li,
|
||||
|
|
@ -12862,3 +12949,112 @@ div[data-control="balloon-selector"]:not(.control-disabled) ul li:hover {
|
|||
.callout.no-subheader > .header i {
|
||||
margin-top: -5px;
|
||||
}
|
||||
.sidenav-tree {
|
||||
width: 280px;
|
||||
background: #34495e;
|
||||
}
|
||||
.sidenav-tree .control-toolbar {
|
||||
padding: 20px 0 20px 20px;
|
||||
}
|
||||
.sidenav-tree .control-toolbar input.form-control {
|
||||
border: none;
|
||||
}
|
||||
.sidenav-tree ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
.sidenav-tree div.scrollbar-thumb {
|
||||
background: #2b3e50!important;
|
||||
}
|
||||
.sidenav-tree ul.top-level > li[data-status=collapsed] > div.group h3:before {
|
||||
-webkit-transform: rotate(0deg) translate(3px, 0);
|
||||
-ms-transform: rotate(0deg) translate(3px, 0);
|
||||
transform: rotate(0deg) translate(3px, 0);
|
||||
}
|
||||
.sidenav-tree ul.top-level > li[data-status=collapsed] ul {
|
||||
display: none;
|
||||
}
|
||||
.sidenav-tree ul.top-level > li > div.group h3 {
|
||||
background: #2b3e50;
|
||||
color: #ecf0f1;
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
padding: 15px 15px 15px 33px;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
}
|
||||
.sidenav-tree ul.top-level > li > div.group h3:before {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
}
|
||||
.sidenav-tree ul.top-level > li > div.group h3:before {
|
||||
left: 13px;
|
||||
top: 15px;
|
||||
color: #cfcfcf;
|
||||
font-family: FontAwesome;
|
||||
font-weight: normal;
|
||||
font-style: normal;
|
||||
text-decoration: inherit;
|
||||
-webkit-font-smoothing: antialiased;
|
||||
*margin-right: .3em;
|
||||
content: "\f0da";
|
||||
-webkit-transform: rotate(90deg) translate(5px, 0);
|
||||
-ms-transform: rotate(90deg) translate(5px, 0);
|
||||
transform: rotate(90deg) translate(5px, 0);
|
||||
-webkit-transition: all 0.1s ease;
|
||||
transition: all 0.1s ease;
|
||||
}
|
||||
.sidenav-tree ul.top-level > li > ul li a {
|
||||
display: block;
|
||||
position: relative;
|
||||
padding: 15px 15px 15px 40px;
|
||||
color: #808b93;
|
||||
background: #3d5265;
|
||||
margin-bottom: 1px;
|
||||
text-decoration: none!important;
|
||||
}
|
||||
.sidenav-tree ul.top-level > li > ul li a:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
.sidenav-tree ul.top-level > li > ul li a i {
|
||||
position: absolute;
|
||||
left: 15px;
|
||||
top: 17px;
|
||||
font-size: 16px;
|
||||
}
|
||||
.sidenav-tree ul.top-level > li > ul li a span {
|
||||
display: block;
|
||||
line-height: 150%;
|
||||
}
|
||||
.sidenav-tree ul.top-level > li > ul li a span.header {
|
||||
font-size: 14px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
.sidenav-tree ul.top-level > li > ul li a span.description {
|
||||
font-size: 12px;
|
||||
font-weight: 100;
|
||||
}
|
||||
.sidenav-tree ul.top-level > li > ul li.active a {
|
||||
background: #34495e;
|
||||
color: #ecf0f1;
|
||||
}
|
||||
.sidenav-tree ul.top-level > li > ul li.active a:before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
width: 4px;
|
||||
background: #e6802b;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
.sidenav-tree ul.top-level > li > ul li:last-child a {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
.sidenav-tree ul.top-level > li > ul li:hover a {
|
||||
background-color: #34495e;
|
||||
}
|
||||
|
|
|
|||
Binary file not shown.
|
After Width: | Height: | Size: 2.2 KiB |
|
|
@ -255,6 +255,57 @@
|
|||
: this.$el.get(0).scrollWidth;
|
||||
}
|
||||
|
||||
Scrollbar.prototype.gotoElement = function(element, callback) {
|
||||
var $el = $(element)
|
||||
if (!$el.length)
|
||||
return;
|
||||
|
||||
var self = this,
|
||||
offset = 0,
|
||||
animated = false,
|
||||
params = {
|
||||
duration: 300,
|
||||
queue: false,
|
||||
complete: function(){
|
||||
if (callback !== undefined)
|
||||
callback()
|
||||
}
|
||||
}
|
||||
|
||||
if (!this.options.vertical) {
|
||||
offset = $el.get(0).offsetLeft - this.$el.scrollLeft()
|
||||
|
||||
if (offset < 0) {
|
||||
this.$el.animate({'scrollLeft': $el.get(0).offsetLeft}, params)
|
||||
animated = true
|
||||
} else {
|
||||
offset = $el.get(0).offsetLeft + $el.outerWidth() - (this.$el.scrollLeft() + this.$el.outerWidth())
|
||||
if (offset > 0) {
|
||||
this.$el.animate({'scrollLeft': $el.get(0).offsetLeft + $el.outerWidth() - this.$el.outerWidth()}, params)
|
||||
animated = true
|
||||
}
|
||||
}
|
||||
} else {
|
||||
offset = $el.get(0).offsetTop - this.$el.scrollTop()
|
||||
|
||||
if (offset < 0) {
|
||||
this.$el.animate({'scrollTop': $el.get(0).offsetTop}, params)
|
||||
animated = true
|
||||
} else {
|
||||
offset = $el.get(0).offsetTop - (this.$el.scrollTop() + this.$el.outerHeight())
|
||||
if (offset > 0) {
|
||||
this.$el.animate({'scrollTop': $el.get(0).offsetTop + $el.outerHeight() - this.$el.outerHeight()}, params)
|
||||
animated = true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if (!animated && callback !== undefined)
|
||||
callback()
|
||||
|
||||
return this
|
||||
}
|
||||
|
||||
// SCROLLBAR PLUGIN DEFINITION
|
||||
// ============================
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,254 @@
|
|||
/*
|
||||
* Side navigation tree
|
||||
*
|
||||
* Data attributes:
|
||||
* - data-control="sidenav-tree" - enables the plugin
|
||||
* - data-tree-name - unique name of the tree control. The name is used for storing user configuration in the browser cookies.
|
||||
*
|
||||
* JavaScript API:
|
||||
* $('#tree').sidenavTree()
|
||||
*
|
||||
* Dependences:
|
||||
* - Null
|
||||
*/
|
||||
|
||||
+function ($) { "use strict";
|
||||
|
||||
// SIDENAVTREE CLASS DEFINITION
|
||||
// ============================
|
||||
|
||||
var SidenavTree = function(element, options) {
|
||||
this.options = options
|
||||
this.$el = $(element)
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
SidenavTree.DEFAULTS = {
|
||||
treeName: 'sidenav_tree'
|
||||
}
|
||||
|
||||
SidenavTree.prototype.init = function (){
|
||||
var self = this
|
||||
|
||||
this.statusCookieName = this.options.treeName + 'groupStatus'
|
||||
this.searchCookieName = this.options.treeName + 'search'
|
||||
this.$searchInput = $(this.options.searchInput)
|
||||
|
||||
this.$el.on('click', 'li > div.group', function() {
|
||||
self.toggleGroup($(this).closest('li'))
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
this.$searchInput.on('keyup', function(){
|
||||
self.handleSearchChange()
|
||||
})
|
||||
|
||||
var searchTerm = $.cookie(this.searchCookieName)
|
||||
if (searchTerm !== undefined && searchTerm.length > 0) {
|
||||
this.$searchInput.val(searchTerm)
|
||||
this.applySearch()
|
||||
}
|
||||
|
||||
var scrollbar = $('[data-control=scrollbar]', this.$el).data('oc.scrollbar'),
|
||||
active = $('li.active', this.$el)
|
||||
|
||||
if (active.length > 0)
|
||||
scrollbar.gotoElement(active)
|
||||
}
|
||||
|
||||
SidenavTree.prototype.toggleGroup = function(group) {
|
||||
var $group = $(group),
|
||||
status = $group.attr('data-status')
|
||||
|
||||
status === undefined || status == 'expanded' ?
|
||||
this.collapseGroup($group) :
|
||||
this.expandGroup($group)
|
||||
}
|
||||
|
||||
SidenavTree.prototype.collapseGroup = function(group) {
|
||||
var
|
||||
$list = $('> ul', group),
|
||||
self = this;
|
||||
|
||||
$list.css('overflow', 'hidden')
|
||||
$list.animate({'height': 0}, { duration: 100, queue: false, complete: function() {
|
||||
$list.css({
|
||||
'overflow': 'visible',
|
||||
'display': 'none'
|
||||
})
|
||||
$(group).attr('data-status', 'collapsed')
|
||||
$(window).trigger('oc.updateUi')
|
||||
self.saveGroupStatus($(group).data('group-code'), true)
|
||||
} })
|
||||
}
|
||||
|
||||
SidenavTree.prototype.expandGroup = function(group, duration) {
|
||||
var
|
||||
$list = $('> ul', group),
|
||||
self = this
|
||||
|
||||
duration = duration === undefined ? 100 : duration
|
||||
|
||||
$list.css({
|
||||
'overflow': 'hidden',
|
||||
'display': 'block',
|
||||
'height': 0
|
||||
})
|
||||
$list.animate({'height': $list[0].scrollHeight}, { duration: duration, queue: false, complete: function() {
|
||||
$list.css({
|
||||
'overflow': 'visible',
|
||||
'height': 'auto'
|
||||
})
|
||||
$(group).attr('data-status', 'expanded')
|
||||
$(window).trigger('oc.updateUi')
|
||||
self.saveGroupStatus($(group).data('group-code'), false)
|
||||
} })
|
||||
}
|
||||
|
||||
SidenavTree.prototype.saveGroupStatus = function(groupCode, collapsed) {
|
||||
var collapsedGroups = $.cookie(this.statusCookieName),
|
||||
updatedGroups = []
|
||||
|
||||
if (collapsedGroups === undefined)
|
||||
collapsedGroups = ''
|
||||
|
||||
collapsedGroups = collapsedGroups.split('|')
|
||||
$.each(collapsedGroups, function() {
|
||||
if (groupCode != this)
|
||||
updatedGroups.push(this)
|
||||
})
|
||||
|
||||
if (collapsed)
|
||||
updatedGroups.push(groupCode)
|
||||
|
||||
$.cookie(this.statusCookieName, updatedGroups.join('|'), { expires: 30, path: '/' })
|
||||
}
|
||||
|
||||
SidenavTree.prototype.handleSearchChange = function() {
|
||||
var lastValue = this.$searchInput.data('oc.lastvalue');
|
||||
|
||||
if (lastValue !== undefined && lastValue == this.$searchInput.val())
|
||||
return
|
||||
|
||||
this.$searchInput.data('oc.lastvalue', this.$searchInput.val())
|
||||
|
||||
if (this.dataTrackInputTimer !== undefined)
|
||||
window.clearTimeout(this.dataTrackInputTimer);
|
||||
|
||||
var self = this
|
||||
this.dataTrackInputTimer = window.setTimeout(function(){
|
||||
self.applySearch()
|
||||
}, 300);
|
||||
|
||||
$.cookie(this.searchCookieName, $.trim(this.$searchInput.val()), { expires: 30, path: '/' })
|
||||
}
|
||||
|
||||
SidenavTree.prototype.applySearch = function() {
|
||||
var query = $.trim(this.$searchInput.val()),
|
||||
words = query.toLowerCase().split(' '),
|
||||
visibleGroups = [],
|
||||
visibleItems = [],
|
||||
self = this
|
||||
|
||||
if (query.length == 0) {
|
||||
$('li', this.$el).removeClass('hidden')
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
// Find visible groups and items
|
||||
//
|
||||
$('ul.top-level > li', this.$el).each(function() {
|
||||
var $li = $(this)
|
||||
|
||||
if (self.textContainsWords($('div.group h3', $li).text(), words)) {
|
||||
visibleGroups.push($li.get(0))
|
||||
|
||||
$('ul li', $li).each(function(){
|
||||
visibleItems.push(this)
|
||||
})
|
||||
} else {
|
||||
$('ul li', $li).each(function(){
|
||||
if (self.textContainsWords($(this).text(), words) || self.textContainsWords($(this).data('keywords'), words)) {
|
||||
visibleGroups.push($li.get(0))
|
||||
visibleItems.push(this)
|
||||
}
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
// Hide invisible groups and items
|
||||
//
|
||||
$('ul.top-level > li', this.$el).each(function() {
|
||||
var $li = $(this),
|
||||
groupIsVisible = $.inArray(this, visibleGroups) !== -1
|
||||
|
||||
$li.toggleClass('hidden', !groupIsVisible)
|
||||
if (groupIsVisible)
|
||||
self.expandGroup($li, 0)
|
||||
|
||||
$('ul li', $li).each(function(){
|
||||
var $itemLi = $(this)
|
||||
|
||||
$itemLi.toggleClass('hidden', $.inArray(this, visibleItems) == -1)
|
||||
})
|
||||
})
|
||||
|
||||
return false
|
||||
}
|
||||
|
||||
SidenavTree.prototype.textContainsWords = function(text, words) {
|
||||
text = text.toLowerCase()
|
||||
|
||||
for (var i = 0; i < words.length; i++) {
|
||||
if (text.indexOf(words[i]) === -1)
|
||||
return false
|
||||
}
|
||||
|
||||
return true
|
||||
}
|
||||
|
||||
// SIDENAVTREE PLUGIN DEFINITION
|
||||
// ============================
|
||||
|
||||
var old = $.fn.sidenavTree
|
||||
|
||||
$.fn.sidenavTree = function (option) {
|
||||
var args = arguments;
|
||||
|
||||
return this.each(function () {
|
||||
var $this = $(this)
|
||||
var data = $this.data('oc.sidenavTree')
|
||||
var options = $.extend({}, SidenavTree.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
||||
|
||||
if (!data) $this.data('oc.sidenavTree', (data = new SidenavTree(this, options)))
|
||||
if (typeof option == 'string') {
|
||||
var methodArgs = [];
|
||||
for (var i=1; i<args.length; i++)
|
||||
methodArgs.push(args[i])
|
||||
|
||||
data[option].apply(data, methodArgs)
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
$.fn.sidenavTree.Constructor = SidenavTree
|
||||
|
||||
// SIDENAVREE NO CONFLICT
|
||||
// =================
|
||||
|
||||
$.fn.sidenavTree.noConflict = function () {
|
||||
$.fn.sidenavTree = old
|
||||
return this
|
||||
}
|
||||
|
||||
// SIDENAVTREE DATA-API
|
||||
// ===============
|
||||
|
||||
$(document).ready(function () {
|
||||
$('[data-control=sidenav-tree]').sidenavTree()
|
||||
})
|
||||
|
||||
}(window.jQuery);
|
||||
|
|
@ -0,0 +1,117 @@
|
|||
/*!
|
||||
* jQuery Cookie Plugin v1.4.1
|
||||
* https://github.com/carhartl/jquery-cookie
|
||||
*
|
||||
* Copyright 2006, 2014 Klaus Hartl
|
||||
* Released under the MIT license
|
||||
*/
|
||||
(function (factory) {
|
||||
if (typeof define === 'function' && define.amd) {
|
||||
// AMD
|
||||
define(['jquery'], factory);
|
||||
} else if (typeof exports === 'object') {
|
||||
// CommonJS
|
||||
factory(require('jquery'));
|
||||
} else {
|
||||
// Browser globals
|
||||
factory(jQuery);
|
||||
}
|
||||
}(function ($) {
|
||||
|
||||
var pluses = /\+/g;
|
||||
|
||||
function encode(s) {
|
||||
return config.raw ? s : encodeURIComponent(s);
|
||||
}
|
||||
|
||||
function decode(s) {
|
||||
return config.raw ? s : decodeURIComponent(s);
|
||||
}
|
||||
|
||||
function stringifyCookieValue(value) {
|
||||
return encode(config.json ? JSON.stringify(value) : String(value));
|
||||
}
|
||||
|
||||
function parseCookieValue(s) {
|
||||
if (s.indexOf('"') === 0) {
|
||||
// This is a quoted cookie as according to RFC2068, unescape...
|
||||
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
|
||||
}
|
||||
|
||||
try {
|
||||
// Replace server-side written pluses with spaces.
|
||||
// If we can't decode the cookie, ignore it, it's unusable.
|
||||
// If we can't parse the cookie, ignore it, it's unusable.
|
||||
s = decodeURIComponent(s.replace(pluses, ' '));
|
||||
return config.json ? JSON.parse(s) : s;
|
||||
} catch(e) {}
|
||||
}
|
||||
|
||||
function read(s, converter) {
|
||||
var value = config.raw ? s : parseCookieValue(s);
|
||||
return $.isFunction(converter) ? converter(value) : value;
|
||||
}
|
||||
|
||||
var config = $.cookie = function (key, value, options) {
|
||||
|
||||
// Write
|
||||
|
||||
if (arguments.length > 1 && !$.isFunction(value)) {
|
||||
options = $.extend({}, config.defaults, options);
|
||||
|
||||
if (typeof options.expires === 'number') {
|
||||
var days = options.expires, t = options.expires = new Date();
|
||||
t.setTime(+t + days * 864e+5);
|
||||
}
|
||||
|
||||
return (document.cookie = [
|
||||
encode(key), '=', stringifyCookieValue(value),
|
||||
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
|
||||
options.path ? '; path=' + options.path : '',
|
||||
options.domain ? '; domain=' + options.domain : '',
|
||||
options.secure ? '; secure' : ''
|
||||
].join(''));
|
||||
}
|
||||
|
||||
// Read
|
||||
|
||||
var result = key ? undefined : {};
|
||||
|
||||
// To prevent the for loop in the first place assign an empty array
|
||||
// in case there are no cookies at all. Also prevents odd result when
|
||||
// calling $.cookie().
|
||||
var cookies = document.cookie ? document.cookie.split('; ') : [];
|
||||
|
||||
for (var i = 0, l = cookies.length; i < l; i++) {
|
||||
var parts = cookies[i].split('=');
|
||||
var name = decode(parts.shift());
|
||||
var cookie = parts.join('=');
|
||||
|
||||
if (key && key === name) {
|
||||
// If second argument (value) is a function it's a converter...
|
||||
result = read(cookie, value);
|
||||
break;
|
||||
}
|
||||
|
||||
// Prevent storing a cookie that we couldn't decode.
|
||||
if (!key && (cookie = read(cookie)) !== undefined) {
|
||||
result[name] = cookie;
|
||||
}
|
||||
}
|
||||
|
||||
return result;
|
||||
};
|
||||
|
||||
config.defaults = {};
|
||||
|
||||
$.removeCookie = function (key, options) {
|
||||
if ($.cookie(key) === undefined) {
|
||||
return false;
|
||||
}
|
||||
|
||||
// Must not alter options, thus extending a fresh object...
|
||||
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
|
||||
return !$.cookie(key);
|
||||
};
|
||||
|
||||
}));
|
||||
|
|
@ -7,6 +7,7 @@
|
|||
border: none;
|
||||
text-align: left;
|
||||
outline: none!important;
|
||||
padding: 9px 18px;
|
||||
|
||||
&[class^="oc-icon-"],
|
||||
&[class*=" oc-icon-"] {
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ label {
|
|||
.form-control {
|
||||
.transition(none);
|
||||
.box-shadow(none);
|
||||
.border-radius(3px);
|
||||
&:focus {
|
||||
.box-shadow(none);
|
||||
}
|
||||
|
|
@ -361,18 +362,19 @@ label {
|
|||
|
||||
.switch-field {
|
||||
.field-switch {
|
||||
padding-left: 105px;
|
||||
padding-left: 75px;
|
||||
float: left;
|
||||
}
|
||||
}
|
||||
|
||||
.custom-switch {
|
||||
display: block;
|
||||
width: 90px;
|
||||
height: 25px;
|
||||
width: 58px;
|
||||
height: 26px;
|
||||
position: relative;
|
||||
text-transform: uppercase;
|
||||
border: 1px solid @color-custom-input-border;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
.border-radius(3px);
|
||||
|
||||
* { .box-sizing(border-box); }
|
||||
|
|
@ -381,12 +383,12 @@ label {
|
|||
z-index: 4;
|
||||
display: block;
|
||||
position: absolute;
|
||||
right: 50%;
|
||||
top: 0;
|
||||
width: 50%;
|
||||
height: 100%;
|
||||
right: 34px;
|
||||
top: 2px;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
background-color: @color-switch-input-bg;
|
||||
.border-radius(3px);
|
||||
.border-radius(20px);
|
||||
.transition(all 0.1s);
|
||||
}
|
||||
|
||||
|
|
@ -408,11 +410,19 @@ label {
|
|||
position: absolute;
|
||||
.opacity(0);
|
||||
&:checked {
|
||||
~ .slide-button { right: 0%; }
|
||||
~ .slide-button {
|
||||
right: 2px;
|
||||
}
|
||||
~ span { background-color: @color-switch-input-on; }
|
||||
~ span span {
|
||||
&:first-of-type { color: #FFFFFF; }
|
||||
&:last-of-type { color: #666666; }
|
||||
&:first-of-type {
|
||||
color: #FFFFFF;
|
||||
display: block;
|
||||
}
|
||||
&:last-of-type {
|
||||
color: #666666;
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -424,19 +434,28 @@ label {
|
|||
left: 0;
|
||||
width: 100%;
|
||||
background-color: @color-switch-input-off;
|
||||
font-size: 11px;
|
||||
.user-select(none);
|
||||
.border-radius(3px);
|
||||
.border-radius(20px);
|
||||
|
||||
span {
|
||||
z-index: 5;
|
||||
display: block;
|
||||
width: 50%;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
top: 1px;
|
||||
left: 0;
|
||||
text-align: center;
|
||||
&:last-child { left: 50%; color: #FFFFFF; }
|
||||
&:first-of-type { color: #666666; }
|
||||
.box-sizing(border-box);
|
||||
&:last-child {
|
||||
left: 50%;
|
||||
color: #FFFFFF;
|
||||
display: block;
|
||||
}
|
||||
&:first-of-type {
|
||||
padding-left: 9px;
|
||||
display: none;
|
||||
color: #666666;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,127 @@
|
|||
.sidenav-tree {
|
||||
width: 280px;
|
||||
background: @color-sidebarnav-bg;
|
||||
|
||||
.control-toolbar {
|
||||
padding: 20px 0 20px 20px;
|
||||
|
||||
input.form-control {
|
||||
border: none;
|
||||
}
|
||||
}
|
||||
|
||||
ul {
|
||||
padding: 0;
|
||||
margin: 0;
|
||||
list-style: none;
|
||||
}
|
||||
|
||||
div.scrollbar-thumb {
|
||||
background: #2b3e50!important;
|
||||
}
|
||||
|
||||
ul.top-level > li {
|
||||
&[data-status=collapsed] {
|
||||
> div.group h3:before {
|
||||
.transform( ~'rotate(0deg) translate(3px, 0)' );
|
||||
}
|
||||
|
||||
ul {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
> div.group {
|
||||
h3 {
|
||||
background: @color-sidebarnav-tree-group-bg;
|
||||
color: @color-sidebarnav-tree-group;
|
||||
text-transform: uppercase;
|
||||
font-size: 14px;
|
||||
padding: 15px 15px 15px 33px;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
cursor: pointer;
|
||||
|
||||
&:before {
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
display: block;
|
||||
position: absolute;
|
||||
top: 1px;
|
||||
}
|
||||
|
||||
&:before {
|
||||
left: 13px;
|
||||
top: 15px;
|
||||
color: @color-list-arrow;
|
||||
.icon(@caret-right);
|
||||
.transform( ~'rotate(90deg) translate(5px, 0)' );
|
||||
.transition(all 0.1s ease);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
> ul {
|
||||
li {
|
||||
a {
|
||||
display: block;
|
||||
position: relative;
|
||||
padding: 15px 15px 15px 40px;
|
||||
color: @color-sidebarnav-tree-inactive-text;
|
||||
background: @color-sidebarnav-tree-inactive-bg;
|
||||
margin-bottom: 1px;
|
||||
text-decoration: none!important;
|
||||
|
||||
&:hover {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
i {
|
||||
position: absolute;
|
||||
left: 15px;
|
||||
top: 17px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
span {
|
||||
display: block;
|
||||
line-height: 150%;
|
||||
|
||||
&.header {
|
||||
font-size: 14px;
|
||||
margin-bottom: 5px;
|
||||
}
|
||||
|
||||
&.description {
|
||||
font-size: 12px;
|
||||
font-weight: 100;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&.active a {
|
||||
background: @color-sidebarnav-tree-active-bg;
|
||||
color: @color-sidebarnav-tree-active-text;
|
||||
|
||||
&:before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
width: 4px;
|
||||
background: @color-sidebarnav-tree-active-marker;
|
||||
left: 0;
|
||||
top: 0;
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child a {
|
||||
margin-bottom: 0;
|
||||
}
|
||||
|
||||
&:hover a {
|
||||
background-color: @color-sidebarnav-tree-active-bg;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -171,10 +171,12 @@
|
|||
|
||||
> ul.nav-tabs, > div > ul.nav-tabs, > div > div > ul.nav-tabs {
|
||||
position: relative;
|
||||
margin-left: -20px;
|
||||
margin-right: -20px;
|
||||
|
||||
&:before {
|
||||
position: absolute;
|
||||
top: 19px;
|
||||
top: 26px;
|
||||
height: 1px;
|
||||
width: 100%;
|
||||
content: ' ';
|
||||
|
|
@ -185,14 +187,52 @@
|
|||
padding-right: 10px;
|
||||
padding-left: 11px;
|
||||
margin-right: 0;
|
||||
margin-left: -30px;
|
||||
background: transparent;
|
||||
|
||||
&:first-child {
|
||||
margin-left: 0;
|
||||
padding-left: 15px!important;
|
||||
}
|
||||
|
||||
a {
|
||||
font-size: 12px;
|
||||
padding-bottom: 3px;
|
||||
padding: 0 16px;
|
||||
margin: 0;
|
||||
position: relative;
|
||||
z-index: 101;
|
||||
background: transparent;
|
||||
overflow: visible;
|
||||
|
||||
> span.title {
|
||||
position: relative;
|
||||
display: inline-block;
|
||||
padding: 5px 5px 9px 5px;
|
||||
.box-sizing(border-box);
|
||||
border-top: 1px solid #f0f0f0;
|
||||
z-index: 100;
|
||||
|
||||
&:before, &:after {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
background: transparent url(../images/primary-tab-shape.png) no-repeat left -31px;
|
||||
width: 16px;
|
||||
height: 26px;
|
||||
display: block;
|
||||
top: -1px;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
&:before {
|
||||
left: -16px;
|
||||
}
|
||||
|
||||
&:after {
|
||||
right: -16px;
|
||||
background-position: -61px -31px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
&:last-child {
|
||||
|
|
@ -205,14 +245,32 @@
|
|||
padding-left: 0;
|
||||
}
|
||||
|
||||
&.active a {
|
||||
&:before {
|
||||
content: ' ';
|
||||
position: absolute;
|
||||
width: 100%;
|
||||
left: 0;
|
||||
top: 19px;
|
||||
border-bottom: 1px solid @color-tab-active-marker;
|
||||
&.active a:before {
|
||||
position: absolute;
|
||||
top: 26px;
|
||||
height: 1px;
|
||||
right: 2px;
|
||||
left: 0;
|
||||
content: ' ';
|
||||
background-color: @color-body-bg;
|
||||
}
|
||||
|
||||
&.active a{
|
||||
z-index: 107;
|
||||
|
||||
> span.title {
|
||||
z-index: 105;
|
||||
border-top-color: #d6d6d6;
|
||||
|
||||
&:before {
|
||||
background-position: left 0;
|
||||
z-index: 107;
|
||||
}
|
||||
|
||||
&:after {
|
||||
background-position: -61px 0;
|
||||
z-index: 107;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -76,6 +76,14 @@
|
|||
@color-sidebarnav-counter-bg: #d9350f;
|
||||
@color-sidebarnav-counter-text: #ffffff;
|
||||
|
||||
@color-sidebarnav-tree-group: #ecf0f1;
|
||||
@color-sidebarnav-tree-group-bg: #2b3e50;
|
||||
@color-sidebarnav-tree-inactive-text: #808b93;
|
||||
@color-sidebarnav-tree-inactive-bg: #3d5265;
|
||||
@color-sidebarnav-tree-active-bg: #34495e;
|
||||
@color-sidebarnav-tree-active-text: #ecf0f1;
|
||||
@color-sidebarnav-tree-active-marker: #e6802b;
|
||||
|
||||
@color-list-active: #dddddd;
|
||||
@color-list-hover: #dddddd;
|
||||
@color-list-active-border: #e67e22;
|
||||
|
|
|
|||
|
|
@ -42,3 +42,4 @@
|
|||
@import "controls/reportwidgets.less";
|
||||
@import "controls/treelist.less";
|
||||
@import "controls/callout.less";
|
||||
@import "controls/sidenav-tree.less";
|
||||
|
|
|
|||
|
|
@ -24,6 +24,8 @@ class NavigationManager
|
|||
*/
|
||||
private $items;
|
||||
|
||||
private $contextSidenavPartials = [];
|
||||
|
||||
private $contextOwner;
|
||||
private $contextMainMenuItemCode;
|
||||
private $contextSideMenuItemCode;
|
||||
|
|
@ -295,9 +297,9 @@ class NavigationManager
|
|||
/**
|
||||
* Sets the navigation context.
|
||||
* The function sets the navigation owner, main menu item code and the side menu item code.
|
||||
* @param string @owner Specifies the navigation owner in the format Vendor/Module
|
||||
* @param string @mainMenuItemCode Specifies the main menu item code
|
||||
* @param string @sideMenuItemCode Specifies the side menu item code
|
||||
* @param string $owner Specifies the navigation owner in the format Vendor/Module
|
||||
* @param string $mainMenuItemCode Specifies the main menu item code
|
||||
* @param string $sideMenuItemCode Specifies the side menu item code
|
||||
*/
|
||||
public function setContext($owner, $mainMenuItemCode, $sideMenuItemCode = null)
|
||||
{
|
||||
|
|
@ -309,7 +311,7 @@ class NavigationManager
|
|||
/**
|
||||
* Sets the navigation context.
|
||||
* The function sets the navigation owner.
|
||||
* @param string @owner Specifies the navigation owner in the format Vendor/Module
|
||||
* @param string $owner Specifies the navigation owner in the format Vendor/Module
|
||||
*/
|
||||
public function setContextOwner($owner)
|
||||
{
|
||||
|
|
@ -318,7 +320,7 @@ class NavigationManager
|
|||
|
||||
/**
|
||||
* Specifies a code of the main menu item in the current navigation context.
|
||||
* @param string @mainMenuItemCode Specifies the main menu item code
|
||||
* @param string $mainMenuItemCode Specifies the main menu item code
|
||||
*/
|
||||
public function setContextMainMenu($mainMenuItemCode)
|
||||
{
|
||||
|
|
@ -330,18 +332,20 @@ class NavigationManager
|
|||
* @return mixed Returns an object with the following fields:
|
||||
* - mainMenuCode
|
||||
* - sideMenuCode
|
||||
* - owner
|
||||
*/
|
||||
public function getContext()
|
||||
{
|
||||
return (object)[
|
||||
'mainMenuCode' => $this->contextMainMenuItemCode,
|
||||
'sideMenuCode' => $this->contextSideMenuItemCode
|
||||
'sideMenuCode' => $this->contextSideMenuItemCode,
|
||||
'owner' => $this->contextOwner
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Specifies a code of the side menu item in the current navigation context.
|
||||
* @param string @sideMenuItemCode Specifies the side menu item code
|
||||
* @param string $sideMenuItemCode Specifies the side menu item code
|
||||
*/
|
||||
public function setContextSideMenu($sideMenuItemCode)
|
||||
{
|
||||
|
|
@ -350,7 +354,7 @@ class NavigationManager
|
|||
|
||||
/**
|
||||
* Determines if a main menu item is active.
|
||||
* @param mixed @item Specifies the item object.
|
||||
* @param mixed $item Specifies the item object.
|
||||
* @return boolean Returns true if the menu item is active.
|
||||
*/
|
||||
public function isMainMenuItemActive($item)
|
||||
|
|
@ -360,7 +364,7 @@ class NavigationManager
|
|||
|
||||
/**
|
||||
* Determines if a side menu item is active.
|
||||
* @param mixed @item Specifies the item object.
|
||||
* @param mixed $item Specifies the item object.
|
||||
* @return boolean Returns true if the side item is active.
|
||||
*/
|
||||
public function isSideMenuItemActive($item)
|
||||
|
|
@ -368,6 +372,33 @@ class NavigationManager
|
|||
return $this->contextOwner == $item->owner && $this->contextSideMenuItemCode == $item->code;
|
||||
}
|
||||
|
||||
/**
|
||||
* Registers a special side navigation partial for a specific main menu.
|
||||
* The sidenav partial replaces the standard side navigation.
|
||||
* @param string $owner Specifies the navigation owner in the format Vendor/Module.
|
||||
* @param string $mainMenuItemCode Specifies the main menu item code.
|
||||
* @param string $partial Specifies the partial name.
|
||||
*/
|
||||
public function registerContextSidenavPartial($owner, $mainMenuItemCode, $partial)
|
||||
{
|
||||
$this->contextSidenavPartials[$owner.$mainMenuItemCode] = $partial;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the side navigation partial for a specific main menu previously registered with the registerContextSidenavPartial() method.
|
||||
* @param string $owner Specifies the navigation owner in the format Vendor/Module.
|
||||
* @param string $mainMenuItemCode Specifies the main menu item code.
|
||||
* @return mixed Returns the partial name or null.
|
||||
*/
|
||||
public function getContextSidenavPartial($owner, $mainMenuItemCode)
|
||||
{
|
||||
$key = $owner.$mainMenuItemCode;
|
||||
|
||||
return array_key_exists($key, $this->contextSidenavPartials) ?
|
||||
$this->contextSidenavPartials[$key] :
|
||||
null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Removes menu items from an array if the supplied user lacks permission.
|
||||
* @param User $user A user object
|
||||
|
|
|
|||
|
|
@ -3,6 +3,7 @@
|
|||
use Lang;
|
||||
use BackendMenu;
|
||||
use Backend\Classes\Controller;
|
||||
use System\Classes\SettingsManager;
|
||||
use Backend\Models\EditorPreferences as EditorPreferencesModel;
|
||||
|
||||
/**
|
||||
|
|
@ -34,6 +35,7 @@ class EditorPreferences extends Controller
|
|||
$this->addJs('/modules/backend/assets/js/editorpreferences/editorpreferences.js', 'core');
|
||||
|
||||
BackendMenu::setContext('October.System', 'system', 'mysettings');
|
||||
SettingsManager::setContext('October.Backend', 'editor');
|
||||
}
|
||||
|
||||
public function index()
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ use Redirect;
|
|||
use BackendMenu;
|
||||
use BackendAuth;
|
||||
use Backend\Classes\Controller;
|
||||
use System\Classes\SettingsManager;
|
||||
|
||||
/**
|
||||
* Backend user controller
|
||||
|
|
@ -36,6 +37,7 @@ class Users extends Controller
|
|||
$this->requiredPermissions = null;
|
||||
|
||||
BackendMenu::setContext('October.System', 'system', 'users');
|
||||
SettingsManager::setContext('October.System', 'administrators');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -55,7 +57,8 @@ class Users extends Controller
|
|||
*/
|
||||
public function myaccount()
|
||||
{
|
||||
BackendMenu::setContextSideMenu('mysettings');
|
||||
SettingsManager::setContext('October.Backend', 'myaccount');
|
||||
|
||||
$this->pageTitle = Lang::get('backend::lang.myaccount.menu_label');
|
||||
return $this->update($this->user->id, 'myaccount');
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
<?php Block::put('breadcrumb') ?>
|
||||
<ul>
|
||||
<li><a href="<?= Backend::url('system/settings/mysettings') ?>"><?= e(trans('backend::lang.mysettings.menu_label')) ?></a></li>
|
||||
<li><?= e($this->pageTitle) ?></li>
|
||||
</ul>
|
||||
<?php Block::endPut() ?>
|
||||
|
||||
<?php if (!$this->fatalError): ?>
|
||||
|
||||
<?= Form::open(['class'=>'layout-item stretch layout-column']) ?>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
<?php Block::put('breadcrumb') ?>
|
||||
<ul>
|
||||
<li><a href="<?= Backend::url('system/settings/mysettings') ?>"><?= e(trans('backend::lang.mysettings.menu_label')) ?></a></li>
|
||||
<li><?= e($this->pageTitle) ?></li>
|
||||
</ul>
|
||||
<?php Block::endPut() ?>
|
||||
|
||||
<?php if (!$this->fatalError): ?>
|
||||
|
||||
<?php Block::put('form-contents') ?>
|
||||
|
|
|
|||
|
|
@ -49,6 +49,7 @@ return [
|
|||
'user' => [
|
||||
'name' => 'Administrator',
|
||||
'menu_label' => 'Administrators',
|
||||
'menu_description' => 'Manage back-end administrator users, groups and permissions.',
|
||||
'list_title' => 'Manage Administrators',
|
||||
'new' => 'New Administrator',
|
||||
'login' => "Login",
|
||||
|
|
@ -178,6 +179,7 @@ return [
|
|||
'myaccount' => [
|
||||
'menu_label' => 'My Account',
|
||||
'menu_description' => 'Update your account details such as name, email address and password.',
|
||||
'menu_keywords' => 'security login'
|
||||
],
|
||||
'backend_preferences' => [
|
||||
'menu_label' => 'Backend Preferences',
|
||||
|
|
|
|||
|
|
@ -18,6 +18,8 @@
|
|||
<script src="<?= URL::asset('modules/backend/assets/js/vendor/raphael-min.js') ?>"></script>
|
||||
<script src="<?= URL::asset('modules/backend/assets/js/vendor/jquery.autoellipsis.js') ?>"></script>
|
||||
<script src="<?= URL::asset('modules/backend/assets/js/vendor/jquery.waterfall.js') ?>"></script>
|
||||
<script src="<?= URL::asset('modules/backend/assets/js/vendor/jquery.cookie.js') ?>"></script>
|
||||
|
||||
<script src="<?= URL::asset('modules/backend/assets/vendor/select2/select2.js') ?>"></script>
|
||||
<script src="<?= URL::asset('modules/backend/assets/vendor/mustache/mustache.min.js') ?>"></script>
|
||||
<script src="<?= URL::asset('modules/backend/assets/vendor/fileupload/jquery.fileupload.js') ?>"></script>
|
||||
|
|
@ -69,7 +71,7 @@
|
|||
<script src="<?= URL::asset('modules/backend/assets/js/october.treelist.js') ?>"></script>
|
||||
<script src="<?= URL::asset('modules/backend/assets/js/october.autocomplete.js') ?>"></script>
|
||||
<script src="<?= URL::asset('modules/backend/assets/js/october.callout.js') ?>"></script>
|
||||
|
||||
<script src="<?= URL::asset('modules/backend/assets/js/october.sidenav-tree.js') ?>"></script>
|
||||
|
||||
<script>
|
||||
<!--
|
||||
|
|
|
|||
|
|
@ -1,25 +1,32 @@
|
|||
<?php
|
||||
$sideMenuItems = BackendMenu::listSideMenuItems();
|
||||
$context = BackendMenu::getContext();
|
||||
if ($sideMenuItems):
|
||||
|
||||
$contextSidenav = BackendMenu::getContextSidenavPartial($context->owner, $context->mainMenuCode);
|
||||
|
||||
if (!$contextSidenav):
|
||||
$sideMenuItems = BackendMenu::listSideMenuItems();
|
||||
if ($sideMenuItems):
|
||||
?>
|
||||
<div class="layout-cell width-120" >
|
||||
<div class="layout-relative">
|
||||
<nav class="layout-sidenav" id="layout-sidenav" data-control="sidenav">
|
||||
<ul class="nav">
|
||||
<?php foreach ($sideMenuItems as $sideItemCode=>$item): ?>
|
||||
<li class="<?= BackendMenu::isSideMenuItemActive($item) ? 'active' : null ?>" <?= HTML::attributes($item->attributes) ?>>
|
||||
<a href="<?= $item->url ?>"><i class="<?= $item->icon ?>"></i><?= e(trans($item->label)) ?></a>
|
||||
<span
|
||||
class="counter <?= $item->counter === null ? 'empty' : null ?>"
|
||||
data-menu-id="<?= e($context->mainMenuCode.'/'.$sideItemCode) ?>"
|
||||
>
|
||||
<?= e($item->counter) ?>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</nav>
|
||||
<div class="layout-cell width-120" >
|
||||
<div class="layout-relative">
|
||||
<nav class="layout-sidenav" id="layout-sidenav" data-control="sidenav">
|
||||
<ul class="nav">
|
||||
<?php foreach ($sideMenuItems as $sideItemCode=>$item): ?>
|
||||
<li class="<?= BackendMenu::isSideMenuItemActive($item) ? 'active' : null ?>" <?= HTML::attributes($item->attributes) ?>>
|
||||
<a href="<?= $item->url ?>"><i class="<?= $item->icon ?>"></i><?= e(trans($item->label)) ?></a>
|
||||
<span
|
||||
class="counter <?= $item->counter === null ? 'empty' : null ?>"
|
||||
data-menu-id="<?= e($context->mainMenuCode.'/'.$sideItemCode) ?>"
|
||||
>
|
||||
<?= e($item->counter) ?>
|
||||
</span>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</nav>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
<?php else: ?>
|
||||
<?= $this->makePartial($contextSidenav) ?>
|
||||
<?php endif ?>
|
||||
|
|
@ -5,6 +5,7 @@ use Config;
|
|||
use BackendMenu;
|
||||
use Input;
|
||||
use Backend\Classes\Controller;
|
||||
use System\Classes\SettingsManager;
|
||||
use Cms\Classes\Theme as CmsTheme;
|
||||
|
||||
/**
|
||||
|
|
@ -18,7 +19,7 @@ class Themes extends Controller
|
|||
{
|
||||
public $requiredPermissions = ['cms.manage_themes'];
|
||||
|
||||
public $bodyClass = 'slim-container';
|
||||
public $bodyClass = 'compact-container';
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
|
|
@ -31,6 +32,7 @@ class Themes extends Controller
|
|||
|
||||
$this->pageTitle = Lang::get('cms::lang.theme.settings_menu');
|
||||
BackendMenu::setContext('October.System', 'system', 'settings');
|
||||
SettingsManager::setContext('October.Cms', 'theme');
|
||||
}
|
||||
|
||||
public function index()
|
||||
|
|
|
|||
|
|
@ -1,14 +1,5 @@
|
|||
<?= Block::put('body') ?>
|
||||
<div class="layout">
|
||||
<div class="layout-row min-size">
|
||||
<div class="control-breadcrumb no-bottom-margin">
|
||||
<ul>
|
||||
<li><a href="<?= Backend::url('system/settings') ?>"><?= e(trans('system::lang.settings.menu_label')) ?></a></li>
|
||||
<li><?= e($this->pageTitle) ?></li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="layout-row">
|
||||
<?= Form::open(['onsubmit'=>'return false']) ?>
|
||||
<div class="layout theme-selector-layout" id="theme-list">
|
||||
|
|
@ -16,6 +7,5 @@
|
|||
</div>
|
||||
<?= Form::close() ?>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<?= Block::endPut() ?>
|
||||
|
|
@ -132,29 +132,7 @@ class ServiceProvider extends ModuleServiceProvider
|
|||
'icon' => 'icon-cog',
|
||||
'url' => Backend::url('system/settings'),
|
||||
'permissions' => ['backend.manage_users', 'system.*'],
|
||||
'order' => 1000,
|
||||
|
||||
'sideMenu' => [
|
||||
'settings' => [
|
||||
'label' => 'system::lang.settings.menu_label',
|
||||
'icon' => 'icon-cogs',
|
||||
'url' => Backend::url('system/settings'),
|
||||
'permissions' => ['system.manage_settings']
|
||||
],
|
||||
'users' => [
|
||||
'label' => 'backend::lang.user.menu_label',
|
||||
'icon' => 'icon-users',
|
||||
'url' => Backend::url('backend/users'),
|
||||
'permissions' => ['backend.manage_users']
|
||||
],
|
||||
'updates' => [
|
||||
'label' => 'system::lang.updates.menu_label',
|
||||
'icon' => 'icon-cloud-download',
|
||||
'url' => Backend::url('system/updates'),
|
||||
'permissions' => ['system.manage_updates']
|
||||
]
|
||||
]
|
||||
|
||||
'order' => 1000
|
||||
]
|
||||
]);
|
||||
});
|
||||
|
|
@ -238,8 +216,27 @@ class ServiceProvider extends ModuleServiceProvider
|
|||
'category' => 'System',
|
||||
'icon' => 'icon-envelope-square',
|
||||
'url' => Backend::url('system/mailtemplates'),
|
||||
'order' => 400,
|
||||
'order' => 500,
|
||||
],
|
||||
'administrators' => [
|
||||
'label' => 'backend::lang.user.menu_label',
|
||||
'description' => 'backend::lang.user.menu_description',
|
||||
'category' => 'System',
|
||||
'icon' => 'icon-users',
|
||||
'url' => Backend::url('backend/users'),
|
||||
'permissions' => ['backend.manage_users'],
|
||||
'order' => 600
|
||||
],
|
||||
'updates' => [
|
||||
'label' => 'system::lang.updates.menu_label',
|
||||
'description' => 'system::lang.updates.menu_description',
|
||||
'category' => 'System',
|
||||
'icon' => 'icon-cloud-download',
|
||||
'url' => Backend::url('system/updates'),
|
||||
'permissions' => ['system.manage_updates'],
|
||||
'order' => 700
|
||||
]
|
||||
|
||||
]);
|
||||
});
|
||||
|
||||
|
|
@ -260,6 +257,12 @@ class ServiceProvider extends ModuleServiceProvider
|
|||
App::bindShared('command.cache.clear', function($app) {
|
||||
return new \System\Console\CacheClear($app['cache'], $app['files']);
|
||||
});
|
||||
|
||||
/*
|
||||
* Register the sidebar for the System main menu
|
||||
*/
|
||||
|
||||
BackendMenu::registerContextSidenavPartial('October.System', 'system', '@/modules/system/partials/_system_sidebar.htm');
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -29,6 +29,9 @@ class SettingsManager
|
|||
*/
|
||||
private $allItems;
|
||||
|
||||
private $contextOwner;
|
||||
private $contextItemCode;
|
||||
|
||||
static $itemDefaults = [
|
||||
'code' => null,
|
||||
'label' => null,
|
||||
|
|
@ -38,6 +41,7 @@ class SettingsManager
|
|||
'permissions' => [],
|
||||
'order' => 500,
|
||||
'context' => 'system',
|
||||
'keywords' => null
|
||||
];
|
||||
|
||||
/**
|
||||
|
|
@ -211,6 +215,33 @@ class SettingsManager
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Sets the navigation context.
|
||||
* @param string $owner Specifies the setting items owner plugin or module in the format Vendor/Module.
|
||||
* @param string $code Specifies the settings item code.
|
||||
*/
|
||||
public static function setContext($owner, $code)
|
||||
{
|
||||
$instance = self::instance();
|
||||
|
||||
$instance->contextOwner = strtolower($owner);
|
||||
$instance->contextItemCode = strtolower($code);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns information about the current settings context.
|
||||
* @return mixed Returns an object with the following fields:
|
||||
* - itemCode
|
||||
* - owner
|
||||
*/
|
||||
public function getContext()
|
||||
{
|
||||
return (object)[
|
||||
'itemCode' => $this->contextItemCode,
|
||||
'owner' => $this->contextOwner
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Locates a setting item object by it's owner and code
|
||||
* @param string $owner
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ use Redirect;
|
|||
use BackendMenu;
|
||||
use Backend\Classes\Controller;
|
||||
use System\Classes\ApplicationException;
|
||||
use System\Classes\SettingsManager;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
|
|
@ -34,6 +35,7 @@ class MailLayouts extends Controller
|
|||
parent::__construct();
|
||||
|
||||
BackendMenu::setContext('October.System', 'system', 'settings');
|
||||
SettingsManager::setContext('October.System', 'mail_templates');
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -12,6 +12,7 @@ use BackendAuth;
|
|||
use Backend\Classes\Controller;
|
||||
use System\Models\MailTemplate;
|
||||
use System\Classes\ApplicationException;
|
||||
use System\Classes\SettingsManager;
|
||||
use Exception;
|
||||
|
||||
/**
|
||||
|
|
@ -39,6 +40,7 @@ class MailTemplates extends Controller
|
|||
parent::__construct();
|
||||
|
||||
BackendMenu::setContext('October.System', 'system', 'settings');
|
||||
SettingsManager::setContext('October.System', 'mail_templates');
|
||||
}
|
||||
|
||||
public function index()
|
||||
|
|
@ -47,6 +49,7 @@ class MailTemplates extends Controller
|
|||
|
||||
MailTemplate::syncAll();
|
||||
$this->getClassExtension('Backend.Behaviors.ListController')->index();
|
||||
$this->bodyClass = 'compact-container';
|
||||
}
|
||||
|
||||
public function formBeforeSave($model)
|
||||
|
|
|
|||
|
|
@ -57,6 +57,8 @@ class Settings extends Controller
|
|||
|
||||
public function update($author, $plugin, $code = null)
|
||||
{
|
||||
SettingsManager::setContext($author.'.'.$plugin, $code);
|
||||
|
||||
try {
|
||||
$item = $this->findSettingItem($author, $plugin, $code);
|
||||
$this->pageTitle = $item->label;
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ use System\Models\PluginVersion;
|
|||
use System\Console\CacheClear;
|
||||
use System\Classes\UpdateManager;
|
||||
use System\Classes\PluginManager;
|
||||
use System\Classes\SettingsManager;
|
||||
use System\Classes\ApplicationException;
|
||||
use Exception;
|
||||
|
||||
|
|
@ -44,6 +45,7 @@ class Updates extends Controller
|
|||
$this->addCss('/modules/system/assets/css/updates.css', 'core');
|
||||
|
||||
BackendMenu::setContext('October.System', 'system', 'updates');
|
||||
SettingsManager::setContext('October.System', 'updates');
|
||||
|
||||
$this->disableCoreUpdates = Config::get('cms.disableCoreUpdates', false);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<?php Block::put('breadcrumb') ?>
|
||||
<ul>
|
||||
<li><a href="<?= Backend::url('system/settings') ?>"><?= e(trans('system::lang.settings.menu_label')) ?></a></li>
|
||||
<li><a href="<?= Backend::url('system/mailtemplates') ?>"><?= e(trans('system::lang.mail_templates.menu_layouts_label')) ?></a></li>
|
||||
<li><?= e($this->pageTitle) ?></li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<?php Block::put('breadcrumb') ?>
|
||||
<ul>
|
||||
<li><a href="<?= Backend::url('system/settings') ?>"><?= e(trans('system::lang.settings.menu_label')) ?></a></li>
|
||||
<li><a href="<?= Backend::url('system/mailtemplates') ?>"><?= e(trans('system::lang.mail_templates.menu_layouts_label')) ?></a></li>
|
||||
<li><?= e($this->pageTitle) ?></li>
|
||||
</ul>
|
||||
|
|
@ -11,7 +10,7 @@
|
|||
<div class="scoreboard">
|
||||
<div data-control="toolbar">
|
||||
<div class="scoreboard-item title-value">
|
||||
<h4><?= e(trans('system::lang.mail_templates.template')) ?></h4>
|
||||
<h4><?= e(trans('system::lang.mail_templates.layout')) ?></h4>
|
||||
<p><?= $formModel->code ?></p>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<?php Block::put('breadcrumb') ?>
|
||||
<ul>
|
||||
<li><a href="<?= Backend::url('system/settings') ?>"><?= e(trans('system::lang.settings.menu_label')) ?></a></li>
|
||||
<li><a href="<?= Backend::url('system/mailtemplates') ?>"><?= e(trans('system::lang.mail_templates.menu_label')) ?></a></li>
|
||||
<li><?= e($this->pageTitle) ?></li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,3 @@
|
|||
<?php Block::put('breadcrumb') ?>
|
||||
<ul>
|
||||
<li><a href="<?= Backend::url('system/settings') ?>"><?= e(trans('system::lang.settings.menu_label')) ?></a></li>
|
||||
<li><?= e($this->pageTitle) ?></li>
|
||||
</ul>
|
||||
<?php Block::endPut() ?>
|
||||
|
||||
<div class="control-tabs content-tabs tabs-flush" data-control="tab">
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="active"><a href="#templates"><?= e(trans('system::lang.mail_templates.templates')) ?></a></li>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,5 @@
|
|||
<?php Block::put('breadcrumb') ?>
|
||||
<ul>
|
||||
<li><a href="<?= Backend::url('system/settings') ?>"><?= e(trans('system::lang.settings.menu_label')) ?></a></li>
|
||||
<li><a href="<?= Backend::url('system/mailtemplates') ?>"><?= e(trans('system::lang.mail_templates.menu_label')) ?></a></li>
|
||||
<li><?= e($this->pageTitle) ?></li>
|
||||
</ul>
|
||||
|
|
|
|||
|
|
@ -1,24 +1,7 @@
|
|||
<div class="control-settings">
|
||||
|
||||
<?php foreach ($items as $category => $items): ?>
|
||||
|
||||
<div class="settings-category">
|
||||
<h3><?= $category ?></h3>
|
||||
</div>
|
||||
|
||||
<div class="settings-items row">
|
||||
|
||||
<?php foreach ($items as $item): ?>
|
||||
<div class="settings-item col-xs-12 col-sm-6 col-md-4">
|
||||
<a href="<?= $item->url ?>">
|
||||
<div class="item-icon"><i class="<?= $item->icon ?>"></i></div>
|
||||
<h5><?= e(trans($item->label)) ?></h5>
|
||||
<p><?= e(trans($item->description)) ?></p>
|
||||
</a>
|
||||
</div>
|
||||
<?php endforeach ?>
|
||||
|
||||
</div>
|
||||
|
||||
<?php endforeach ?>
|
||||
</div>
|
||||
<div class="layout">
|
||||
<div class="layout-cell oc-bg-logo">
|
||||
<script>$(document).ready(function(){
|
||||
$('#settings-search-input').focus()
|
||||
})</script>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -1,10 +1,3 @@
|
|||
<?php Block::put('breadcrumb') ?>
|
||||
<ul>
|
||||
<li><a href="<?= $parentLink ?>"><?= e($parentLabel) ?></a></li>
|
||||
<li><?= e($this->pageTitle) ?></li>
|
||||
</ul>
|
||||
<?php Block::endPut() ?>
|
||||
|
||||
<?php if (!$this->fatalError): ?>
|
||||
|
||||
<?= Form::open(['class'=>'layout-item stretch layout-column']) ?>
|
||||
|
|
|
|||
|
|
@ -65,6 +65,7 @@ return [
|
|||
'missing_model' => 'The settings page is missing a Model definition.',
|
||||
'update_success' => 'Settings for :name have been updated successfully.',
|
||||
'return' => 'Return to system settings',
|
||||
'search' => 'Search'
|
||||
],
|
||||
'mail' => [
|
||||
'menu_label' => 'Mail Configuration',
|
||||
|
|
@ -87,7 +88,7 @@ return [
|
|||
],
|
||||
'mail_templates' => [
|
||||
'menu_label' => 'Mail Templates',
|
||||
'menu_description' => 'Modify the mail templates that are sent to users and administrators.',
|
||||
'menu_description' => 'Modify the mail templates that are sent to users and administrators, manage email layouts.',
|
||||
'new_template' => 'New Template',
|
||||
'new_layout' => 'New Layout',
|
||||
'template' => 'Template',
|
||||
|
|
@ -120,6 +121,7 @@ return [
|
|||
'title' => 'Manage Updates',
|
||||
'name' => 'Software update',
|
||||
'menu_label' => 'Updates',
|
||||
'menu_description' => 'Update the system, manage and install plugins and themes.',
|
||||
'check_label' => 'Check for updates',
|
||||
'retry_label' => 'Try again',
|
||||
'plugin_name' => 'Name',
|
||||
|
|
|
|||
|
|
@ -0,0 +1,9 @@
|
|||
<?php
|
||||
$systemItems = System\Classes\SettingsManager::instance()->listItems('system');
|
||||
$mySettingItems = System\Classes\SettingsManager::instance()->listItems('mysettings');
|
||||
|
||||
// + Administrators
|
||||
?>
|
||||
|
||||
<?= $this->makePartial('@/modules/system/partials/_settings_menu_items.htm', ['items'=>$mySettingItems]); ?>
|
||||
<?= $this->makePartial('@/modules/system/partials/_settings_menu_items.htm', ['items'=>$systemItems]); ?>
|
||||
|
|
@ -0,0 +1,33 @@
|
|||
<?php
|
||||
$context = System\Classes\SettingsManager::instance()->getContext();
|
||||
|
||||
$collapsedGroups = explode('|',
|
||||
isset($_COOKIE['sidenav_treegroupStatus']) ? $_COOKIE['sidenav_treegroupStatus'] : null
|
||||
);
|
||||
|
||||
?>
|
||||
<ul class="top-level">
|
||||
<?php foreach ($items as $category => $items):
|
||||
$collapsed = in_array($category, $collapsedGroups);
|
||||
?>
|
||||
<li data-group-code="<?= e($category) ?>" <?= $collapsed ? 'data-status="collapsed"' : null ?>>
|
||||
<div class="group">
|
||||
<h3><?= e($category) ?></h3>
|
||||
</div>
|
||||
|
||||
<ul>
|
||||
<?php foreach ($items as $item): ?>
|
||||
<li class="<?= strtolower($item->owner) == $context->owner && strtolower($item->code) == $context->itemCode ? 'active' : false ?>" data-keywords="<?= e(trans($item->keywords)) ?>">
|
||||
<a href="<?= $item->url ?>">
|
||||
<i class="<?= $item->icon ?>"></i>
|
||||
<span class="header"><?= e(trans($item->label)) ?></span>
|
||||
<span class="description"><?= e(trans($item->description)) ?></span>
|
||||
</a>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
|
||||
</ul>
|
||||
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
|
|
@ -0,0 +1,14 @@
|
|||
<div class="layout control-toolbar">
|
||||
<div class="layout-cell">
|
||||
<div class="relative toolbar-item loading-indicator-container size-input-text">
|
||||
<input placeholder="<?= e(trans('system::lang.settings.search')) ?>" type="text" name="search" value=""
|
||||
class="form-control icon search"
|
||||
id="settings-search-input"
|
||||
autocomplete="off"
|
||||
data-track-input
|
||||
data-load-indicator
|
||||
data-load-indicator-opaque
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<div class="layout-cell sidenav-tree" data-control="sidenav-tree" data-search-input="#settings-search-input">
|
||||
<div class="layout">
|
||||
<div class="layout-row min-size">
|
||||
<?= $this->makePartial('@/modules/system/partials/_settings_menu_toolbar.htm') ?>
|
||||
</div>
|
||||
|
||||
<div class="layout-row">
|
||||
<div class="layout-cell">
|
||||
<div class="layout-relative">
|
||||
|
||||
<div class="layout-absolute">
|
||||
<div class="control-scrollbar" data-control="scrollbar">
|
||||
<?= $this->makePartial('@/modules/system/partials/_settings_menu.htm') ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
Loading…
Reference in New Issue