Ticket #3290: 3290.patch

File 3290.patch, 6.0 KB (added by Frederico Caldeira Knabben, 16 years ago)
  • _source/plugins/toolbar/plugin.js

     
    4646                }
    4747        };
    4848
     49        var collapserFn = CKEDITOR.tools.addFunction(
     50                function( collapser )
     51                {
     52                        var toolbox = collapser.getPrevious();
     53
     54                        if ( toolbox.isVisible() )
     55                        {
     56                                toolbox.hide();
     57                                collapser.addClass( 'cke_toolbox_collapser_min' );
     58                        }
     59                        else
     60                        {
     61                                toolbox.show();
     62                                collapser.removeClass( 'cke_toolbox_collapser_min' );
     63                        }
     64                });
     65
    4966        CKEDITOR.plugins.add( 'toolbar',
    5067        {
    5168                init : function( editor )
     
    105122                                        {
    106123                                                editor.toolbox = new toolbox();
    107124
    108                                                 var output = [ '<div class="cke_toolbox">' ];
     125                                                var output = [ '<div class="cke_toolbox"' ],
     126                                                        expanded =  editor.config.toolbarStartupExpanded;
    109127
     128                                                output.push( expanded ? '>' : ' style="display:none">' );
     129
    110130                                                var toolbars = editor.toolbox.toolbars,
    111131                                                        toolbar =
    112132                                                                        ( editor.config.toolbar instanceof Array ) ?
     
    181201
    182202                                                output.push( '</div>' );
    183203
     204                                                if ( editor.config.toolbarCanCollapse )
     205                                                {
     206                                                        output.push( '<a class="cke_toolbox_collapser' );
     207
     208                                                        if ( !expanded )
     209                                                                output.push( ' cke_toolbox_collapser_min' );
     210
     211                                                        output.push( '" onclick="CKEDITOR.tools.callFunction(' + collapserFn + ',new CKEDITOR.dom.element(this))"></a>' );
     212                                                }
     213
    184214                                                event.data.html += output.join( '' );
    185215                                        }
    186216                                });
     
    264294 * <b>CKEDITOR.config.toolbar = 'Basic';
    265295 */
    266296CKEDITOR.config.toolbar = 'Full';
     297
     298CKEDITOR.config.toolbarCanCollapse = true;
     299CKEDITOR.config.toolbarStartupExpanded = true;
  • _source/skins/office2003/toolbar.css

    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream
    
    Property changes on: _source\skins\office2003\images\arrowleft.gif
    ___________________________________________________________________
    Added: svn:mime-type
       + application/octet-stream
    
    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream
    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream
    
    Property changes on: _source\skins\office2003\images\arrowtop.gif
    ___________________________________________________________________
    Added: svn:mime-type
       + application/octet-stream
    
     
    1111        }
    1212}
    1313
     14.cke_skin_office2003 a.cke_toolbox_collapser,
     15.cke_skin_office2003 a:hover.cke_toolbox_collapser
     16{
     17        background-image: url(images/arrowtop.gif);
     18        background-repeat: no-repeat;
     19        background-position: center center;
     20        width: 11px;
     21        height: 11px;
     22        float: right;
     23        border: outset 1px;
     24        margin: 11px 2px 2px;
     25        cursor: pointer;
     26}
     27
     28.cke_skin_office2003 .cke_rtl a.cke_toolbox_collapser,
     29.cke_skin_office2003 .cke_rtl a:hover.cke_toolbox_collapser
     30{
     31        float: left;
     32}
     33
     34.cke_skin_office2003 a.cke_toolbox_collapser_min,
     35.cke_skin_office2003 a:hover.cke_toolbox_collapser_min
     36{
     37        background-image: url(images/arrowleft.gif);
     38        margin: 2px;
     39}
     40
     41.cke_skin_office2003 .cke_rtl a.cke_toolbox_collapser_min,
     42.cke_skin_office2003 .cke_rtl a:hover.cke_toolbox_collapser_min
     43{
     44        background-image: url(images/arrowright.gif);
     45}
     46
    1447.cke_skin_office2003 .cke_toolbar
    1548{
    1649        background-color: #d6dff7;
  • _source/skins/v2/toolbar.css

    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream
    
    Property changes on: _source\skins\v2\images\arrowleft.gif
    ___________________________________________________________________
    Added: svn:mime-type
       + application/octet-stream
    
    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream
    Cannot display: file marked as a binary type.
    svn:mime-type = application/octet-stream
    
    Property changes on: _source\skins\v2\images\arrowtop.gif
    ___________________________________________________________________
    Added: svn:mime-type
       + application/octet-stream
    
     
    1616        }
    1717}
    1818
     19.cke_skin_v2 a.cke_toolbox_collapser,
     20.cke_skin_v2 a:hover.cke_toolbox_collapser
     21{
     22        background-image: url(images/arrowtop.gif);
     23        background-repeat: no-repeat;
     24        background-position: center center;
     25        width: 11px;
     26        height: 11px;
     27        float: right;
     28        border: outset 1px;
     29        margin: 11px 2px 2px;
     30        cursor: pointer;
     31}
     32
     33.cke_skin_v2 .cke_rtl a.cke_toolbox_collapser,
     34.cke_skin_v2 .cke_rtl a:hover.cke_toolbox_collapser
     35{
     36        float: left;
     37}
     38
     39.cke_skin_v2 a.cke_toolbox_collapser_min,
     40.cke_skin_v2 a:hover.cke_toolbox_collapser_min
     41{
     42        background-image: url(images/arrowleft.gif);
     43        margin: 2px;
     44}
     45
     46.cke_skin_v2 .cke_rtl a.cke_toolbox_collapser_min,
     47.cke_skin_v2 .cke_rtl a:hover.cke_toolbox_collapser_min
     48{
     49        background-image: url(images/arrowright.gif);
     50}
     51
    1952.cke_skin_v2 .cke_toolbar
    2053{
    2154        padding-top: 1px;
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy