diff options
author | Morris Jobke <hey@morrisjobke.de> | 2017-11-13 12:19:05 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-11-13 12:19:05 +0100 |
commit | ff2d4432d8af7f8d1d17d9740f985bb36db531fc (patch) | |
tree | 3bae3c8530c0e1cf9bce78e2b1d02966660e6be4 /core | |
parent | 26bcf40e9e0b35b851ff1aecab8dd9fd2b1be80e (diff) | |
parent | 8c2dbeb13a71ca320f6953302f75ce491c4f1aff (diff) | |
download | nextcloud-server-ff2d4432d8af7f8d1d17d9740f985bb36db531fc.tar.gz nextcloud-server-ff2d4432d8af7f8d1d17d9740f985bb36db531fc.zip |
Merge pull request #7051 from nextcloud/breadcrumbs-refactor
Breadcrumbs refactor
Diffstat (limited to 'core')
-rw-r--r-- | core/css/apps.scss | 1 | ||||
-rw-r--r-- | core/css/header.scss | 51 | ||||
-rw-r--r-- | core/css/mobile.scss | 9 | ||||
-rw-r--r-- | core/css/styles.scss | 97 | ||||
-rw-r--r-- | core/img/places/home.svg | 2 | ||||
-rw-r--r-- | core/js/js.js | 33 | ||||
-rw-r--r-- | core/js/oc-dialogs.js | 2 |
7 files changed, 99 insertions, 96 deletions
diff --git a/core/css/apps.scss b/core/css/apps.scss index 5493375b5ae..8f49df7fdaf 100644 --- a/core/css/apps.scss +++ b/core/css/apps.scss @@ -822,6 +822,7 @@ kbd { } li { display: flex; + flex: 0 0 auto; > button, > a, > .menuitem { diff --git a/core/css/header.scss b/core/css/header.scss index 952389882c3..1844022e8a3 100644 --- a/core/css/header.scss +++ b/core/css/header.scss @@ -22,30 +22,6 @@ -ms-user-select: none; } -/* Header menu */ -.menu { - position: absolute; - top: 45px; - background-color: $color-main-background; - box-shadow: 0 1px 10px $color-box-shadow; - border-radius: 0 0 3px 3px; - display: none; - box-sizing: border-box; - z-index: 2000; - - /* Dropdown arrow */ - &:after { - border: 10px solid transparent; - border-bottom-color: $color-main-background; - bottom: 100%; - content: ' '; - height: 0; - width: 0; - position: absolute; - pointer-events: none; - } -} - /* removed until content-focusing issue is fixed */ #skip-to-content a { position: absolute; @@ -96,6 +72,29 @@ } #header { + /* Header menu */ + .menu { + top: 45px; + background-color: $color-main-background; + filter: drop-shadow(0 1px 3px $color-box-shadow); + border-radius: 0 0 3px 3px; + display: none; + box-sizing: border-box; + z-index: 2000; + position: absolute; + + /* Dropdown arrow */ + &:after { + border: 10px solid transparent; + border-bottom-color: $color-main-background; + bottom: 100%; + content: ' '; + height: 0; + width: 0; + position: absolute; + pointer-events: none; + } + } .logo { display: inline-flex; background-image: url($image-logo); @@ -204,14 +203,14 @@ nav { margin-left: -54px; } -#navigation, +.header-left #navigation, .ui-datepicker, .ui-timepicker.ui-widget { position: relative; left: -100%; width: 160px; background-color: $color-main-background; - box-shadow: 0 1px 10px $color-box-shadow; + filter: drop-shadow(0 1px 3px $color-box-shadow); &:after { /* position of dropdown arrow */ left: 47%; diff --git a/core/css/mobile.scss b/core/css/mobile.scss index aad3070e79a..19518479987 100644 --- a/core/css/mobile.scss +++ b/core/css/mobile.scss @@ -81,16 +81,11 @@ opacity: 1; } - -/* controls bar for mobile */ -#controls { - min-width: initial !important; - left: 0 !important; - padding-left: 0; -} /* position controls for apps with app-navigation */ #app-navigation+#app-content #controls { + left: 0 !important; padding-left: 44px; + width: 100%; } /* .viewer-mode is when text editor, PDF viewer, etc is open */ diff --git a/core/css/styles.scss b/core/css/styles.scss index e5e0145cddb..ed72b32113f 100644 --- a/core/css/styles.scss +++ b/core/css/styles.scss @@ -228,7 +228,7 @@ body { right: 0; left: 0; height: 44px; - width: 100%; + width: calc(100% - 250px); padding: 0; margin: 0; background-color: rgba($color-main-background, 0.95); @@ -237,6 +237,7 @@ body { -moz-user-select: none; -ms-user-select: none; user-select: none; + display: inline-flex; } /* position controls for apps with app-navigation */ @@ -1144,9 +1145,7 @@ code { #oc-dialog-filepicker-content { .dirtree { width: 92%; - float: left; - margin-left: 15px; - overflow: hidden; + flex-wrap: wrap; div:first-child a { background-image: url('../img/places/home.svg?v=1'); background-repeat: no-repeat; @@ -1181,7 +1180,7 @@ code { display: none; } .filelist { - background-color: white; + background-color: $color-main-background; width: 100%; } #filestable.filelist { @@ -1388,46 +1387,88 @@ span.ui-icon { } /* ---- BREADCRUMB ---- */ - +.breadcrumb { + display: inline-flex; +} div.crumb { - float: left; - display: block; + display: inline-flex; background-image: url('../img/breadcrumb.svg?v=1'); background-repeat: no-repeat; background-position: right center; height: 44px; background-size: auto 24px; + flex: 0 0 auto; + order: 1; + padding-right: 7px; + &.crumbmenu { + order: 2; + position: relative; + a { + opacity: 0.5 + } + &.canDropChildren, + &.canDrop { + .popovermenu { + display: block; + } + } + // Fix because of the display flex + .popovermenu { + top: 100%; + margin-right: 3px; + ul { + max-height: 345px; + overflow-y: auto; + overflow-x: hidden; + padding-right: 5px; + li.canDrop span:first-child { + background-image: url('../img/filetypes/folder-drag-accept.svg?v=1') !important; + } + } + .in-breadcrumb { + display: none; + } + } + } &.hidden { display: none; + ~ .crumb { + order: 3; + } } - a, > span { + > a, + > span { position: relative; - top: 12px; - padding: 14px 24px 14px 17px; - color: nc-lighten($color-main-text, 33%); + padding: 12px; + opacity: 0.5; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + flex: 0 0 auto; + &.icon-home { + // Hide home text + text-indent: -9999px; + } } - &.last a { - padding-right: 0; + > a[class^='icon-'] { + padding: 0; + width: 44px; } - &:first-child a { - position: relative; - top: 13px; - padding-right: 14px; + &:not(:first-child) a { } - &.last { + &:last-child { font-weight: 600; margin-right: 10px; - } - &.ellipsized { - padding: 0 10px 0 5px; - } - a.ellipsislink { - padding: 0 !important; - position: relative; - top: 8px !important; + // Allow multiple span next to the main 'a' + a ~ span { + padding-left: 0; + } } &:hover, &:focus, a:focus, &:active { - opacity: .7; + > a, + > span { + opacity: .7; + } } } diff --git a/core/img/places/home.svg b/core/img/places/home.svg index 30ef3e31ad4..7ef6db0fde1 100644 --- a/core/img/places/home.svg +++ b/core/img/places/home.svg @@ -1 +1 @@ -<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1"><path color="#000" fill="none" d="M-62.897-32.993h163.31v97.986h-163.31z"/><path opacity=".5" d="M8 1.03L0 9h3v6h10V9h3l-3-3.03V2h-3v1.08L8 1.03z" fill-rule="evenodd"/></svg>
\ No newline at end of file +<svg xmlns="http://www.w3.org/2000/svg" height="16" width="16" version="1"><path color="#000" fill="none" d="M-62.897-32.993h163.31v97.986h-163.31z"/><path d="M8 1.03L0 9h3v6h10V9h3l-3-3.03V2h-3v1.08L8 1.03z" fill-rule="evenodd"/></svg>
\ No newline at end of file diff --git a/core/js/js.js b/core/js/js.js index 1f84b40a35a..730586713a0 100644 --- a/core/js/js.js +++ b/core/js/js.js @@ -1625,39 +1625,6 @@ function initCore() { // initial call toggleSnapperOnSize(); - // adjust controls bar width - var adjustControlsWidth = function() { - if($('#controls').length) { - var controlsWidth; - // if there is a scrollbar … - if($('#app-content').get(0).scrollHeight > $('#app-content').height()) { - if($(window).width() > 768) { - controlsWidth = $('#content').width() - $('#app-navigation').width() - getScrollBarWidth(); - if (!$('#app-sidebar').hasClass('hidden') && !$('#app-sidebar').hasClass('disappear')) { - controlsWidth -= $('#app-sidebar').width(); - } - } else { - controlsWidth = $('#content').width() - getScrollBarWidth(); - } - } else { // if there is none - if($(window).width() > 768) { - controlsWidth = $('#content').width() - $('#app-navigation').width(); - if (!$('#app-sidebar').hasClass('hidden') && !$('#app-sidebar').hasClass('disappear')) { - controlsWidth -= $('#app-sidebar').width(); - } - } else { - controlsWidth = $('#content').width(); - } - } - $('#controls').css('width', controlsWidth); - $('#controls').css('min-width', controlsWidth); - } - }; - - $(window).resize(_.debounce(adjustControlsWidth, 250)); - - $('body').delegate('#app-content', 'apprendered appresized', _.debounce(adjustControlsWidth, 150)); - } // Update live timestamps every 30 seconds diff --git a/core/js/oc-dialogs.js b/core/js/oc-dialogs.js index 1bc1399466d..9cd806720b8 100644 --- a/core/js/oc-dialogs.js +++ b/core/js/oc-dialogs.js @@ -929,7 +929,7 @@ var OCdialogs = { */ _handleTreeListSelect:function(event, type) { var self = event.data; - var dir = $(event.target).parent().data('dir'); + var dir = $(event.target).closest('.crumb').data('dir'); self._fillFilePicker(dir); var getOcDialog = (event.target).closest('.oc-dialog'); var buttonEnableDisable = $('.primary', getOcDialog); |