Skip to content
This repository

Underline keyboard shortcut characters on appropriate buttons #718

Merged
merged 1 commit into from over 2 years ago

2 participants

Min RK Fernando Perez
Min RK
Owner

This adds underlines on the relevant characters on buttons, so 'A' is underlined on Above, 'S' on Save, etc.

Fernando Perez
Owner

Looks good to me, I just tested it and it works fine. Since we'd already discussed it and the code looks clean, merging. It's really useful to make the UI more discoverable/memorizable.

Fernando Perez fperez merged commit de11baf into from August 21, 2011
Fernando Perez fperez closed this August 21, 2011
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Aug 21, 2011
Min RK underline keyboard shortcut letter on buttons de11baf
This page is out of date. Refresh to see the latest.
2  IPython/frontend/html/notebook/static/js/savewidget.js
@@ -112,7 +112,7 @@ var IPython = (function (IPython) {
112 112
 
113 113
 
114 114
     SaveWidget.prototype.status_save = function () {
115  
-        this.element.find('button#save_notebook').button('option', 'label', 'Save');
  115
+        this.element.find('button#save_notebook').button('option', 'label', '<u>S</u>ave');
116 116
         this.element.find('button#save_notebook').button('enable');
117 117
         IPython.print_widget.enable();
118 118
     };
14  IPython/frontend/html/notebook/templates/notebook.html
@@ -42,7 +42,7 @@
42 42
     <span id="save_widget">
43 43
         <input type="text" id="notebook_name" size="20"></textarea>
44 44
         <span id="notebook_id" style="display:none">{{notebook_id}}</span>
45  
-        <button id="save_notebook">Save</button>
  45
+        <button id="save_notebook"><u>S</u>ave</button>
46 46
     </span>
47 47
     <span id="kernel_status">Idle</span>
48 48
 </div>
@@ -87,29 +87,29 @@ <h3 class="section_header">Cell</h3>
87 87
             <div class="section_content">
88 88
                 <div class="section_row">
89 89
                     <span class="section_row_buttons">
90  
-                        <button id="delete_cell">Delete</button>
  90
+                        <button id="delete_cell"><u>D</u>elete</button>
91 91
                     </span>
92 92
                     <span class="section_row_header">Actions</span>
93 93
                 </div>
94 94
                 <div class="section_row">
95 95
                     <span id="cell_type" class="section_row_buttons">
96  
-                        <button id="to_code">Code</button>
  96
+                        <button id="to_code"><u>C</u>ode</button>
97 97
 <!--                        <button id="to_html">HTML</button>-->
98  
-                        <button id="to_markdown">Markdown</button>
  98
+                        <button id="to_markdown"><u>M</u>arkdown</button>
99 99
                     </span>
100 100
                      <span class="button_label">Format</span> 
101 101
                 </div>
102 102
                 <div class="section_row">
103 103
                     <span id="cell_output" class="section_row_buttons">
104  
-                        <button id="toggle_output">Toggle</button>
  104
+                        <button id="toggle_output"><u>T</u>oggle</button>
105 105
                         <button id="clear_all_output">ClearAll</button>
106 106
                     </span>
107 107
                     <span class="button_label">Output</span>
108 108
                 </div>
109 109
                 <div class="section_row">
110 110
                     <span id="insert" class="section_row_buttons">
111  
-                        <button id="insert_cell_above">Above</button>
112  
-                        <button id="insert_cell_below">Below</button>
  111
+                        <button id="insert_cell_above"><u>A</u>bove</button>
  112
+                        <button id="insert_cell_below"><u>B</u>elow</button>
113 113
                     </span>
114 114
                     <span class="button_label">Insert</span>
115 115
                 </div>
Commit_comment_tip

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.