Ticket #5915: 5915_10.patch
File 5915_10.patch, 2.1 KB (added by , 13 years ago) |
---|
-
_source/plugins/dialog/plugin.js
188 188 definition : definition 189 189 } 190 190 , editor ).definition; 191 192 var tabsToRemove = {}; 193 // Cache tabs that should be removed. 194 if ( !( 'removeDialogContents' in editor._ ) && editor.config.removeDialogContents ) 195 { 196 var removeContents = editor.config.removeDialogContents.split(';'); 197 198 for ( i = 0; i < removeContents.length; i++ ) 199 { 200 var parts = removeContents[ i ].split(':'); 201 if ( parts.length == 2 ) 202 { 203 var dialogName = parts[ 0 ].toLowerCase(); 204 if ( !tabsToRemove[ dialogName ] ) 205 tabsToRemove[ dialogName ] = []; 206 tabsToRemove[ dialogName ].push( parts[ 1 ].toLowerCase() ); 207 } 208 } 209 editor._.removeDialogContents = tabsToRemove; 210 } 211 212 // Remove tabs of this dialog. 213 if ( editor._.removeDialogContents && ( tabsToRemove = editor._.removeDialogContents[ dialogName ] ) ) 214 { 215 for ( i = 0; i < tabsToRemove.length; i++ ) 216 definition.removeContents( tabsToRemove[ i ] ); 217 } 218 191 219 // Initialize load, show, hide, ok and cancel events. 192 220 if ( definition.onLoad ) 193 221 this.on( 'load', definition.onLoad ); … … 3010 3038 * @since 3.5 3011 3039 * @example 3012 3040 * config.dialog_buttonsOrder = 'rtl'; 3013 */3041 */ 3014 3042 3015 /** 3043 /** 3044 * The dialog contents to removed. It's a string composed by dialog name and tab name with a colon between them. 3045 * Separate each pair with semicolon (see example). 3046 * <p>Note that the tab names and dialog names are case sensitive!</p> 3047 * <b>Note: Be cautious when specifying dialog tabs that are mandatory, like "info", dialog functionality might be broken because of this!<b> 3048 * @name CKEDITOR.config.removeDialogContents 3049 * @type String 3050 * @since 3.5 3051 * @default '' 3052 * @example 3053 * config.removeDialogContents = 'flash:advanced;image:Link'; 3054 */ 3055 3056 /** 3016 3057 * Fired when a dialog definition is about to be used to create a dialog into 3017 3058 * an editor instance. This event makes it possible to customize the definition 3018 3059 * before creating it.