summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorFatih Acet <acetfatih@gmail.com>2016-10-03 12:38:21 +0300
committerFatih Acet <acetfatih@gmail.com>2016-10-03 12:38:21 +0300
commit729cb3b319227dca2cdf5bd211519615a92e328f (patch)
tree1c955300c12a95e2e4623b288911b633cdff842e /app/assets
parent7134599860651cc0f502581c97853a26f2fb4471 (diff)
downloadgitlab-ce-729cb3b319227dca2cdf5bd211519615a92e328f.tar.gz
Fixes sidebar navigation.fix-sidebar
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/sidebar.js.es612
-rw-r--r--app/assets/stylesheets/framework/sidebar.scss1
2 files changed, 6 insertions, 7 deletions
diff --git a/app/assets/javascripts/sidebar.js.es6 b/app/assets/javascripts/sidebar.js.es6
index ead3219bc31..755fac8107b 100644
--- a/app/assets/javascripts/sidebar.js.es6
+++ b/app/assets/javascripts/sidebar.js.es6
@@ -34,8 +34,8 @@
$(pageSelector).hasClass(expandedPageClass)
);
$(document)
- .on('click', sidebarToggleSelector, (e) => this.toggleSidebar(e))
- .on('click', pinnedToggleSelector, (e) => this.togglePinnedState(e))
+ .on('click', sidebarToggleSelector, () => this.toggleSidebar())
+ .on('click', pinnedToggleSelector, () => this.togglePinnedState())
.on('click', 'html, body', (e) => this.handleClickEvent(e))
.on('page:change', () => this.renderState());
this.renderState();
@@ -47,19 +47,17 @@
const targetIsToggle = $target.closest(sidebarToggleSelector).length > 0;
const targetIsSidebar = $target.closest(sidebarWrapperSelector).length > 0;
if (!targetIsToggle && (!targetIsSidebar || $target.closest('a'))) {
- this.toggleSidebar(e);
+ this.toggleSidebar();
}
}
}
- toggleSidebar(e) {
- e.preventDefault();
+ toggleSidebar() {
this.isExpanded = !this.isExpanded;
this.renderState();
}
- togglePinnedState(e) {
- e.preventDefault();
+ togglePinnedState() {
this.isPinned = !this.isPinned;
if (!this.isPinned) {
this.isExpanded = false;
diff --git a/app/assets/stylesheets/framework/sidebar.scss b/app/assets/stylesheets/framework/sidebar.scss
index 3b7de4b57bb..557ef7291cf 100644
--- a/app/assets/stylesheets/framework/sidebar.scss
+++ b/app/assets/stylesheets/framework/sidebar.scss
@@ -142,6 +142,7 @@
transition-duration: .3s;
position: absolute;
top: 0;
+ cursor: pointer;
&:hover,
&:focus {