Skip to content
Permalink
Browse files

Merge branch 't/13138' into major

  • Loading branch information...
Reinmar committed May 4, 2015
2 parents 27736b3 + 1fac62d commit 813cec69570113008736c2e3909b332636df694d
@@ -8,6 +8,7 @@ Fixed Issues:
* [#13118](http://dev.ckeditor.com/ticket/13118): Fixed: The [`editor.getSelectedHtml()`](http://docs.ckeditor.com/#!/api/CKEDITOR.editor-method-getSelectedHtml) method throws error when called in the source mode.
* Toolbar configurators:
* [#13185](http://dev.ckeditor.com/ticket/13185): Fixed: Wrong position of the suggestion box if there is not enough space below the caret.
* [#13138](http://dev.ckeditor.com/ticket/13138): Fixed: The "Toggle empty elements" button label is unclear.

## CKEditor 4.5 Beta

@@ -404,13 +404,14 @@ if ( !Object.keys ) {
* @private
*/
AbstractToolbarModifier.prototype._createToolbarBtn = function( cfg ) {
var btn = ToolbarConfigurator.FullToolbarEditor.createButton( cfg.text, cfg.cssClass );
var btnText = ( typeof cfg.text === 'string' ? cfg.text : cfg.text.inactive ),
btn = ToolbarConfigurator.FullToolbarEditor.createButton( btnText, cfg.cssClass );

this.toolbarContainer.append( btn );
btn.data( 'group', cfg.group );
btn.addClass( cfg.position );
btn.on( 'click', function() {
cfg.clickCallback.call( this, btn );
cfg.clickCallback.call( this, btn, cfg );
}, this );

return btn;
@@ -25,15 +25,25 @@

this.toolbarButtons = [
{
text: 'Toggle visibility of empty elements',
text: {
active: 'Hide empty toolbar groups',
inactive: 'Show empty toolbar groups'
},
group: 'edit',
position: 'left',
cssClass: 'button-a-soft',
clickCallback: function( button ) {
clickCallback: function( button, buttonDefinition ) {
var className = 'button-a-background';

button[ button.hasClass( className ) ? 'removeClass' : 'addClass' ]( className );

this._toggleVisibilityEmptyElements();

if ( this.emptyVisible ) {
button.setText( buttonDefinition.text.active );
} else {
button.setText( buttonDefinition.text.inactive );
}
}
},
{

0 comments on commit 813cec6

Please sign in to comment.
You can’t perform that action at this time.