Ticket #6137: 6137_3.patch
File 6137_3.patch, 5.7 KB (added by , 14 years ago) |
---|
-
_source/plugins/dialog/plugin.js
762 762 for ( var i in this._.contents ) 763 763 { 764 764 for ( var j in this._.contents[i] ) 765 fn( this._.contents[i][j] );765 fn( this._.contents[i][j] ); 766 766 } 767 767 return this; 768 768 }, … … 775 775 */ 776 776 reset : (function() 777 777 { 778 var fn = function( widget ){ if ( widget.reset ) widget.reset( ); };778 var fn = function( widget ){ if ( widget.reset ) widget.reset( 1 ); }; 779 779 return function(){ this.foreach( fn ); return this; }; 780 780 })(), 781 781 … … 2354 2354 /** 2355 2355 * Sets the value of this dialog UI object. 2356 2356 * @param {Object} value The new value. 2357 * @param {Boolean} noChangeEvent Internal commit, to supress 'change' event on this element. 2357 2358 * @returns {CKEDITOR.dialog.uiElement} The current UI element. 2358 2359 * @example 2359 2360 * uiElement.setValue( 'Dingo' ); 2360 2361 */ 2361 setValue : function( value )2362 setValue : function( value, noChangeEvent ) 2362 2363 { 2363 2364 this.getInputElement().setValue( value ); 2364 this.fire( 'change', { value : value } );2365 !noChangeEvent && this.fire( 'change', { value : value } ); 2365 2366 return this; 2366 2367 }, 2367 2368 -
_source/plugins/dialogadvtab/plugin.js
43 43 } 44 44 } 45 45 46 var isUpdating;47 48 46 CKEDITOR.plugins.add( 'dialogadvtab', 49 47 { 50 48 /** … … 144 142 145 143 updateStyle : function( name, value ) 146 144 { 147 if ( isUpdating )148 return;149 150 // Flag to avoid recursion.151 isUpdating = 1;152 153 145 var styles = this.getValue(); 154 146 155 147 // Remove the current value. … … 167 159 styles += name + ': ' + value; 168 160 } 169 161 170 this.setValue( styles );162 this.setValue( styles, true ); 171 163 172 isUpdating = 0;173 164 }, 174 165 175 166 setup : setupAdvParams, -
_source/plugins/dialogui/plugin.js
59 59 return this.getValue() != this.getInitValue(); 60 60 }, 61 61 62 reset : function( )62 reset : function( noChangeEvent ) 63 63 { 64 this.setValue( this.getInitValue() );64 this.setValue( this.getInitValue(), noChangeEvent ); 65 65 }, 66 66 67 67 setInitValue : function() … … 1061 1061 setValue : function( value ) 1062 1062 { 1063 1063 !value && ( value = '' ); 1064 return CKEDITOR.ui.dialog.uiElement.prototype.setValue. call( this, value);1064 return CKEDITOR.ui.dialog.uiElement.prototype.setValue.apply( this, arguments ); 1065 1065 }, 1066 1066 1067 1067 keyboardFocusable : true … … 1156 1156 * Sets the state of the checkbox. 1157 1157 * @example 1158 1158 * @param {Boolean} true to tick the checkbox, false to untick it. 1159 * @param {Boolean} noChangeEvent Internal commit, to supress 'change' event on this element. 1159 1160 */ 1160 setValue : function( checked )1161 setValue : function( checked, noChangeEvent ) 1161 1162 { 1162 1163 this.getInputElement().$.checked = checked; 1163 this.fire( 'change', { value : checked } );1164 !noChangeEvent && this.fire( 'change', { value : checked } ); 1164 1165 }, 1165 1166 1166 1167 /** … … 1222 1223 * Checks one of the radio buttons in this button group. 1223 1224 * @example 1224 1225 * @param {String} value The value of the button to be chcked. 1226 * @param {Boolean} noChangeEvent Internal commit, to supress 'change' event on this element. 1225 1227 */ 1226 setValue : function( value )1228 setValue : function( value, noChangeEvent ) 1227 1229 { 1228 1230 var children = this._.children, 1229 1231 item; 1230 1232 for ( var i = 0 ; ( i < children.length ) && ( item = children[i] ) ; i++ ) 1231 1233 item.getElement().$.checked = ( item.getValue() == value ); 1232 this.fire( 'change', { value : value } );1234 !noChangeEvent && this.fire( 'change', { value : value } ); 1233 1235 }, 1234 1236 1235 1237 /** -
_source/plugins/table/dialogs/table.js
32 32 33 33 onLoad : function() 34 34 { 35 var dialog = this, 36 isUpdating; 35 var dialog = this; 37 36 38 37 var styles = dialog.getContentElement( 'advanced', 'advStyles' ); 39 38 … … 41 40 { 42 41 styles.on( 'change', function( evt ) 43 42 { 44 if ( isUpdating )45 return;46 47 // Flag to avoid recursion.48 isUpdating = 1;49 50 43 // Synchronize width value. 51 44 var width = this.getStyle( 'width', '' ), 52 45 txtWidth = dialog.getContentElement( 'info', 'txtWidth' ), … … 59 52 width = parseInt( width, 10 ); 60 53 } 61 54 62 txtWidth && txtWidth.setValue( width );63 cmbWidthType && cmbWidthType.setValue( isPx ? 'pixels' : 'percents' );55 txtWidth && txtWidth.setValue( width, true ); 56 cmbWidthType && cmbWidthType.setValue( isPx ? 'pixels' : 'percents', true ); 64 57 65 58 // Synchronize height value. 66 59 var height = this.getStyle( 'height', '' ), 67 60 txtHeight = dialog.getContentElement( 'info', 'txtHeight' ); 68 61 69 62 height && ( height = parseInt( height, 10 ) ); 70 txtHeight && txtHeight.setValue( height ); 71 72 isUpdating = 0; 63 txtHeight && txtHeight.setValue( height, true ); 73 64 }); 74 65 } 75 66 },