Changeset 6951 for CKEditor/trunk
- Timestamp:
- 05/23/11 10:52:15 (2 years ago)
- Location:
- CKEditor/trunk
- Files:
-
- 2 edited
-
CHANGES.html (modified) (1 diff)
-
_source/plugins/dialog/plugin.js (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
CKEditor/trunk/CHANGES.html
r6950 r6951 69 69 <li><a href="http://dev.ckeditor.com/ticket/7879">#7879</a> : Style and Height/Width fields of the Table Properties dialog window were not synchronized.</li> 70 70 <li><a href="http://dev.ckeditor.com/ticket/7581">#7581</a> : [IE] Enter key at the end of list item with "start" attribute crashes the browser.</li> 71 <li><a href="http://dev.ckeditor.com/ticket/7266">#7266</a> : Invalid dialog fields are now ARIA compatible with "aria-invalid".</li> 71 72 <li>Updated the following language files:<ul> 72 73 <li><a href="http://dev.ckeditor.com/ticket/7834">#7834</a> : Dutch;</li> -
CKEditor/trunk/_source/plugins/dialog/plugin.js
r6947 r6951 93 93 } 94 94 } 95 96 // Handle dialog element validation state UI changes. 97 function handleFieldValidated( isValid, msg ) 98 { 99 var input = this.getInputElement(); 100 if ( input ) 101 { 102 isValid ? input.removeAttribute( 'aria-invalid' ) 103 : input.setAttribute( 'aria-invalid', true ); 104 } 105 106 this.fire( 'validated', { valid : isValid, msg : msg } ); 107 } 108 109 function resetField() 110 { 111 var input = this.getInputElement(); 112 input.removeAttribute( 'aria-invalid' ); 113 } 114 95 115 96 116 /** … … 274 294 if ( item.validate ) 275 295 { 276 var isValid = item.validate( this ); 277 278 if ( typeof isValid == 'string' ) 279 { 280 alert( isValid ); 281 isValid = false; 282 } 283 284 if ( isValid === false ) 296 var retval = item.validate( this ), 297 isValid = retval === true ; 298 299 if ( !isValid ) 285 300 { 286 301 if ( item.select ) … … 291 306 evt.data.hide = false; 292 307 evt.stop(); 293 return true;294 308 } 309 310 handleFieldValidated.call( item, isValid, typeof retval == 'string' ? retval : undefined ); 311 return !isValid; 295 312 } 296 313 }); … … 455 472 if ( CKEDITOR.env.opera || ( CKEDITOR.env.gecko && CKEDITOR.env.mac ) ) 456 473 dialogElement.removeListener( 'keypress', focusKeyPressHandler ); 474 475 // Reset fields state when closing dialog. 476 iterContents( function( item ) { resetField.apply( item ); } ); 457 477 } ); 458 478 this.on( 'iframeAdded', function( evt )
Note: See TracChangeset
for help on using the changeset viewer.
