| 158 | | var eCaption = oEditor.FCKDomTools.GetFirstChild( table, 'CAPTION' ) ; |
| 159 | | |
| 160 | | if ( document.getElementById('txtCaption').value != '') |
| 161 | | { |
| 162 | | if ( !eCaption ) |
| 163 | | { |
| 164 | | eCaption = oDoc.createElement( 'CAPTION' ) ; |
| 165 | | table.insertBefore( eCaption, table.firstChild ) ; |
| 166 | | } |
| 167 | | |
| 168 | | eCaption.innerHTML = document.getElementById('txtCaption').value ; |
| 169 | | } |
| 170 | | else if ( bExists && eCaption ) |
| 171 | | { |
| 172 | | // TODO: It causes an IE internal error if using removeChild or |
| 173 | | // table.deleteCaption() (see #505). |
| 174 | | if ( oEditor.FCKBrowserInfo.IsIE ) |
| 175 | | eCaption.innerHTML = '' ; |
| 176 | | else |
| 177 | | eCaption.parentNode.removeChild( eCaption ) ; |
| 178 | | } |
| 179 | | |
| | 288 | var eCaption = oEditor.FCKDomTools.GetFirstChild( table, 'CAPTION' ) ; |
| | 289 | |
| | 290 | if ( document.getElementById('txtCaption').value != '' ) |
| | 291 | { |
| | 292 | if ( !eCaption ) |
| | 293 | { |
| | 294 | eCaption = oDoc.createElement( 'CAPTION' ) ; |
| | 295 | table.insertBefore( eCaption, table.firstChild ) ; |
| | 296 | } |
| | 297 | |
| | 298 | eCaption.innerHTML = document.getElementById('txtCaption').value ; |
| | 299 | } |
| | 300 | else if ( bExists && eCaption ) |
| | 301 | { |
| | 302 | // TODO: It causes an IE internal error if using removeChild or |
| | 303 | // table.deleteCaption() (see #505). |
| | 304 | if ( oEditor.FCKBrowserInfo.IsIE ) |
| | 305 | eCaption.innerHTML = '' ; |
| | 306 | else |
| | 307 | eCaption.parentNode.removeChild( eCaption ) ; |
| | 308 | } |
| | 309 | |