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