Ticket #2882: 2882.patch
File 2882.patch, 5.2 KB (added by , 16 years ago) |
---|
-
_source/core/config.js
146 146 * @example 147 147 * config.plugins = 'basicstyles,button,htmldataprocessor,toolbar,wysiwygarea'; 148 148 */ 149 plugins : 'basicstyles,button,elementspath,horizontalrule,htmldataprocessor,keystrokes,newpage,pagebreak,removeformat,s miley,sourcearea,specialchar,tab,toolbar,wysiwygarea',149 plugins : 'basicstyles,button,elementspath,horizontalrule,htmldataprocessor,keystrokes,newpage,pagebreak,removeformat,save,smiley,sourcearea,specialchar,tab,toolbar,wysiwygarea', 150 150 151 151 /** 152 152 * The theme to be used to build the UI. -
_source/core/editor.js
231 231 form.on( 'submit', function() 232 232 { 233 233 editor.updateElement(); 234 editor.fire( 'submit' ); 234 235 }); 235 236 236 // If we have a submit function, override it also, because it doesn't fire the "submit" event. 237 if ( form.submit && form.submit.call ) 237 if ( form.$.onsubmit && form.$.onsubmit.call ) 238 238 { 239 CKEDITOR.tools.override( form.submit, function( originalSubmit )239 form.$.onsubmit = CKEDITOR.tools.override( form.$.onsubmit, function( originalSubmit ) 240 240 { 241 241 return function() 242 242 { 243 // Update element before onsubmit. 243 244 editor.updateElement(); 244 originalSubmit.apply( this, arguments );245 return originalSubmit.apply( this, arguments ); 245 246 }; 246 247 }); 247 248 } 249 250 // If we have a submit function, override it also, because it doesn't fire the "submit" event. 251 if ( form.$.submit && ( form.$.submit.apply || ( CKEDITOR.env.ie && typeof( form.$.submit ) == 'object' ) ) ) //IE bug: In IE it is an "object". 252 { 253 if ( form.getCustomData( '_cke_submit' ) != 'true' ) 254 { 255 form.$.submit = CKEDITOR.tools.override( form.$.submit, function( originalSubmit ) 256 { 257 return function() 258 { 259 form.fire( 'submit' ); 260 if ( originalSubmit.apply ) 261 return originalSubmit.apply( this ); 262 else 263 return originalSubmit(); 264 }; 265 }); 266 form.setCustomData( '_cke_submit', 'true' ); 267 } 268 } 248 269 } 249 270 } 250 271 }; -
_source/lang/en.js
30 30 // Toolbar buttons without dialogs. 31 31 source : 'Source', 32 32 newPage : 'New Page', 33 save : 'Save', 33 34 print : 'Print', 34 35 underline : 'Underline', 35 36 bold : 'Bold', -
_source/plugins/save/plugin.js
1 /* 2 Copyright (c) 2003-2009, CKSource - Frederico Knabben. All rights reserved. 3 For 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 oForm = editor.element.$.form; 17 if ( oForm ) 18 { 19 if ( typeof( oForm.onsubmit ) == 'function' ) 20 { 21 var bRet = oForm.onsubmit(); 22 if ( bRet != null && bRet === false ) 23 return; 24 } 25 26 // Submit the form. 27 // If there's a button named "submit" then the form.submit() function is masked and 28 // can't be called in Mozilla, so we call the click() method of that button. 29 if ( typeof( oForm.submit ) == 'function' ) 30 oForm.submit(); 31 else if ( CKEDITOR.env.ie && typeof( oForm.submit ) == 'object' ) //IE bug: In IE it is an "object". 32 { 33 try 34 { 35 oForm.submit(); 36 } 37 catch( e ) {} 38 } 39 else 40 oForm.submit.click(); 41 } 42 } 43 }; 44 45 var pluginName = 'save'; 46 47 // Register a plugin named "save". 48 CKEDITOR.plugins.add( pluginName, 49 { 50 init : function( editor, pluginPath ) 51 { 52 editor.addCommand( pluginName, saveCmd ); 53 editor.ui.addButton( 'Save', 54 { 55 label : editor.lang.save, 56 command : pluginName 57 }); 58 } 59 }); 60 })(); -
_source/plugins/toolbar/plugin.js
207 207 [ 208 208 [ 209 209 'Source', '-', 210 'NewPage', ' -',210 'NewPage', 'Save', '-', 211 211 'Bold', 'Italic', 'Underline', 'Strike', '-', 212 212 'Subscript', 'Superscript', '-', 213 213 'SelectAll', 'RemoveFormat', '-', -
_source/skins/default/toolbar.css
151 151 background-position: 0 -48px; 152 152 } 153 153 154 .cke_skin_default a.cke_button_save .cke_icon 155 { 156 background-position: 0 -32px; 157 } 158 154 159 .cke_skin_default a.cke_button_find .cke_icon 155 160 { 156 161 background-position: 0 -240px;