Ticket #3868: 3868_2.patch

File 3868_2.patch, 1.8 KB (added by Tobiasz Cudnik, 15 years ago)
  • _source/plugins/menu/plugin.js

     
    235235                }
    236236        });
    237237
     238        function switchItems( items, index1, index2 )
     239        {
     240                var tmp = items[ index1 ];
     241                items[ index1 ] = items[ index2 ];
     242                items[ index2 ] = tmp;
     243        }
     244
    238245        function sortItems( items )
    239246        {
    240                 items.sort( function( itemA, itemB )
    241                         {
    242                                 if ( itemA.group < itemB.group )
    243                                         return -1;
    244                                 else if ( itemA.group > itemB.group )
    245                                         return 1;
    246 
    247                                 return itemA.order < itemB.order ? -1 :
    248                                         itemA.order > itemB.order ? 1 :
    249                                         0;
    250                         });
    251         }
     247                for ( var i = 0; i < items.length; i++ )
     248                {
     249                        for ( var j = items.length - 1; j > i; j-- )
     250                        {
     251                                if ( items[ j ].group < items[ j - 1 ].group )
     252                                        switchItems( items, j, j - 1 );
     253                                else if ( items[ j ].group == items[ j - 1 ].group )
     254                                {
     255                                        if ( items[ j ].order < items[ j - 1 ].order )
     256                                                switchItems( items, j, j - 1 );
     257                                }
     258                        }
     259                }
     260        }
    252261})();
    253262
    254263CKEDITOR.menuItem = CKEDITOR.tools.createClass(
  • CHANGES.html

     
    8686                <li><a href="http://dev.fckeditor.net/ticket/3812">#3812</a> : Fixed an issue in which the editor
    8787                        may show up empty or uneditable in IE7, 8 and Firefox 3.</li>
    8888                <li><a href="http://dev.fckeditor.net/ticket/3825">#3825</a> : Fixed JS error when opening spellingcheck.</li>
     89                <li><a href="http://dev.fckeditor.net/ticket/3868">#3868</a> : [chrome] SCAYT toolbar options was in reversed order.</li>
    8990        </ul>
    9091        <h3>
    9192                CKEditor 3.0 RC</h3>
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy