Ticket #6041: 6041.patch

File 6041.patch, 2.9 KB (added by Tobiasz Cudnik, 14 years ago)
  • _source/skins/kama/toolbar.css

     
    242242
    243243.cke_skin_kama .cke_rtl .cke_button .cke_icon
    244244{
     245        background-image: url(icons_rtl.png);
     246}
     247
     248.cke_skin_kama .cke_rtl .cke_button .cke_icon
     249{
    245250        float: right;
    246251}
    247252
  • _source/skins/kama/icons.css

     
    248248        background-position: 0 -416px;
    249249}
    250250
     251.cke_skin_kama .cke_mixed_dir_content .cke_button_numberedlist .cke_icon
     252{
     253        background-position: 0 -1217px;
     254}
     255
     256.cke_skin_kama .cke_mixed_dir_content .cke_button_bulletedlist .cke_icon
     257{
     258        background-position: 0 -1233px;
     259}
     260
    251261.cke_skin_kama .cke_button_outdent .cke_icon
    252262{
    253263        background-position: 0 -432px;
     
    258268        background-position: 0 -448px;
    259269}
    260270
     271.cke_skin_kama .cke_mixed_dir_content .cke_button_indent .cke_icon
     272{
     273        background-position: 0 -1265px;
     274}
     275
     276.cke_skin_kama .cke_mixed_dir_content .cke_button_outdent .cke_icon
     277{
     278        background-position: 0 -1249px;
     279}
     280
    261281.cke_skin_kama .cke_button_justifyleft .cke_icon
    262282{
    263283        background-position: 0 -464px;
  • _source/plugins/bidi/plugin.js

     
    1111
    1212        function onSelectionChange( evt )
    1313        {
    14                 evt.editor.getCommand( 'bidirtl' ).setState( getState( evt.editor, evt.data.path, 'rtl' ) );
    15                 evt.editor.getCommand( 'bidiltr' ).setState( getState( evt.editor, evt.data.path, 'ltr' ) );
    16         }
    17 
    18         function getState( editor, path, dir )
    19         {
     14                var editor = evt.editor,
     15                        path = evt.data.path;
    2016                var useComputedState = editor.config.useComputedState,
    2117                        selectedElement;
    2218
     
    4137                if ( !selectedElement || selectedElement.getName() == 'body' )
    4238                        return CKEDITOR.TRISTATE_OFF;
    4339
    44                 selectedElement = useComputedState ?
     40                var selectionDir = useComputedState ?
    4541                        selectedElement.getComputedStyle( 'direction' ) :
    4642                        selectedElement.getStyle( 'direction' ) || selectedElement.getAttribute( 'dir' );
    4743
    48                 return ( selectedElement == dir ) ?
    49                         CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF;
     44                evt.editor.getCommand( 'bidirtl' ).setState( selectionDir == 'rtl' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
     45                evt.editor.getCommand( 'bidiltr' ).setState( selectionDir == 'ltr' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
     46
     47                var chromeRoot = editor.element.getNext().getChild( 1 );
     48
     49                if ( selectionDir != editor.config.contentsLangDirection )
     50                        chromeRoot.addClass( 'cke_mixed_dir_content' );
     51                else
     52                        chromeRoot.removeClass( 'cke_mixed_dir_content' );
    5053        }
    5154
    5255        function switchDir( element, dir, editor )
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy