Ticket #6332: 6332_2.patch
File 6332_2.patch, 5.8 KB (added by , 14 years ago) |
---|
-
_source/plugins/dialog/plugin.js
799 799 */ 800 800 reset : (function() 801 801 { 802 var fn = function( widget ){ if ( widget.reset ) widget.reset( 1); };802 var fn = function( widget ){ if ( widget.reset ) widget.reset(); }; 803 803 return function(){ this.foreach( fn ); return this; }; 804 804 })(), 805 805 … … 2396 2396 /** 2397 2397 * Sets the value of this dialog UI object. 2398 2398 * @param {Object} value The new value. 2399 * @param {Boolean} noChangeEvent Internal commit, to supress 'change' event on this element.2400 2399 * @returns {CKEDITOR.dialog.uiElement} The current UI element. 2401 2400 * @example 2402 2401 * uiElement.setValue( 'Dingo' ); 2403 2402 */ 2404 setValue : function( value , noChangeEvent)2403 setValue : function( value ) 2405 2404 { 2406 2405 this.getInputElement().setValue( value ); 2407 !noChangeEvent &&this.fire( 'change', { value : value } );2406 this.fire( 'change', { value : value } ); 2408 2407 return this; 2409 2408 }, 2410 2409 -
_source/plugins/dialogadvtab/plugin.js
43 43 } 44 44 } 45 45 46 var isUpdating; 47 46 48 CKEDITOR.plugins.add( 'dialogadvtab', 47 49 { 48 50 /** … … 142 144 143 145 updateStyle : function( name, value ) 144 146 { 147 if ( isUpdating ) 148 return; 149 150 // Flag to avoid recursion. 151 isUpdating = 1; 152 145 153 var styles = this.getValue(); 146 154 147 155 // Remove the current value. … … 159 167 styles += name + ': ' + value; 160 168 } 161 169 162 this.setValue( styles, true ); 163 170 this.setValue( styles ); 171 172 isUpdating = 0; 164 173 }, 165 174 166 175 setup : setupAdvParams, -
_source/plugins/dialogui/plugin.js
59 59 return this.getValue() != this.getInitValue(); 60 60 }, 61 61 62 reset : function( noChangeEvent)62 reset : function() 63 63 { 64 this.setValue( this.getInitValue() , noChangeEvent);64 this.setValue( this.getInitValue() ); 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. apply( this, arguments);1064 return CKEDITOR.ui.dialog.uiElement.prototype.setValue.call( this, value ); 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.1160 1159 */ 1161 setValue : function( checked , noChangeEvent)1160 setValue : function( checked ) 1162 1161 { 1163 1162 this.getInputElement().$.checked = checked; 1164 !noChangeEvent &&this.fire( 'change', { value : checked } );1163 this.fire( 'change', { value : checked } ); 1165 1164 }, 1166 1165 1167 1166 /** … … 1223 1222 * Checks one of the radio buttons in this button group. 1224 1223 * @example 1225 1224 * @param {String} value The value of the button to be chcked. 1226 * @param {Boolean} noChangeEvent Internal commit, to supress 'change' event on this element.1227 1225 */ 1228 setValue : function( value , noChangeEvent)1226 setValue : function( value ) 1229 1227 { 1230 1228 var children = this._.children, 1231 1229 item; 1232 1230 for ( var i = 0 ; ( i < children.length ) && ( item = children[i] ) ; i++ ) 1233 1231 item.getElement().$.checked = ( item.getValue() == value ); 1234 !noChangeEvent &&this.fire( 'change', { value : value } );1232 this.fire( 'change', { value : value } ); 1235 1233 }, 1236 1234 1237 1235 /** -
_source/plugins/table/dialogs/table.js
32 32 33 33 onLoad : function() 34 34 { 35 var dialog = this; 35 var dialog = this, 36 isUpdating; 36 37 37 38 var styles = dialog.getContentElement( 'advanced', 'advStyles' ); 38 39 … … 40 41 { 41 42 styles.on( 'change', function( evt ) 42 43 { 44 if ( isUpdating ) 45 return; 46 47 // Flag to avoid recursion. 48 isUpdating = 1; 49 43 50 // Synchronize width value. 44 51 var width = this.getStyle( 'width', '' ), 45 52 txtWidth = dialog.getContentElement( 'info', 'txtWidth' ), … … 52 59 width = parseInt( width, 10 ); 53 60 } 54 61 55 txtWidth && txtWidth.setValue( width , true);56 cmbWidthType && cmbWidthType.setValue( isPx ? 'pixels' : 'percents' , true);62 txtWidth && txtWidth.setValue( width ); 63 cmbWidthType && cmbWidthType.setValue( isPx ? 'pixels' : 'percents' ); 57 64 58 65 // Synchronize height value. 59 66 var height = this.getStyle( 'height', '' ), 60 67 txtHeight = dialog.getContentElement( 'info', 'txtHeight' ); 61 68 62 69 height && ( height = parseInt( height, 10 ) ); 63 txtHeight && txtHeight.setValue( height, true ); 70 txtHeight && txtHeight.setValue( height ); 71 72 isUpdating = 0; 64 73 }); 65 74 } 66 75 }, … … 444 453 445 454 if ( styles ) 446 455 { 447 var value = this.getValue() ;456 var value = this.getValue() || this.getInitValue(); 448 457 449 458 if ( value ) 450 459 value += this.getDialog().getContentElement( 'info', 'cmbWidthType' ).getValue() == 'percents' ? '%' : 'px';