Index: trunk/extensions/VisualEditor/SpecialVisualEditorSandbox.php |
— | — | @@ -25,6 +25,7 @@ |
26 | 26 | $modeHtml = wfMsgHtml( 'visualeditor-tooltip-html' ); |
27 | 27 | $modeRender = wfMsgHtml( 'visualeditor-tooltip-render' ); |
28 | 28 | $modeHistory = wfMsgHtml( 'visualeditor-tooltip-history' ); |
| 29 | + $modeHelp = wfMsgHtml( 'visualeditor-tooltip-help' ); |
29 | 30 | $out = <<<HTML |
30 | 31 | <!-- VisualEditor Sandbox --> |
31 | 32 | <div id="es-docs"> |
— | — | @@ -39,6 +40,7 @@ |
40 | 41 | <div id="es-mode-html" class="es-modes-button" title="$modeHtml"></div> |
41 | 42 | <div id="es-mode-render" class="es-modes-button" title="$modeRender"></div> |
42 | 43 | <div id="es-mode-history" class="es-modes-button" title="$modeHistory"></div> |
| 44 | + <div id="es-mode-help" class="es-modes-button" title="$modeHelp"></div> |
43 | 45 | </div> |
44 | 46 | <div style="clear:both"></div> |
45 | 47 | <div id="es-toolbar-shadow"></div> |
— | — | @@ -53,6 +55,99 @@ |
54 | 56 | <div id="es-panel-html" class="es-panel es-code"></div> |
55 | 57 | <div id="es-panel-render" class="es-panel es-render"></div> |
56 | 58 | <div id="es-panel-history" class="es-panel es-code"></div> |
| 59 | + <div id="es-panel-help" class="es-panel"> |
| 60 | + <div class="es-help-title">Keyboard Shortcuts</div> |
| 61 | + <div class="es-help-shortcuts-title">Clipboard</div> |
| 62 | + <div class="es-help-shortcut"> |
| 63 | + <span class="es-help-keys"> |
| 64 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 65 | + <span class="es-help-key">C</span> |
| 66 | + </span> |
| 67 | + Copy selected text |
| 68 | + </div> |
| 69 | + <div class="es-help-shortcut"> |
| 70 | + <span class="es-help-keys"> |
| 71 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 72 | + <span class="es-help-key">X</span> |
| 73 | + </span> |
| 74 | + Cut selected text |
| 75 | + </div> |
| 76 | + <div class="es-help-shortcut"> |
| 77 | + <span class="es-help-keys"> |
| 78 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 79 | + <span class="es-help-key">V</span> |
| 80 | + </span> |
| 81 | + Paste text at the cursor |
| 82 | + </div> |
| 83 | + <div class="es-help-shortcuts-title">History navigation</div> |
| 84 | + <div class="es-help-shortcut"> |
| 85 | + <span class="es-help-keys"> |
| 86 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 87 | + <span class="es-help-key">Z</span> |
| 88 | + </span> |
| 89 | + Undo |
| 90 | + </div> |
| 91 | + <div class="es-help-shortcut"> |
| 92 | + <span class="es-help-keys"> |
| 93 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 94 | + <span class="es-help-key">Y</span> |
| 95 | + </span> |
| 96 | + Redo |
| 97 | + </div> |
| 98 | + <div class="es-help-shortcut"> |
| 99 | + <span class="es-help-keys"> |
| 100 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 101 | + <span class="es-help-key">⇧</span> + |
| 102 | + <span class="es-help-key">Z</span> |
| 103 | + </span> |
| 104 | + Redo |
| 105 | + </div> |
| 106 | + <div class="es-help-shortcuts-title">Formatting</div> |
| 107 | + <div class="es-help-shortcut"> |
| 108 | + <span class="es-help-keys"> |
| 109 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 110 | + <span class="es-help-key">B</span> |
| 111 | + </span> |
| 112 | + Make selected text bold |
| 113 | + </div> |
| 114 | + <div class="es-help-shortcut"> |
| 115 | + <span class="es-help-keys"> |
| 116 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 117 | + <span class="es-help-key">I</span> |
| 118 | + </span> |
| 119 | + Make selected text italic |
| 120 | + </div> |
| 121 | + <div class="es-help-shortcut"> |
| 122 | + <span class="es-help-keys"> |
| 123 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 124 | + <span class="es-help-key">K</span> |
| 125 | + </span> |
| 126 | + Make selected text a link |
| 127 | + </div> |
| 128 | + <div class="es-help-shortcuts-title">Selection</div> |
| 129 | + <div class="es-help-shortcut"> |
| 130 | + <span class="es-help-keys"> |
| 131 | + <span class="es-help-key">⇧</span> + |
| 132 | + <span class="es-help-key">Arrow</span> |
| 133 | + </span> |
| 134 | + Adjust selection |
| 135 | + </div> |
| 136 | + <div class="es-help-shortcut"> |
| 137 | + <span class="es-help-keys"> |
| 138 | + <span class="es-help-key">Alt</span> + |
| 139 | + <span class="es-help-key">Arrow</span> |
| 140 | + </span> |
| 141 | + Move cursor by words or blocks |
| 142 | + </div> |
| 143 | + <div class="es-help-shortcut"> |
| 144 | + <span class="es-help-keys"> |
| 145 | + <span class="es-help-key">Alt</span> + |
| 146 | + <span class="es-help-key">⇧</span> + |
| 147 | + <span class="es-help-key">Arrow</span> |
| 148 | + </span> |
| 149 | + Adjust selection by words or blocks |
| 150 | + </div> |
| 151 | + </div> |
57 | 152 | </div> |
58 | 153 | <div style="clear:both"></div> |
59 | 154 | </div> |
Index: trunk/extensions/VisualEditor/demo/index.html |
— | — | @@ -72,11 +72,12 @@ |
73 | 73 | <div id="es-base"> |
74 | 74 | <div id="es-toolbar" class="es-toolbar"> |
75 | 75 | <div id="es-modes" class="es-modes"> |
76 | | - <div id="es-mode-wikitext" class="es-modes-button"></div> |
77 | | - <div id="es-mode-json" class="es-modes-button"></div> |
78 | | - <div id="es-mode-html" class="es-modes-button"></div> |
79 | | - <div id="es-mode-render" class="es-modes-button"></div> |
80 | | - <div id="es-mode-history" class="es-modes-button"></div> |
| 76 | + <div id="es-mode-wikitext" class="es-modes-button" title="Toggle wikitext view"></div> |
| 77 | + <div id="es-mode-json" class="es-modes-button" title="Toggle JSON view"></div> |
| 78 | + <div id="es-mode-html" class="es-modes-button" title="Toggle HTML view"></div> |
| 79 | + <div id="es-mode-render" class="es-modes-button" title="Toggle preview"></div> |
| 80 | + <div id="es-mode-history" class="es-modes-button" title="Toggle transaction history view"></div> |
| 81 | + <div id="es-mode-help" class="es-modes-button" title="Toggle help view"></div> |
81 | 82 | </div> |
82 | 83 | <div style="clear:both"></div> |
83 | 84 | <div id="es-toolbar-shadow"></div> |
— | — | @@ -91,6 +92,99 @@ |
92 | 93 | <div id="es-panel-html" class="es-panel es-code"></div> |
93 | 94 | <div id="es-panel-render" class="es-panel es-render"></div> |
94 | 95 | <div id="es-panel-history" class="es-panel es-code"></div> |
| 96 | + <div id="es-panel-help" class="es-panel"> |
| 97 | + <div class="es-help-title">Keyboard Shortcuts</div> |
| 98 | + <div class="es-help-shortcuts-title">Clipboard</div> |
| 99 | + <div class="es-help-shortcut"> |
| 100 | + <span class="es-help-keys"> |
| 101 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 102 | + <span class="es-help-key">C</span> |
| 103 | + </span> |
| 104 | + Copy selected text |
| 105 | + </div> |
| 106 | + <div class="es-help-shortcut"> |
| 107 | + <span class="es-help-keys"> |
| 108 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 109 | + <span class="es-help-key">X</span> |
| 110 | + </span> |
| 111 | + Cut selected text |
| 112 | + </div> |
| 113 | + <div class="es-help-shortcut"> |
| 114 | + <span class="es-help-keys"> |
| 115 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 116 | + <span class="es-help-key">V</span> |
| 117 | + </span> |
| 118 | + Paste text at the cursor |
| 119 | + </div> |
| 120 | + <div class="es-help-shortcuts-title">History navigation</div> |
| 121 | + <div class="es-help-shortcut"> |
| 122 | + <span class="es-help-keys"> |
| 123 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 124 | + <span class="es-help-key">Z</span> |
| 125 | + </span> |
| 126 | + Undo |
| 127 | + </div> |
| 128 | + <div class="es-help-shortcut"> |
| 129 | + <span class="es-help-keys"> |
| 130 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 131 | + <span class="es-help-key">Y</span> |
| 132 | + </span> |
| 133 | + Redo |
| 134 | + </div> |
| 135 | + <div class="es-help-shortcut"> |
| 136 | + <span class="es-help-keys"> |
| 137 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 138 | + <span class="es-help-key">⇧</span> + |
| 139 | + <span class="es-help-key">Z</span> |
| 140 | + </span> |
| 141 | + Redo |
| 142 | + </div> |
| 143 | + <div class="es-help-shortcuts-title">Formatting</div> |
| 144 | + <div class="es-help-shortcut"> |
| 145 | + <span class="es-help-keys"> |
| 146 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 147 | + <span class="es-help-key">B</span> |
| 148 | + </span> |
| 149 | + Make selected text bold |
| 150 | + </div> |
| 151 | + <div class="es-help-shortcut"> |
| 152 | + <span class="es-help-keys"> |
| 153 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 154 | + <span class="es-help-key">I</span> |
| 155 | + </span> |
| 156 | + Make selected text italic |
| 157 | + </div> |
| 158 | + <div class="es-help-shortcut"> |
| 159 | + <span class="es-help-keys"> |
| 160 | + <span class="es-help-key">Ctl <span class="es-help-key-or">or</span> ⌘</span> + |
| 161 | + <span class="es-help-key">K</span> |
| 162 | + </span> |
| 163 | + Make selected text a link |
| 164 | + </div> |
| 165 | + <div class="es-help-shortcuts-title">Selection</div> |
| 166 | + <div class="es-help-shortcut"> |
| 167 | + <span class="es-help-keys"> |
| 168 | + <span class="es-help-key">⇧</span> + |
| 169 | + <span class="es-help-key">Arrow</span> |
| 170 | + </span> |
| 171 | + Adjust selection |
| 172 | + </div> |
| 173 | + <div class="es-help-shortcut"> |
| 174 | + <span class="es-help-keys"> |
| 175 | + <span class="es-help-key">Alt</span> + |
| 176 | + <span class="es-help-key">Arrow</span> |
| 177 | + </span> |
| 178 | + Move cursor by words or blocks |
| 179 | + </div> |
| 180 | + <div class="es-help-shortcut"> |
| 181 | + <span class="es-help-keys"> |
| 182 | + <span class="es-help-key">Alt</span> + |
| 183 | + <span class="es-help-key">⇧</span> + |
| 184 | + <span class="es-help-key">Arrow</span> |
| 185 | + </span> |
| 186 | + Adjust selection by words or blocks |
| 187 | + </div> |
| 188 | + </div> |
95 | 189 | </div> |
96 | 190 | <div style="clear:both"></div> |
97 | 191 | </div> |
Index: trunk/extensions/VisualEditor/modules/es/images/help.png |
Cannot display: file marked as a binary type. |
svn:mime-type = application/octet-stream |
Property changes on: trunk/extensions/VisualEditor/modules/es/images/help.png |
___________________________________________________________________ |
Added: svn:mime-type |
98 | 192 | + application/octet-stream |
Index: trunk/extensions/VisualEditor/modules/sandbox/sandbox.css |
— | — | @@ -170,6 +170,10 @@ |
171 | 171 | background-image: url(../es/images/history.png); |
172 | 172 | } |
173 | 173 | |
| 174 | +#es-mode-help:before { |
| 175 | + background-image: url(../es/images/help.png); |
| 176 | +} |
| 177 | + |
174 | 178 | #es-panel-history div { |
175 | 179 | border-bottom: solid 1px #dddddd; |
176 | 180 | padding: 0.5em 0; |
— | — | @@ -203,3 +207,47 @@ |
204 | 208 | padding: 0; |
205 | 209 | display: inline-block; |
206 | 210 | } |
| 211 | + |
| 212 | +.es-help-title { |
| 213 | + font-size: 1.5em; |
| 214 | +} |
| 215 | + |
| 216 | +.es-help-shortcuts-title { |
| 217 | + margin: 1em 0 0.5em 0; |
| 218 | + padding: 0; |
| 219 | + font-size: 1.25em; |
| 220 | +} |
| 221 | + |
| 222 | +.es-help-shortcut { |
| 223 | + margin-bottom: 1em; |
| 224 | + font-size: 0.8em; |
| 225 | +} |
| 226 | + |
| 227 | +.es-help-keys { |
| 228 | + display: inline-block; |
| 229 | + margin-right: 0.5em; |
| 230 | +} |
| 231 | + |
| 232 | +.es-help-key { |
| 233 | + display: inline-block; |
| 234 | + padding: 0.33em 0.5em; |
| 235 | + min-width: 1em; |
| 236 | + text-align: center; |
| 237 | + cursor: default; |
| 238 | + border: solid 1px #333333; |
| 239 | + border-top-color: #666666; |
| 240 | + border-bottom-color: #000000; |
| 241 | + background-color: #333333; |
| 242 | + color: #ffffff; |
| 243 | + -webkit-border-radius: 0.25em; |
| 244 | + -moz-border-radius: 0.25em; |
| 245 | + -o-border-radius: 0.25em; |
| 246 | + border-radius: 0.25em; |
| 247 | + -webkit-box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.5); |
| 248 | + -moz-box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.5); |
| 249 | + box-shadow: 0px 1px 4px 0px rgba(0, 0, 0, 0.5); |
| 250 | +} |
| 251 | + |
| 252 | +.es-help-key-or { |
| 253 | + color: #999999; |
| 254 | +} |
Index: trunk/extensions/VisualEditor/modules/sandbox/sandbox.js |
— | — | @@ -552,6 +552,11 @@ |
553 | 553 | } |
554 | 554 | this.$panel.html( events ); |
555 | 555 | } |
| 556 | + }, |
| 557 | + 'help': { |
| 558 | + '$': $( '#es-mode-help' ), |
| 559 | + '$panel': $( '#es-panel-help' ), |
| 560 | + 'update': function() {} |
556 | 561 | } |
557 | 562 | }; |
558 | 563 | $.each( modes, function( name, mode ) { |
Index: trunk/extensions/VisualEditor/VisualEditor.i18n.php |
— | — | @@ -14,6 +14,7 @@ |
15 | 15 | 'visualeditor-tooltip-html' => 'Toggle HTML view', |
16 | 16 | 'visualeditor-tooltip-render' => 'Toggle preview', |
17 | 17 | 'visualeditor-tooltip-history' => 'Toggle transaction history view', |
| 18 | + 'visualeditor-tooltip-help' => 'Toggle help view', |
18 | 19 | ); |
19 | 20 | |
20 | 21 | /** Message documentation |