_shortcuts.html.haml 5.5 KB
Newer Older
1
#modal-shortcuts.modal.hide{tabindex: -1}
Dmitriy Zaporozhets's avatar
Dmitriy Zaporozhets committed
2 3 4 5
  .modal-dialog
    .modal-content
      .modal-header
        %a.close{href: "#", "data-dismiss" => "modal"} ×
6
        %h4
7
          Keyboard Shortcuts
8
          %small
9 10 11 12 13 14 15 16 17
            = link_to '(Show all)', '#', class: 'js-more-help-button'
      .modal-body.shortcuts-cheatsheet
        .col-lg-4
          %table.shortcut-mappings
            %tbody
              %tr
                %th
                %th Global Shortcuts
              %tr
18
                %td.shortcut
19 20 21
                  .key s
                %td Focus Search
              %tr
22
                %td.shortcut
23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
                  .key ?
                %td Show this dialog
            %tbody
              %tr
                %th
                %th Project Files browsing
              %tr
                %td.shortcut
                  .key
                    %i.icon-arrow-up
                %td Move selection up
              %tr
                %td.shortcut
                  .key
                    %i.icon-arrow-down
                %td Move selection down
              %tr
40
                %td.shortcut
41 42
                  .key enter
                %td Open Selection
43

44 45 46 47 48 49 50
        .col-lg-4
          %table.shortcut-mappings
            %tbody{ class: 'hidden-shortcut project', style: 'display:none' }
              %tr
                %th
                %th Global Dashboard
              %tr
51
                %td.shortcut
52 53 54 55 56
                  .key g
                  .key a
                %td
                  Go to the activity feed
              %tr
57
                %td.shortcut
58 59 60 61 62
                  .key g
                  .key p
                %td
                  Go to projects
              %tr
63
                %td.shortcut
64 65 66 67 68
                  .key g
                  .key i
                %td
                  Go to issues
              %tr
69
                %td.shortcut
70 71 72 73 74 75 76 77 78
                  .key g
                  .key m
                %td
                  Go to merge requests
            %tbody
              %tr
                %th
                %th Project
              %tr
79
                %td.shortcut
80
                  .key g
81
                  .key p
82
                %td
83
                  Go to the project's activity feed
84
              %tr
85
                %td.shortcut
86 87 88 89 90
                  .key g
                  .key f
                %td
                  Go to files
              %tr
91
                %td.shortcut
92 93 94 95 96
                  .key g
                  .key c
                %td
                  Go to commits
              %tr
97
                %td.shortcut
98 99 100 101 102
                  .key g
                  .key n
                %td
                  Go to network graph
              %tr
103
                %td.shortcut
104 105 106 107 108
                  .key g
                  .key g
                %td
                  Go to graphs
              %tr
109
                %td.shortcut
110 111 112 113 114
                  .key g
                  .key i
                %td
                  Go to issues
              %tr
115
                %td.shortcut
116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182
                  .key g
                  .key m
                %td
                  Go to merge requests
              %tr
                %td.shortcut
                  .key g
                  .key s
                %td
                  Go to snippets
        .col-lg-4
          %table.shortcut-mappings
            %tbody{ class: 'hidden-shortcut network', style: 'display:none' }
              %tr
                %th
                %th Network Graph
              %tr
                %td.shortcut
                  .key
                    %i.icon-arrow-left
                  \/
                  .key h
                %td Scroll left
              %tr
                %td.shortcut
                  .key
                    %i.icon-arrow-right
                  \/
                  .key l
                %td Scroll right
              %tr
                %td.shortcut
                  .key
                    %i.icon-arrow-up
                  \/
                  .key k
                %td Scroll up
              %tr
                %td.shortcut
                  .key
                    %i.icon-arrow-down
                  \/
                  .key j
                %td Scroll down
              %tr
                %td.shortcut
                  .key
                    shift
                    %i.icon-arrow-up
                  \/
                  .key
                    shift k
                %td Scroll to top
              %tr
                %td.shortcut
                  .key
                    shift
                    %i.icon-arrow-down
                  \/
                  .key
                    shift j
                %td Scroll to bottom
            %tbody{ class: 'hidden-shortcut issues', style: 'display:none' }
              %tr
                %th
                %th Issues
              %tr
183
                %td.shortcut
184 185 186
                  .key a
                %td Change assignee
              %tr
187
                %td.shortcut
188 189 190 191 192 193 194
                  .key m
                %td Change milestone
            %tbody{ class: 'hidden-shortcut merge_reuests', style: 'display:none' }
              %tr
                %th
                %th Merge Requests
              %tr
195
                %td.shortcut
196 197 198
                  .key a
                %td Change assignee
              %tr
199
                %td.shortcut
200 201 202 203 204 205 206 207 208 209
                  .key m
                %td Change milestone


:javascript
  $('.js-more-help-button').click(function(e){
      $(this).remove()
      $('.hidden-shortcut').show()
      e.preventDefault()
  });