From 4f55b3995f874a03833f09f5aa063ac29b54dbf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jes=C3=BAs=20Espino?= Date: Wed, 27 Apr 2016 10:45:08 +0200 Subject: [PATCH] More consistent sitemap button behavior --- resources/styles/partials/workspace-bar.scss | 7 ++++++- src/uxbox/ui/workspace/header.cljs | 4 +++- src/uxbox/ui/workspace/shortcuts.cljs | 1 + 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/resources/styles/partials/workspace-bar.scss b/resources/styles/partials/workspace-bar.scss index 483f1dd81..10e58b214 100644 --- a/resources/styles/partials/workspace-bar.scss +++ b/resources/styles/partials/workspace-bar.scss @@ -53,6 +53,7 @@ align-items: center; background-color: $secondary-ui-bg; border-radius: $br-small; + border: 1px solid transparent; cursor: pointer; display: flex; padding: $x-small $x-small $x-small $medium; @@ -73,6 +74,11 @@ } &:hover { + background-color: $color-white; + border-color: $soft-ui-border; + } + + &.selected { background-color: $main-ui-color; svg { @@ -84,7 +90,6 @@ } } - } .workspace-options { diff --git a/src/uxbox/ui/workspace/header.cljs b/src/uxbox/ui/workspace/header.cljs index 48b0b3b38..2c9b16fa8 100644 --- a/src/uxbox/ui/workspace/header.cljs +++ b/src/uxbox/ui/workspace/header.cljs @@ -81,7 +81,9 @@ [:div.main-icon (nav/link (r/route-for :dashboard/projects) i/logo-icon)] [:div.project-tree-btn - {:on-click (partial toggle :sitemap)} + {:alt "Sitemap (Ctrl + Shift + M)" + :class (when (contains? flags :sitemap) "selected") + :on-click (partial toggle :sitemap)} i/project-tree [:span (:name page)]] [:div.workspace-options diff --git a/src/uxbox/ui/workspace/shortcuts.cljs b/src/uxbox/ui/workspace/shortcuts.cljs index f61e50b19..9b15c51a3 100644 --- a/src/uxbox/ui/workspace/shortcuts.cljs +++ b/src/uxbox/ui/workspace/shortcuts.cljs @@ -25,6 +25,7 @@ (defonce ^:const +shortcuts+ {:ctrl+g #(rs/emit! (dw/toggle-flag :grid)) + :ctrl+shift+m #(rs/emit! (dw/toggle-flag :sitemap)) :ctrl+shift+f #(rs/emit! (dw/toggle-flag :drawtools)) :ctrl+shift+i #(rs/emit! (dw/toggle-flag :icons)) :ctrl+shift+l #(rs/emit! (dw/toggle-flag :layers))