Ticket #2882: 2882_3.patch

File 2882_3.patch, 4.8 KB (added by Frederico Caldeira Knabben, 15 years ago)
  • _source/core/config.js

     
    151151         * config.plugins = 'basicstyles,button,htmldataprocessor,toolbar,wysiwygarea';
    152152         */
    153153
    154         plugins : 'basicstyles,blockquote,button,clipboard,colorbutton,contextmenu,elementspath,enterkey,entities,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,smiley,showblocks,sourcearea,stylescombo,table,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',
     154        plugins : 'basicstyles,blockquote,button,clipboard,colorbutton,contextmenu,elementspath,enterkey,entities,find,flash,font,format,forms,horizontalrule,htmldataprocessor,image,indent,justify,keystrokes,link,list,newpage,pagebreak,pastefromword,pastetext,preview,print,removeformat,save,smiley,showblocks,sourcearea,stylescombo,table,specialchar,tab,templates,toolbar,undo,wysiwygarea,wsc',
    155155
    156156        /**
    157157         * The theme to be used to build the UI.
  • _source/core/editor.js

     
    249249                                                editor.updateElement();
    250250                                        });
    251251
    252                                 // If we have a submit function, override it also, because it doesn't fire the "submit" event.
    253                                 if ( form.submit && form.submit.call )
     252                                // Setup the submit function because it doesn't fire the
     253                                // "submit" event.
     254                                if ( !form.$.submit.nodeName )
    254255                                {
    255                                         CKEDITOR.tools.override( form.submit, function( originalSubmit )
     256                                        form.$.submit = CKEDITOR.tools.override( form.$.submit, function( originalSubmit )
    256257                                                {
    257258                                                        return function()
    258259                                                                {
    259260                                                                        editor.updateElement();
    260                                                                         originalSubmit.apply( this, arguments );
     261
     262                                                                        // For IE, the DOM submit function is not a
     263                                                                        // function, so we need thid check.
     264                                                                        if ( originalSubmit.apply )
     265                                                                                originalSubmit.apply( this, arguments );
     266                                                                        else
     267                                                                                originalSubmit();
    261268                                                                };
    262269                                                });
    263270                                }
  • _source/lang/en.js

     
    3030        // Toolbar buttons without dialogs.
    3131        source                  : 'Source',
    3232        newPage                 : 'New Page',
     33        save                    : 'Save',
    3334        preview                 : 'Preview',
    3435        cut                             : 'Cut',
    3536        copy                    : 'Copy',
  • _source/plugins/save/plugin.js

     
     1/*
     2Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved.
     3For licensing, see LICENSE.html or http://ckeditor.com/license
     4*/
     5
     6/**
     7 * @fileSave plugin.
     8 */
     9
     10(function()
     11{
     12        var saveCmd =
     13        {
     14                exec : function( editor )
     15                {
     16                        var $form = editor.element.$.form;
     17
     18                        if ( $form )
     19                        {
     20                                try
     21                                {
     22                                        $form.submit();
     23                                }
     24                                catch( e )
     25                                {
     26                                        // If there's a button named "submit" then the form.submit
     27                                        // function is masked and can't be called in IE/FF, so we
     28                                        // call the click() method of that button.
     29                                        if ( $form.submit.click )
     30                                                $form.submit.click()
     31                                }
     32                        }
     33                }
     34        };
     35
     36        var pluginName = 'save';
     37
     38        // Register a plugin named "save".
     39        CKEDITOR.plugins.add( pluginName,
     40        {
     41                init : function( editor )
     42                {
     43                        editor.addCommand( pluginName, saveCmd );
     44                        editor.ui.addButton( 'Save',
     45                                {
     46                                        label : editor.lang.save,
     47                                        command : pluginName
     48                                });
     49                }
     50        });
     51})();
  • _source/plugins/toolbar/plugin.js

     
    225225 */
    226226CKEDITOR.config.toolbar =
    227227[
    228         ['Source','-','NewPage','Preview','-','Templates'],
     228        ['Source','-','Save','NewPage','Preview','-','Templates'],
    229229        ['Cut','Copy','Paste','PasteText','PasteFromWord','-','Print', 'SpellChecker'],
    230230        ['Undo','Redo','-','Find','Replace','-','SelectAll','RemoveFormat'],
    231231        ['Form', 'Checkbox', 'Radio', 'TextField', 'Textarea', 'Select', 'Button', 'ImageButton', 'HiddenField'],
  • _source/skins/default/icons.css

     
    279279{
    280280        background-position: 0 -160px;
    281281}
     282
     283.cke_skin_default a.cke_button_save .cke_icon
     284{
     285        background-position: 0 -32px;
     286}
© 2003 – 2022, CKSource sp. z o.o. sp.k. All rights reserved. | Terms of use | Privacy policy