diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-02-05 20:57:45 +0000 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2016-02-05 20:57:45 +0000 |
commit | 26f3cc41fc41f2901cc560aaecf1fe49cadda7ca (patch) | |
tree | 079f5f1c4ec049fd2483fd99e6699a748d15f780 /app/assets | |
parent | 008ef89d16b587b40e31e895530d60d7d857afd5 (diff) | |
parent | 932c5eb886abacceb0613f2de6e77ff50660a861 (diff) | |
download | gitlab-ce-26f3cc41fc41f2901cc560aaecf1fe49cadda7ca.tar.gz |
Merge branch 'feature/jschatz1/sidebar-features' into 'master'
Feature/jschatz1/sidebar features
* Changes sidebar width (290px).
* Makes shortcuts for <kbd>j</kbd> and <kbd>k</kbd> keys for next and previous issues.
![Screen_Shot_2016-02-05_at_3.06.22_PM](/uploads/8590be43dc1b9feffd4f32b4e8cb7790/Screen_Shot_2016-02-05_at_3.06.22_PM.png)
cc/ @dzaporozhets
See merge request !2734
Diffstat (limited to 'app/assets')
-rw-r--r-- | app/assets/javascripts/shortcuts_issuable.coffee | 19 | ||||
-rw-r--r-- | app/assets/stylesheets/framework/variables.scss | 4 |
2 files changed, 21 insertions, 2 deletions
diff --git a/app/assets/javascripts/shortcuts_issuable.coffee b/app/assets/javascripts/shortcuts_issuable.coffee index f717a753cf8..cefa1857d7f 100644 --- a/app/assets/javascripts/shortcuts_issuable.coffee +++ b/app/assets/javascripts/shortcuts_issuable.coffee @@ -16,12 +16,31 @@ class @ShortcutsIssuable extends ShortcutsNavigation @replyWithSelectedText() return false ) + Mousetrap.bind('j', => + @prevIssue() + return false + ) + Mousetrap.bind('k', => + @nextIssue() + return false + ) + if isMergeRequest @enabledHelp.push('.hidden-shortcut.merge_requests') else @enabledHelp.push('.hidden-shortcut.issues') + prevIssue: -> + $prevBtn = $('.prev-btn') + if not $prevBtn.hasClass('disabled') + Turbolinks.visit($prevBtn.attr('href')) + + nextIssue: -> + $nextBtn = $('.next-btn') + if not $nextBtn.hasClass('disabled') + Turbolinks.visit($nextBtn.attr('href')) + replyWithSelectedText: -> if window.getSelection selected = window.getSelection().toString() diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss index efc3366e99c..b8386362637 100644 --- a/app/assets/stylesheets/framework/variables.scss +++ b/app/assets/stylesheets/framework/variables.scss @@ -13,8 +13,8 @@ $list-font-size: 15px; $sidebar_collapsed_width: 62px; $sidebar_width: 230px; $gutter_collapsed_width: 62px; -$gutter_width: 312px; -$gutter_inner_width: 280px; +$gutter_width: 290px; +$gutter_inner_width: 258px; $avatar_radius: 50%; $code_font_size: 13px; $code_line_height: 1.5; |