Index: trunk/extensions/VisualEditor/modules/es/views/es.ContextView.js |
— | — | @@ -14,7 +14,11 @@ |
15 | 15 | .appendTo( this.$ ); |
16 | 16 | this.$icon = $( '<div class="es-contextView-icon"></div>' ) |
17 | 17 | .appendTo( this.$ ); |
18 | | - this.toolbarView = new es.ToolbarView( this.$toolbar, this.surfaceView ); |
| 18 | + this.toolbarView = new es.ToolbarView( |
| 19 | + this.$toolbar, |
| 20 | + this.surfaceView, |
| 21 | + [{ 'name': 'textStyle', 'items' : [ 'bold', 'italic', 'formatting', 'clear' ] }] |
| 22 | + ); |
19 | 23 | |
20 | 24 | // Example menu items |
21 | 25 | this.$menu.append( |
Index: trunk/extensions/VisualEditor/modules/es/views/es.ToolbarView.js |
— | — | @@ -37,7 +37,7 @@ |
38 | 38 | } ); |
39 | 39 | |
40 | 40 | this.config = config || [ |
41 | | - { name: 'text', items : [ 'bold', 'italic', 'formatting', 'clear' ] }, |
| 41 | + { 'name': 'textStyle', 'items' : [ 'bold', 'italic', 'formatting', 'clear' ] }, |
42 | 42 | ]; |
43 | 43 | |
44 | 44 | this.setup() |
— | — | @@ -54,10 +54,12 @@ |
55 | 55 | for ( var i = 0; i < this.config.length; i++ ) { |
56 | 56 | var $group = $( '<div>' ) |
57 | 57 | .addClass( 'es-toolbarGroup' ) |
58 | | - .addClass( 'es-toolbarGroup-' + this.config[i].name ) |
59 | | - .append( |
60 | | - $( '<div>' ).addClass( 'es-toolbarLabel' ).html( this.config[i].name ) |
| 58 | + .addClass( 'es-toolbarGroup-' + this.config[i].name ); |
| 59 | + if ( this.config[i].label ) { |
| 60 | + $group.append( |
| 61 | + $( '<div>' ).addClass( 'es-toolbarLabel' ).html( this.config[i].label ) |
61 | 62 | ); |
| 63 | + } |
62 | 64 | |
63 | 65 | for ( var j = 0; j < this.config[i].items.length; j++ ) { |
64 | 66 | var toolDefintion = es.Tool.tools[ this.config[i].items[j] ]; |