summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/sidebar.js.coffee
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-21 22:01:27 -0800
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2015-02-21 22:01:27 -0800
commit87b04868a11a840d04a86ea1f8b2af9ec94efbd8 (patch)
tree571ab1c6be25f0650b08cd98ff993cc3875c9614 /app/assets/javascripts/sidebar.js.coffee
parent52902f54346acb8076594a85e34f16605790b49f (diff)
downloadgitlab-ce-87b04868a11a840d04a86ea1f8b2af9ec94efbd8.tar.gz
Create Aside js class for handling all sidebars in UI for mobile devices
Diffstat (limited to 'app/assets/javascripts/sidebar.js.coffee')
-rw-r--r--app/assets/javascripts/sidebar.js.coffee27
1 files changed, 0 insertions, 27 deletions
diff --git a/app/assets/javascripts/sidebar.js.coffee b/app/assets/javascripts/sidebar.js.coffee
index 5013bcdacd0..7febcba0e94 100644
--- a/app/assets/javascripts/sidebar.js.coffee
+++ b/app/assets/javascripts/sidebar.js.coffee
@@ -1,30 +1,3 @@
-responsive_resize = ->
- current_width = $(window).width()
- if current_width < 985
- $('.responsive-side').addClass("ui right wide sidebar")
- else
- $('.responsive-side').removeClass("ui right wide sidebar")
-
-$ ->
- # Depending on window size, set the sidebar offscreen.
- responsive_resize()
-
- $('.sidebar-expand-button').click ->
- $('.ui.sidebar')
- .sidebar({overlay: true})
- .sidebar('toggle')
-
- # Hide sidebar on click outside of sidebar
- $(document).mouseup (e) ->
- container = $(".ui.sidebar")
- container.sidebar "hide" if not container.is(e.target) and container.has(e.target).length is 0
- return
-
-# On resize, check if sidebar should be offscreen.
-$(window).resize ->
- responsive_resize()
- return
-
$(document).on("click", '.toggle-nav-collapse', (e) ->
e.preventDefault()
collapsed = 'page-sidebar-collapsed'