Ticket #7746: 7746_4.patch

File 7746_4.patch, 10.1 KB (added by Garry Yao, 13 years ago)
  • _source/skins/office2003/skin.js

     
    88        return {
    99                editor          : { css : [ 'editor.css' ] },
    1010                dialog          : { css : [ 'dialog.css' ] },
     11                separator               : { canGroup: false },
    1112                templates       : { css : [ 'templates.css' ] },
    1213                margins         : [ 0, 14, 18, 14 ]
    1314        };
  • _source/plugins/toolbar/plugin.js

     
    192192                                                {
    193193                                                        var toolbarId,
    194194                                                                toolbarObj = 0,
     195                                                                toolbarName,
    195196                                                                row = toolbar[ r ],
    196197                                                                items;
    197198
     
    221222                                                        for ( var i = 0 ; i < items.length ; i++ )
    222223                                                        {
    223224                                                                var item,
    224                                                                         itemName = items[ i ];
     225                                                                        itemName = items[ i ],
     226                                                                        canGroup;
    225227
    226                                                                 if ( itemName == '-' )
    227                                                                         item = CKEDITOR.ui.separator;
    228                                                                 else
    229                                                                         item = editor.ui.create( itemName );
     228                                                                item = editor.ui.create( itemName );
    230229
    231230                                                                if ( item )
    232231                                                                {
     232                                                                        canGroup = item.canGroup !== false;
     233
    233234                                                                        // Initialize the toolbar first, if needed.
    234235                                                                        if ( !toolbarObj )
    235236                                                                        {
     
    239240                                                                                toolbarName = row.name && ( editor.lang.toolbarGroups[ row.name ] || row.name );
    240241
    241242                                                                                // Output the toolbar opener.
    242                                                                                 output.push( '<span id="', toolbarId, '" class="cke_toolbar ',
    243                                                                                         ( item.canGroup ? 'cke_toolbar_grouped' : 'cke_toolbar_ungrouped' ), '"',
     243                                                                                output.push( '<span id="', toolbarId, '" class="cke_toolbar"',
    244244                                                                                        ( toolbarName ? ' aria-labelledby="'+ toolbarId +  '_label"' : '' ),
    245245                                                                                        ' role="toolbar">' );
    246                                                                                
     246
    247247                                                                                // If a toolbar name is available, send the voice label.
    248248                                                                                toolbarName && output.push( '<span id="', toolbarId, '_label" class="cke_voice_label">', toolbarName, '</span>' );
    249249
     
    261261                                                                                }
    262262                                                                        }
    263263
    264                                                                         if ( item.canGroup )
     264                                                                        if ( canGroup )
    265265                                                                        {
    266266                                                                                if ( !groupStarted )
    267267                                                                                {
     
    400400                        });
    401401
    402402                        editor.addCommand( 'toolbarFocus', commands.toolbarFocus );
    403                 }
    404         });
    405 })();
    406403
    407 /**
    408  * The UI element that renders a toolbar separator.
    409  * @type Object
    410  * @example
    411  */
    412 CKEDITOR.ui.separator =
    413 {
    414         render : function( editor, output )
    415         {
    416                 output.push( '<span class="cke_separator" role="separator"></span>' );
    417                 return {};
    418         }
    419 };
     404                        editor.ui.add( '-', CKEDITOR.UI_SEPARATOR, {} );
     405                        editor.ui.addHandler( CKEDITOR.UI_SEPARATOR,
     406                        {
     407                                create: function()
     408                                {
     409                                        return {
     410                                                render : function( editor, output )
     411                                                {
     412                                                        output.push( '<span class="cke_separator" role="separator"></span>' );
     413                                                        return {};
     414                                                }
     415                                        }
     416                                }
     417                        });
     418                }
     419        });
     420})();
    420421
     422CKEDITOR.UI_SEPARATOR = 'separator';
     423
    421424/**
    422425 * The "theme space" to which rendering the toolbar. For the default theme,
    423426 * the recommended options are "top" and "bottom".
     
    461464 * // This is actually the default value.
    462465 * config.toolbar_Full =
    463466 * [
    464  *     { name: 'document',    items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
     467 *     { name: 'document',    items : [ 'Source','-','Save','NewPage','Preview','Print','-','Templates' ] },
    465468 *     { name: 'clipboard',   items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
    466469 *     { name: 'editing',     items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
    467470 *     { name: 'forms',       items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
     
    478481 */
    479482CKEDITOR.config.toolbar_Full =
    480483[
    481         { name: 'document',             items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
     484        { name: 'document',             items : [ 'Source','-','Save','NewPage','Preview','Print','-','Templates' ] },
    482485        { name: 'clipboard',    items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
    483486        { name: 'editing',              items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
    484487        { name: 'forms',                items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
  • _source/core/ui.js

     
    7171
    7272                var result = handler && handler.create.apply( this, item.args );
    7373
     74                // Allow overrides from skin ui definitions..
     75                item && ( result = CKEDITOR.tools.extend( result, this._.editor.skin[ item.type ], true ) );
     76
    7477                // Add reference inside command object.
    7578                if ( command )
    7679                        command.uiItems.push( result );
  • _source/plugins/richcombo/plugin.js

     
    1818 * @constant
    1919 * @example
    2020 */
    21 CKEDITOR.UI_RICHCOMBO = 3;
     21CKEDITOR.UI_RICHCOMBO = 'richcombo';
    2222
    2323CKEDITOR.ui.richCombo = CKEDITOR.tools.createClass(
    2424{
  • _samples/fullpage.html

     
    5757                                CKEDITOR.replace( 'editor1',
    5858                                        {
    5959                                                fullPage : true,
    60                                                 extraPlugins : 'docprops'
     60                                                extraPlugins : 'docprops',
     61                                                toolbar :
     62                                                [
     63                                                        { name: 'document',             items : [ 'Source','-','Save','NewPage','DocProps','Preview','Print','-','Templates' ] },
     64                                                        { name: 'clipboard',    items : [ 'Cut','Copy','Paste','PasteText','PasteFromWord','-','Undo','Redo' ] },
     65                                                        { name: 'editing',              items : [ 'Find','Replace','-','SelectAll','-','SpellChecker', 'Scayt' ] },
     66                                                        { name: 'forms',                items : [ 'Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField' ] },
     67                                                        '/',
     68                                                        { name: 'basicstyles',  items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','RemoveFormat' ] },
     69                                                        { name: 'paragraph',    items : [ 'NumberedList','BulletedList','-','Outdent','Indent','-','Blockquote','CreateDiv','-','JustifyLeft','JustifyCenter','JustifyRight','JustifyBlock' ] },
     70                                                        { name: 'links',                items : [ 'Link','Unlink','Anchor' ] },
     71                                                        { name: 'insert',               items : [ 'Image','Flash','Table','HorizontalRule','Smiley','SpecialChar','PageBreak' ] },
     72                                                        '/',
     73                                                        { name: 'styles',               items : [ 'Styles','Format','Font','FontSize' ] },
     74                                                        { name: 'colors',               items : [ 'TextColor','BGColor' ] },
     75                                                        { name: 'tools',                items : [ 'Maximize', 'ShowBlocks','-','About' ] }
     76                                                ]
    6177                                        });
    6278
    6379                        //]]>
  • _source/skins/kama/skin.js

     
    1010        return {
    1111                editor          : { css : [ 'editor.css' ] },
    1212                dialog          : { css : [ 'dialog.css' ] },
     13                richcombo : { canGroup: false },
    1314                templates       : { css : [ 'templates.css' ] },
    1415                margins         : [ 0, 0, 0, 0 ],
    1516                init : function( editor )
  • _source/plugins/panel/plugin.js

     
    1616 * @constant
    1717 * @example
    1818 */
    19 CKEDITOR.UI_PANEL = 2;
     19CKEDITOR.UI_PANEL = 'panel';
    2020
    2121CKEDITOR.ui.panel = function( document, definition )
    2222{
  • _source/plugins/button/plugin.js

     
    1616 * @constant
    1717 * @example
    1818 */
    19 CKEDITOR.UI_BUTTON = 1;
     19CKEDITOR.UI_BUTTON = 'button';
    2020
    2121/**
    2222 * Represents a button UI element. This class should not be called directly. To
     
    9696
    9797CKEDITOR.ui.button.prototype =
    9898{
    99         canGroup : true,
    100 
    10199        /**
    102100         * Renders the button.
    103101         * @param {CKEDITOR.editor} editor The editor instance which this button is
  • _source/skins/v2/skin.js

     
    88        return {
    99                editor          : { css : [ 'editor.css' ] },
    1010                dialog          : { css : [ 'dialog.css' ] },
     11                separator               : { canGroup: false },
    1112                templates       : { css : [ 'templates.css' ] },
    1213                margins         : [ 0, 14, 18, 14 ]
    1314        };
  • _source/plugins/menubutton/plugin.js

     
    1717 * @constant
    1818 * @example
    1919 */
    20 CKEDITOR.UI_MENUBUTTON = 5;
     20CKEDITOR.UI_MENUBUTTON = 'menubutton';
    2121
    2222(function()
    2323{
  • _source/skins/kama/toolbar.css

     
    106106        display: none;
    107107}
    108108
    109 .cke_skin_kama .cke_toolbar.cke_toolbar_grouped
     109.cke_skin_kama .cke_toolgroup
    110110{
    111111        -moz-border-radius:5px;
    112112        -webkit-border-radius: 5px;
     
    122122        display: inline;
    123123}
    124124
    125 .cke_skin_kama .cke_rtl .cke_toolbar.cke_toolbar_grouped
     125.cke_skin_kama .cke_rtl .cke_toolgroup
    126126{
    127127        float: right;
    128128        margin-right: 0;
  • _source/plugins/panelbutton/plugin.js

     
    1717 * @constant
    1818 * @example
    1919 */
    20 CKEDITOR.UI_PANELBUTTON = 4;
     20CKEDITOR.UI_PANELBUTTON = 'panelbutton';
    2121
    2222(function()
    2323{
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy