Skip to content

Commit

Permalink
Merge branch 't/9511'
Browse files Browse the repository at this point in the history
  • Loading branch information
Reinmar committed Oct 31, 2012
2 parents a9b02b9 + 8cbd792 commit c24c7d0
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions plugins/bidi/plugin.js
Expand Up @@ -199,22 +199,23 @@

// All buttons use the same code to register. So, to avoid
// duplications, let's use this tool function.
var addButtonCommand = function( buttonName, buttonLabel, commandName, commandDef, order ) {
editor.addCommand( commandName, new CKEDITOR.command( editor, commandDef ) );

if ( editor.ui.addButton ) {
editor.ui.addToolbarGroup( 'bidi', 'align', 'paragraph' );

editor.ui.addButton( buttonName, {
label: buttonLabel,
command: commandName,
toolbar: 'bidi,' + order
});
}
};
function addButtonCommand( buttonName, buttonLabel, commandName, commandDef, order ) {
editor.addCommand( commandName, new CKEDITOR.command( editor, commandDef ) );

if ( editor.ui.addButton ) {
editor.ui.addButton( buttonName, {
label: buttonLabel,
command: commandName,
toolbar: 'bidi,' + order
});
}
}

var lang = editor.lang.bidi;

if ( editor.ui.addButton )
editor.ui.addToolbarGroup( 'bidi', 'align', 'paragraph' );

addButtonCommand( 'BidiLtr', lang.ltr, 'bidiltr', bidiCommand( 'ltr' ), 10 );
addButtonCommand( 'BidiRtl', lang.rtl, 'bidirtl', bidiCommand( 'rtl' ), 20 );

Expand Down

0 comments on commit c24c7d0

Please sign in to comment.