Ticket #6041: 6041_2.patch

File 6041_2.patch, 4.0 KB (added by Tobiasz Cudnik, 14 years ago)
  • _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/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/plugins/menu/plugin.js

     
    221221                                // Put the items in the right order.
    222222                                sortItems( items );
    223223
     224                                var chromeRoot = editor.element.getNext().getChild( 1 );
     225                                var mixedContentClass = chromeRoot.hasClass( 'cke_mixed_dir_content' ) ? ' cke_mixed_dir_content' : '';
     226
    224227                                // Build the HTML that composes the menu and its items.
    225                                 var output = [ '<div class="cke_menu" role="presentation">' ];
     228                                var output = [ '<div class="cke_menu' + mixedContentClass + '" role="presentation">' ];
    226229
    227230                                var length = items.length,
    228231                                        lastGroup = length && items[ 0 ].group;
  • _source/skins/kama/menu.css

     
    4444        float: left;
    4545}
    4646
     47.cke_rtl .cke_skin_kama .cke_menuitem .cke_icon
     48{
     49        background-image: url(icons_rtl.png);
     50}
     51
    4752.cke_skin_kama .cke_menuitem .cke_disabled .cke_icon
    4853{
    4954        filter: alpha(opacity=70); /* IE */
  • _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                editor.getCommand( 'bidirtl' ).setState( selectionDir == 'rtl' ? CKEDITOR.TRISTATE_ON : CKEDITOR.TRISTATE_OFF );
     45                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.lang.dir )
     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