diff --git a/modules/backend/assets/css/october.css b/modules/backend/assets/css/october.css index 384bc9437..bc59da87b 100644 --- a/modules/backend/assets/css/october.css +++ b/modules/backend/assets/css/october.css @@ -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, diff --git a/modules/backend/assets/images/primary-tab-shape.png b/modules/backend/assets/images/primary-tab-shape.png new file mode 100644 index 000000000..8cec7349e Binary files /dev/null and b/modules/backend/assets/images/primary-tab-shape.png differ diff --git a/modules/backend/assets/js/october.scrollbar.js b/modules/backend/assets/js/october.scrollbar.js index 8b620bb13..c4c47f9c6 100644 --- a/modules/backend/assets/js/october.scrollbar.js +++ b/modules/backend/assets/js/october.scrollbar.js @@ -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 // ============================ diff --git a/modules/backend/assets/js/october.sidenav-tree.js b/modules/backend/assets/js/october.sidenav-tree.js index 55d8ef192..cb4e20db8 100644 --- a/modules/backend/assets/js/october.sidenav-tree.js +++ b/modules/backend/assets/js/october.sidenav-tree.js @@ -50,6 +50,12 @@ 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) { diff --git a/modules/backend/assets/less/controls/button.less b/modules/backend/assets/less/controls/button.less index c9c3028dd..344235418 100644 --- a/modules/backend/assets/less/controls/button.less +++ b/modules/backend/assets/less/controls/button.less @@ -7,6 +7,7 @@ border: none; text-align: left; outline: none!important; + padding: 9px 18px; &[class^="oc-icon-"], &[class*=" oc-icon-"] { diff --git a/modules/backend/assets/less/controls/forms.less b/modules/backend/assets/less/controls/forms.less index 4afe2ac04..262cf7516 100644 --- a/modules/backend/assets/less/controls/forms.less +++ b/modules/backend/assets/less/controls/forms.less @@ -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; + } } } } diff --git a/modules/backend/assets/less/controls/tab.less b/modules/backend/assets/less/controls/tab.less index 5dee7990f..679fe12bf 100644 --- a/modules/backend/assets/less/controls/tab.less +++ b/modules/backend/assets/less/controls/tab.less @@ -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; + } } } } diff --git a/modules/backend/controllers/Users.php b/modules/backend/controllers/Users.php index d00a5bb43..36a067a53 100644 --- a/modules/backend/controllers/Users.php +++ b/modules/backend/controllers/Users.php @@ -37,6 +37,7 @@ class Users extends Controller $this->requiredPermissions = null; BackendMenu::setContext('October.System', 'system', 'users'); + SettingsManager::setContext('October.System', 'administrators'); } /** diff --git a/modules/system/controllers/MailLayouts.php b/modules/system/controllers/MailLayouts.php index 482e5bd66..572f0f43d 100644 --- a/modules/system/controllers/MailLayouts.php +++ b/modules/system/controllers/MailLayouts.php @@ -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'); } } \ No newline at end of file diff --git a/modules/system/controllers/MailTemplates.php b/modules/system/controllers/MailTemplates.php index 88d61d2f4..290d8a124 100644 --- a/modules/system/controllers/MailTemplates.php +++ b/modules/system/controllers/MailTemplates.php @@ -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) diff --git a/modules/system/controllers/Updates.php b/modules/system/controllers/Updates.php index 366e6b86d..e6a4a783d 100644 --- a/modules/system/controllers/Updates.php +++ b/modules/system/controllers/Updates.php @@ -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); } diff --git a/modules/system/controllers/maillayouts/create.htm b/modules/system/controllers/maillayouts/create.htm index 12bc73f4a..f80a520ca 100644 --- a/modules/system/controllers/maillayouts/create.htm +++ b/modules/system/controllers/maillayouts/create.htm @@ -1,6 +1,5 @@
= $formModel->code ?>