Changeset 900
- Timestamp:
- 2007-09-28 10:04:26 (14 months ago)
- Location:
- FCKeditor/trunk/editor
- Files:
-
- 9 modified
-
dialog/fck_replace.html (modified) (12 diffs)
-
lang/en-au.js (modified) (1 diff)
-
lang/en-ca.js (modified) (1 diff)
-
lang/en.js (modified) (1 diff)
-
lang/en-uk.js (modified) (1 diff)
-
lang/zh-cn.js (modified) (1 diff)
-
lang/zh.js (modified) (1 diff)
-
_source/internals/fckcommands.js (modified) (1 diff)
-
_source/internals/fcktoolbarset.js (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
FCKeditor/trunk/editor/dialog/fck_replace.html
r743 r900 20 20 * == END LICENSE == 21 21 * 22 * " Replace" dialog box window.22 * "Find" and "Replace" dialog box window. 23 23 --> 24 24 <html xmlns="http://www.w3.org/1999/xhtml"> … … 27 27 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 28 28 <meta content="noindex, nofollow" name="robots" /> 29 <script src="common/fck_dialog_common.js" type="text/javascript"></script> 29 30 <script type="text/javascript"> 30 31 31 32 var oEditor = window.parent.InnerDialogLoaded() ; 33 var FCKLang = oEditor.FCKLang ; 34 35 window.parent.AddTab( 'Find', FCKLang.DlgFindTitle ) ; 36 window.parent.AddTab( 'Replace', FCKLang.DlgReplaceTitle ) ; 37 var idMap = {} ; 38 39 function OnDialogTabChange( tabCode ) 40 { 41 ShowE( 'divFind', ( tabCode == 'Find' ) ) ; 42 ShowE( 'divReplace', ( tabCode == 'Replace' ) ) ; 43 idMap['FindText'] = 'txtFind' + tabCode ; 44 idMap['CheckCase'] = 'chkCase' + tabCode ; 45 idMap['CheckWord'] = 'chkWord' + tabCode ; 46 47 window.parent.SetAutoSize( true ) ; 48 } 32 49 33 50 function OnLoad() … … 45 62 range.Collapse( true ) ; 46 63 range.Select() ; 64 65 // Show the appropriate tab at startup. 66 if ( window.parent.name.search( 'Replace' ) == -1 ) 67 window.parent.SetSelectedTab( 'Find' ) ; 68 else 69 window.parent.SetSelectedTab( 'Replace' ) ; 47 70 } 48 71 … … 51 74 document.getElementById('btnReplace').disabled = 52 75 document.getElementById('btnReplaceAll').disabled = 53 ( document.getElementById('txtFind').value.length == 0 ) ; 76 document.getElementById('btnFind').disabled = 77 ( document.getElementById(idMap["FindText"]).value.length == 0 ) ; 54 78 } 55 79 … … 63 87 function GetSearchString() 64 88 { 65 return document.getElementById( "txtFind").value ;89 return document.getElementById(idMap['FindText']).value ; 66 90 } 67 91 … … 73 97 function GetCheckCase() 74 98 { 75 return !! ( document.getElementById( "chkCase").checked ) ;99 return !! ( document.getElementById(idMap['CheckCase']).checked ) ; 76 100 } 77 101 78 102 function GetMatchWord() 79 103 { 80 return !! ( document.getElementById( "chkWord").checked ) ;104 return !! ( document.getElementById(idMap['CheckWord']).checked ) ; 81 105 } 82 106 … … 210 234 }; 211 235 212 function Find()236 function _Find() 213 237 { 214 238 // Start from the end of the current selection. … … 308 332 } 309 333 334 function Find() 335 { 336 var range = new oEditor.FCKDomRange( oEditor.FCK.EditorWindow ) ; 337 range.MoveToSelection() ; 338 range.Collapse( false ) ; 339 range.Select() ; 340 341 if ( ! _Find() ) 342 alert( FCKLang.DlgFindNotFoundMsg ) ; 343 } 344 310 345 function Replace() 311 346 { … … 315 350 if ( selection.CheckIsCollapsed() ) 316 351 { 317 if (! Find() )318 alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;352 if (! _Find() ) 353 alert( FCKLang.DlgFindNotFoundMsg ) ; 319 354 } 320 355 else … … 335 370 var replaceCount = 0 ; 336 371 337 while ( Find() )372 while ( _Find() ) 338 373 { 339 374 range.MoveToSelection() ; … … 345 380 } 346 381 if ( replaceCount == 0 ) 347 alert( oEditor.FCKLang.DlgFindNotFoundMsg ) ;382 alert( FCKLang.DlgFindNotFoundMsg ) ; 348 383 window.parent.Cancel() ; 349 384 } … … 351 386 </head> 352 387 <body onload="OnLoad()" style="overflow: hidden"> 353 <table cellspacing="3" cellpadding="2" width="100%" border="0"> 354 <tr> 355 <td nowrap="nowrap"> 356 <label for="txtFind" fcklang="DlgReplaceFindLbl"> 357 Find what:</label> 358 </td> 359 <td width="100%"> 360 <input id="txtFind" onkeyup="btnStat(this.form)" style="width: 100%" tabindex="1" 361 type="text" /> 362 </td> 363 <td> 364 <input id="btnReplace" style="width: 100%" disabled="disabled" onclick="Replace();" 365 type="button" value="Replace" fcklang="DlgReplaceReplaceBtn" /> 366 </td> 367 </tr> 368 <tr> 369 <td valign="top" nowrap="nowrap"> 370 <label for="txtReplace" fcklang="DlgReplaceReplaceLbl"> 371 Replace with:</label> 372 </td> 373 <td valign="top"> 374 <input id="txtReplace" style="width: 100%" tabindex="2" type="text" /> 375 </td> 376 <td> 377 <input id="btnReplaceAll" disabled="disabled" onclick="ReplaceAll()" type="button" 378 value="Replace All" fcklang="DlgReplaceReplAllBtn" /> 379 </td> 380 </tr> 381 <tr> 382 <td valign="bottom" colspan="3"> 383 <input id="chkCase" tabindex="3" type="checkbox" /><label for="chkCase" fcklang="DlgReplaceCaseChk">Match 384 case</label> 385 <br /> 386 <input id="chkWord" tabindex="4" type="checkbox" /><label for="chkWord" fcklang="DlgReplaceWordChk">Match 387 whole word</label> 388 </td> 389 </tr> 390 </table> 388 <div id="divFind" style="display: none"> 389 <table cellspacing="3" cellpadding="2" width="100%" border="0"> 390 <tr> 391 <td nowrap="nowrap"> 392 <label for="txtFindFind" fcklang="DlgReplaceFindLbl"> 393 Find what:</label> 394 </td> 395 <td width="100%"> 396 <input id="txtFindFind" onkeyup="btnStat(this.form)" style="width: 100%" tabindex="1" 397 type="text" /> 398 </td> 399 <td> 400 <input id="btnFind" style="width: 80px" disabled="disabled" onclick="Find();" 401 type="button" value="Find" fcklang="DlgFindFindBtn" /> 402 </td> 403 </tr> 404 <tr> 405 <td valign="bottom" colspan="3"> 406 <input id="chkCaseFind" tabindex="3" type="checkbox" /><label for="chkCaseFind" fcklang="DlgReplaceCaseChk">Match 407 case</label> 408 <br /> 409 <input id="chkWordFind" tabindex="4" type="checkbox" /><label for="chkWordFind" fcklang="DlgReplaceWordChk">Match 410 whole word</label> 411 </td> 412 </tr> 413 </table> 414 </div> 415 <div id="divReplace" style="display:none"> 416 <table cellspacing="3" cellpadding="2" width="100%" border="0"> 417 <tr> 418 <td nowrap="nowrap"> 419 <label for="txtFindReplace" fcklang="DlgReplaceFindLbl"> 420 Find what:</label> 421 </td> 422 <td width="100%"> 423 <input id="txtFindReplace" onkeyup="btnStat(this.form)" style="width: 100%" tabindex="1" 424 type="text" /> 425 </td> 426 <td> 427 <input id="btnReplace" style="width: 80px" disabled="disabled" onclick="Replace();" 428 type="button" value="Replace" fcklang="DlgReplaceReplaceBtn" /> 429 </td> 430 </tr> 431 <tr> 432 <td valign="top" nowrap="nowrap"> 433 <label for="txtReplace" fcklang="DlgReplaceReplaceLbl"> 434 Replace with:</label> 435 </td> 436 <td valign="top"> 437 <input id="txtReplace" style="width: 100%" tabindex="2" type="text" /> 438 </td> 439 <td> 440 <input id="btnReplaceAll" style="width: 80px" disabled="disabled" onclick="ReplaceAll()" type="button" 441 value="Replace All" fcklang="DlgReplaceReplAllBtn" /> 442 </td> 443 </tr> 444 <tr> 445 <td valign="bottom" colspan="3"> 446 <input id="chkCaseReplace" tabindex="3" type="checkbox" /><label for="chkCaseReplace" fcklang="DlgReplaceCaseChk">Match 447 case</label> 448 <br /> 449 <input id="chkWordReplace" tabindex="4" type="checkbox" /><label for="chkWordReplace" fcklang="DlgReplaceWordChk">Match 450 whole word</label> 451 </td> 452 </tr> 453 </table> 454 </div> 391 455 </body> 392 456 </html> -
FCKeditor/trunk/editor/lang/en-au.js
r850 r900 332 332 DlgCellBtnSelect : "Select...", 333 333 334 // Find and Replace Dialog 335 DlgFindAndReplaceTitle : "Find and Replace", 336 334 337 // Find Dialog 335 338 DlgFindTitle : "Find", -
FCKeditor/trunk/editor/lang/en-ca.js
r850 r900 332 332 DlgCellBtnSelect : "Select...", 333 333 334 // Find and Replace Dialog 335 DlgFindAndReplaceTitle : "Find and Replace", 336 334 337 // Find Dialog 335 338 DlgFindTitle : "Find", -
FCKeditor/trunk/editor/lang/en.js
r850 r900 332 332 DlgCellBtnSelect : "Select...", 333 333 334 // Find and Replace Dialog 335 DlgFindAndReplaceTitle : "Find and Replace", 336 334 337 // Find Dialog 335 338 DlgFindTitle : "Find", -
FCKeditor/trunk/editor/lang/en-uk.js
r850 r900 332 332 DlgCellBtnSelect : "Select...", 333 333 334 // Find and Replace Dialog 335 DlgFindAndReplaceTitle : "Find and Replace", 336 334 337 // Find Dialog 335 338 DlgFindTitle : "Find", -
FCKeditor/trunk/editor/lang/zh-cn.js
r850 r900 332 332 DlgCellBtnSelect : "选择...", 333 333 334 // Find and Replace Dialog 335 DlgFindAndReplaceTitle : "查找和替换", 336 334 337 // Find Dialog 335 338 DlgFindTitle : "查找", -
FCKeditor/trunk/editor/lang/zh.js
r850 r900 332 332 DlgCellBtnSelect : "請選擇…", 333 333 334 // Find and Replace Dialog 335 DlgFindAndReplaceTitle : "尋找與取代", 336 334 337 // Find Dialog 335 338 DlgFindTitle : "尋找", -
FCKeditor/trunk/editor/_source/internals/fckcommands.js
r869 r900 58 58 case 'About' : oCommand = new FCKDialogCommand( 'About' , FCKLang.About , 'dialog/fck_about.html' , 400, 330 ) ; break ; 59 59 60 case 'Find' : oCommand = new FCKDialogCommand( 'Find' , FCKLang.DlgFind Title , 'dialog/fck_find.html' , 340, 170, FCKCommands.GetBooleanState, FCKBrowserInfo.IsOpera) ; break ;61 case 'Replace' : oCommand = new FCKDialogCommand( 'Replace' , FCKLang.Dlg ReplaceTitle , 'dialog/fck_replace.html' , 340, 200 ) ; break ;60 case 'Find' : oCommand = new FCKDialogCommand( 'Find' , FCKLang.DlgFindAndReplaceTitle , 'dialog/fck_replace.html' , 340, 170 ) ; break ; 61 case 'Replace' : oCommand = new FCKDialogCommand( 'Replace' , FCKLang.DlgFindAndReplaceTitle , 'dialog/fck_replace.html' , 340, 220 ) ; break ; 62 62 63 63 case 'Image' : oCommand = new FCKDialogCommand( 'Image' , FCKLang.DlgImgTitle , 'dialog/fck_image.html' , 450, 400 ) ; break ; -
FCKeditor/trunk/editor/_source/internals/fcktoolbarset.js
r779 r900 102 102 oToolbarSet = eToolbarTarget.__FCKToolbarSet = new FCKToolbarSet( eTargetDocument ) ; 103 103 oToolbarSet._IFrame = eToolbarIFrame ; 104 104 105 105 if ( FCK.IECleanup ) 106 106 FCK.IECleanup.AddItem( eToolbarTarget, FCKToolbarSet_Target_Cleanup ) ;