X-Git-Url: https://jasonwoof.com/gitweb/?a=blobdiff_plain;f=_source%2Fplugins%2Fsmiley%2Fdialogs%2Fsmiley.js;h=1fae1210a9e1e83e3ab4ba1a6e3635d3134d6c00;hb=e7789c1ad838194d45eeee6ac2eb6e55f5cf35a1;hp=3fe408c0b3d4d1567e136a5b8c746fde60d89661;hpb=c6e377a02b54abc07129d72b632763c727476a15;p=ckeditor.git diff --git a/_source/plugins/smiley/dialogs/smiley.js b/_source/plugins/smiley/dialogs/smiley.js index 3fe408c..1fae121 100644 --- a/_source/plugins/smiley/dialogs/smiley.js +++ b/_source/plugins/smiley/dialogs/smiley.js @@ -6,6 +6,7 @@ For licensing, see LICENSE.html or http://ckeditor.com/license CKEDITOR.dialog.add( 'smiley', function( editor ) { var config = editor.config, + lang = editor.lang.smiley, images = config.smiley_images, columns = 8, i; @@ -54,28 +55,9 @@ CKEDITOR.dialog.add( 'smiley', function( editor ) var relative, nodeToMove; var keystroke = ev.getKeystroke(); + var rtl = editor.lang.dir == 'rtl'; switch ( keystroke ) { - // RIGHT-ARROW - case 39 : - // relative is TD - if ( ( relative = element.getParent().getNext() ) ) - { - nodeToMove = relative.getChild( 0 ); - nodeToMove.focus(); - } - ev.preventDefault(); - break; - // LEFT-ARROW - case 37 : - // relative is TD - if ( ( relative = element.getParent().getPrevious() ) ) - { - nodeToMove = relative.getChild( 0 ); - nodeToMove.focus(); - } - ev.preventDefault(); - break; // UP-ARROW case 38 : // relative is TR @@ -103,6 +85,9 @@ CKEDITOR.dialog.add( 'smiley', function( editor ) onClick( { data: ev } ); ev.preventDefault(); break; + + // RIGHT-ARROW + case rtl ? 37 : 39 : // TAB case 9 : // relative is TD @@ -121,6 +106,9 @@ CKEDITOR.dialog.add( 'smiley', function( editor ) ev.preventDefault(true); } break; + + // LEFT-ARROW + case rtl ? 39 : 37 : // SHIFT + TAB case CKEDITOR.SHIFT + 9 : // relative is TD @@ -147,25 +135,33 @@ CKEDITOR.dialog.add( 'smiley', function( editor ) // Build the HTML for the smiley images table. var html = [ - '
' + - '', + '', '' + + '' +config.smiley_descriptions[ i ] + '' + '', ' | ' ); @@ -180,7 +176,7 @@ CKEDITOR.dialog.add( 'smiley', function( editor ) html.push( '