Index: trunk/extensions/VisualEditor/modules/es/tools/es.ClearButtonTool.js |
— | — | @@ -7,9 +7,9 @@ |
8 | 8 | * @param {es.ToolbarView} toolbar |
9 | 9 | * @param {String} name |
10 | 10 | */ |
11 | | -es.ClearButtonTool = function( toolbar, name ) { |
| 11 | +es.ClearButtonTool = function( toolbar, name, title ) { |
12 | 12 | // Inheritance |
13 | | - es.ButtonTool.call( this, toolbar, name ); |
| 13 | + es.ButtonTool.call( this, toolbar, name, title ); |
14 | 14 | |
15 | 15 | // Properties |
16 | 16 | this.$.addClass( 'es-toolbarButtonTool-disabled' ); |
— | — | @@ -45,8 +45,9 @@ |
46 | 46 | /* Registration */ |
47 | 47 | |
48 | 48 | es.Tool.tools.clear = { |
49 | | - constructor: es.ClearButtonTool, |
50 | | - name: 'clear' |
| 49 | + 'constructor': es.ClearButtonTool, |
| 50 | + 'name': 'clear', |
| 51 | + 'title': 'Clear formatting' |
51 | 52 | }; |
52 | 53 | |
53 | 54 | /* Inheritance */ |
Index: trunk/extensions/VisualEditor/modules/es/tools/es.FormatDropdownTool.js |
— | — | @@ -8,9 +8,9 @@ |
9 | 9 | * @param {String} name |
10 | 10 | * @param {Object[]} items |
11 | 11 | */ |
12 | | -es.FormatDropdownTool = function( toolbar, name ) { |
| 12 | +es.FormatDropdownTool = function( toolbar, name, title ) { |
13 | 13 | // Inheritance |
14 | | - es.DropdownTool.call( this, toolbar, name, [ |
| 14 | + es.DropdownTool.call( this, toolbar, name, title, [ |
15 | 15 | { |
16 | 16 | 'name': 'paragraph', |
17 | 17 | 'label': 'Paragraph', |
— | — | @@ -109,7 +109,8 @@ |
110 | 110 | |
111 | 111 | es.Tool.tools.format = { |
112 | 112 | 'constructor': es.FormatDropdownTool, |
113 | | - 'name': 'format' |
| 113 | + 'name': 'format', |
| 114 | + 'title': 'Change format' |
114 | 115 | }; |
115 | 116 | |
116 | 117 | /* Inheritance */ |
Index: trunk/extensions/VisualEditor/modules/es/tools/es.AnnotationButtonTool.js |
— | — | @@ -8,9 +8,9 @@ |
9 | 9 | * @param {String} name |
10 | 10 | * @param {Object} annotation |
11 | 11 | */ |
12 | | -es.AnnotationButtonTool = function( toolbar, name, data ) { |
| 12 | +es.AnnotationButtonTool = function( toolbar, name, title, data ) { |
13 | 13 | // Inheritance |
14 | | - es.ButtonTool.call( this, toolbar, name ); |
| 14 | + es.ButtonTool.call( this, toolbar, name, title ); |
15 | 15 | |
16 | 16 | // Properties |
17 | 17 | this.annotation = data.annotation; |
— | — | @@ -50,6 +50,7 @@ |
51 | 51 | es.Tool.tools.bold = { |
52 | 52 | 'constructor': es.AnnotationButtonTool, |
53 | 53 | 'name': 'bold', |
| 54 | + 'title': 'Bold (ctrl/cmd + B)', |
54 | 55 | 'data': { |
55 | 56 | 'annotation': { 'type': 'textStyle/bold' } |
56 | 57 | } |
— | — | @@ -58,6 +59,7 @@ |
59 | 60 | es.Tool.tools.italic = { |
60 | 61 | 'constructor': es.AnnotationButtonTool, |
61 | 62 | 'name': 'italic', |
| 63 | + 'title': 'Italic (ctrl/cmd + I)', |
62 | 64 | 'data': { |
63 | 65 | 'annotation': { 'type': 'textStyle/italic' } |
64 | 66 | } |
— | — | @@ -66,6 +68,7 @@ |
67 | 69 | es.Tool.tools.link = { |
68 | 70 | 'constructor': es.AnnotationButtonTool, |
69 | 71 | 'name': 'link', |
| 72 | + 'title': 'Link (ctrl/cmd + K)', |
70 | 73 | 'data': { |
71 | 74 | 'annotation': { 'type': 'link/internal', 'data': { 'title': '' } }, |
72 | 75 | 'inspector': 'link' |
Index: trunk/extensions/VisualEditor/modules/es/tools/es.ListButtonTool.js |
— | — | @@ -7,9 +7,9 @@ |
8 | 8 | * @param {es.ToolbarView} toolbar |
9 | 9 | * @param {String} name |
10 | 10 | */ |
11 | | - es.ListButtonTool = function( toolbar, name, data ) { |
| 11 | + es.ListButtonTool = function( toolbar, name, title, data ) { |
12 | 12 | // Inheritance |
13 | | - es.ButtonTool.call( this, toolbar, name ); |
| 13 | + es.ButtonTool.call( this, toolbar, name, title ); |
14 | 14 | |
15 | 15 | // Properties |
16 | 16 | this.data = data; |
— | — | @@ -304,13 +304,15 @@ |
305 | 305 | /* Registration */ |
306 | 306 | |
307 | 307 | es.Tool.tools.number = { |
308 | | - constructor: es.ListButtonTool, |
309 | | - name: 'number' |
| 308 | + 'constructor': es.ListButtonTool, |
| 309 | + 'name': 'number', |
| 310 | + 'title': 'Numbered list' |
310 | 311 | }; |
311 | 312 | |
312 | 313 | es.Tool.tools.bullet = { |
313 | | - constructor: es.ListButtonTool, |
314 | | - name: 'bullet' |
| 314 | + 'constructor': es.ListButtonTool, |
| 315 | + 'name': 'bullet', |
| 316 | + 'title': 'Bulleted list' |
315 | 317 | }; |
316 | 318 | |
317 | 319 | /* Inheritance */ |
Index: trunk/extensions/VisualEditor/modules/es/tools/es.IndentationButtonTool.js |
— | — | @@ -7,8 +7,8 @@ |
8 | 8 | * @param {es.ToolbarView} toolbar |
9 | 9 | * @param {String} name |
10 | 10 | */ |
11 | | - es.IndentationButtonTool = function( toolbar, name, data ) { |
12 | | - es.ButtonTool.call( this, toolbar, name ); |
| 11 | + es.IndentationButtonTool = function( toolbar, name, title, data ) { |
| 12 | + es.ButtonTool.call( this, toolbar, name, title ); |
13 | 13 | this.data = data; |
14 | 14 | }; |
15 | 15 | |
— | — | @@ -100,13 +100,15 @@ |
101 | 101 | /* Registration */ |
102 | 102 | |
103 | 103 | es.Tool.tools.indent = { |
104 | | - constructor: es.IndentationButtonTool, |
105 | | - name: 'indent' |
| 104 | + 'constructor': es.IndentationButtonTool, |
| 105 | + 'name': 'indent', |
| 106 | + 'title': 'Increase indentation' |
106 | 107 | }; |
107 | 108 | |
108 | 109 | es.Tool.tools.outdent = { |
109 | | - constructor: es.IndentationButtonTool, |
110 | | - name: 'outdent' |
| 110 | + 'constructor': es.IndentationButtonTool, |
| 111 | + 'name': 'outdent', |
| 112 | + 'title': 'Reduce indentation' |
111 | 113 | }; |
112 | 114 | |
113 | 115 | /* Inheritance */ |
Index: trunk/extensions/VisualEditor/modules/es/tools/es.ButtonTool.js |
— | — | @@ -6,9 +6,9 @@ |
7 | 7 | * @param {es.ToolbarView} toolbar |
8 | 8 | * @param {String} name |
9 | 9 | */ |
10 | | -es.ButtonTool = function( toolbar, name ) { |
| 10 | +es.ButtonTool = function( toolbar, name, title ) { |
11 | 11 | // Inheritance |
12 | | - es.Tool.call( this, toolbar, name ); |
| 12 | + es.Tool.call( this, toolbar, name, title ); |
13 | 13 | if ( !name ) { |
14 | 14 | return; |
15 | 15 | } |
Index: trunk/extensions/VisualEditor/modules/es/tools/es.DropdownTool.js |
— | — | @@ -7,9 +7,9 @@ |
8 | 8 | * @param {String} name |
9 | 9 | * @param {Object[]} items |
10 | 10 | */ |
11 | | -es.DropdownTool = function( toolbar, name, items ) { |
| 11 | +es.DropdownTool = function( toolbar, name, title, items ) { |
12 | 12 | // Inheritance |
13 | | - es.Tool.call( this, toolbar, name ); |
| 13 | + es.Tool.call( this, toolbar, name, title ); |
14 | 14 | if ( !name ) { |
15 | 15 | return; |
16 | 16 | } |
Index: trunk/extensions/VisualEditor/modules/es/tools/es.HistoryButtonTool.js |
— | — | @@ -7,9 +7,9 @@ |
8 | 8 | * @param {es.ToolbarView} toolbar |
9 | 9 | * @param {String} name |
10 | 10 | */ |
11 | | -es.HistoryButtonTool = function( toolbar, name, data ) { |
| 11 | +es.HistoryButtonTool = function( toolbar, name, title, data ) { |
12 | 12 | // Inheritance |
13 | | - es.ButtonTool.call( this, toolbar, name ); |
| 13 | + es.ButtonTool.call( this, toolbar, name, title ); |
14 | 14 | |
15 | 15 | // Properties |
16 | 16 | this.data = data; |
— | — | @@ -35,13 +35,15 @@ |
36 | 36 | /* Registration */ |
37 | 37 | |
38 | 38 | es.Tool.tools.undo = { |
39 | | - constructor: es.HistoryButtonTool, |
40 | | - name: 'undo' |
| 39 | + 'constructor': es.HistoryButtonTool, |
| 40 | + 'name': 'undo', |
| 41 | + 'title': 'Undo (ctrl/cmd + Z)' |
41 | 42 | }; |
42 | 43 | |
43 | 44 | es.Tool.tools.redo = { |
44 | | - constructor: es.HistoryButtonTool, |
45 | | - name: 'redo' |
| 45 | + 'constructor': es.HistoryButtonTool, |
| 46 | + 'name': 'redo', |
| 47 | + 'title': 'Redo (ctrl/cmd + shift + Z)' |
46 | 48 | }; |
47 | 49 | |
48 | 50 | /* Inhertiance */ |
Index: trunk/extensions/VisualEditor/modules/es/bases/es.Tool.js |
— | — | @@ -6,10 +6,11 @@ |
7 | 7 | * @param {es.ToolbarView} toolbar |
8 | 8 | * @param {String} name |
9 | 9 | */ |
10 | | -es.Tool = function( toolbar, name ) { |
| 10 | +es.Tool = function( toolbar, name, title ) { |
11 | 11 | this.toolbar = toolbar; |
12 | 12 | this.name = name; |
13 | | - this.$ = $( '<div class="es-tool"></div>' ).attr( 'title', this.name ); |
| 13 | + this.title = title; |
| 14 | + this.$ = $( '<div class="es-tool"></div>' ).attr( 'title', this.title ); |
14 | 15 | }; |
15 | 16 | |
16 | 17 | /* Static Members */ |
Index: trunk/extensions/VisualEditor/modules/es/views/es.SurfaceView.js |
— | — | @@ -615,6 +615,10 @@ |
616 | 616 | case 73: |
617 | 617 | this.annotate( 'toggle', {'type': 'textStyle/italic' } ); |
618 | 618 | return false; |
| 619 | + // k (hyperlink) |
| 620 | + case 75: |
| 621 | + this.contextView.openInspector( 'link' ); |
| 622 | + return false; |
619 | 623 | } |
620 | 624 | } |
621 | 625 | // Regular text insertion |
Index: trunk/extensions/VisualEditor/modules/es/views/es.ToolbarView.js |
— | — | @@ -79,7 +79,7 @@ |
80 | 80 | var toolDefintion = es.Tool.tools[ this.config[i].items[j] ]; |
81 | 81 | if ( toolDefintion ) { |
82 | 82 | var tool = new toolDefintion.constructor( |
83 | | - this, toolDefintion.name, toolDefintion.data |
| 83 | + this, toolDefintion.name, toolDefintion.title, toolDefintion.data |
84 | 84 | ); |
85 | 85 | this.tools.push( tool ); |
86 | 86 | $group.append( tool.$ ); |