Ticket #5755: 5755.patch
File 5755.patch, 2.3 KB (added by , 14 years ago) |
---|
-
_source/plugins/dialog/plugin.js
104 104 CKEDITOR.dialog = function( editor, dialogName ) 105 105 { 106 106 // Load the dialog definition. 107 var definition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ]; 107 var definition = CKEDITOR.dialog._.dialogDefinitions[ dialogName ], 108 defaultDefinition = CKEDITOR.tools.clone( defaultDialogDefinition ), 109 buttonsOrder = editor.config.dialog_buttonsOrder || 'OS', 110 dir = editor.lang.dir; 108 111 112 if ( ( buttonsOrder == 'OS' && CKEDITOR.env.mac ) || // The buttons in MacOS Apps are in reverse order (#4750) 113 ( buttonsOrder == 'rtl' && dir == 'ltr' ) || 114 ( buttonsOrder == 'ltr' && dir == 'rtl' ) ) 115 defaultDefinition.buttons.reverse(); 116 109 117 // Completes the definition with the default values. 110 definition = CKEDITOR.tools.extend( definition( editor ), defaultD ialogDefinition );118 definition = CKEDITOR.tools.extend( definition( editor ), defaultDefinition ); 111 119 112 120 // Clone a functionally independent copy for this dialog. 113 121 definition = CKEDITOR.tools.clone( definition ); … … 1344 1352 buttons : [ CKEDITOR.dialog.okButton, CKEDITOR.dialog.cancelButton ] 1345 1353 }; 1346 1354 1347 // The buttons in MacOS Apps are in reverse order #47501348 CKEDITOR.env.mac && defaultDialogDefinition.buttons.reverse();1349 1350 1355 // Tool function used to return an item from an array based on its id 1351 1356 // property. 1352 1357 var getById = function( array, id, recurse ) … … 2993 2998 */ 2994 2999 2995 3000 /** 3001 * The guildeline to follow when generating the dialog buttons. There are 3 possible options: 3002 * <ul> 3003 * <li>'OS' - the buttons will be displayed in the default order of the user's OS;</li> 3004 * <li>'ltr' - for Left-To-Right order;</li> 3005 * <li>'rtl' - for Right-To-Left order.</li> 3006 * </ul> 3007 * @name CKEDITOR.config.dialog_buttonsOrder 3008 * @type String 3009 * @default 'OS' 3010 * @since 3.5 3011 * @example 3012 * config.dialog_buttonsOrder = 'rtl'; 3013 */ 3014 3015 /** 2996 3016 * Fired when a dialog definition is about to be used to create a dialog into 2997 3017 * an editor instance. This event makes it possible to customize the definition 2998 3018 * before creating it.