Pass find value to function as 1st param

Instead of passing thru a string that never gets used (the 1st param
here is put under the action variable, but then never used), now the 1st
param is the string to consider as the find. In these cases, it's
obviously whatever is in the find input box.
This commit is contained in:
Matt Pass
2013-05-04 15:14:38 +01:00
parent 5b14389c6e
commit bcc86e160f
2 changed files with 3 additions and 3 deletions

View File

@@ -143,7 +143,7 @@ function createNewCMInstance(num) {
keyMap: "ICEcoder",
onKeyEvent: function(thisCM, e) {
top.ICEcoder.redoChangedContent(e);
top.ICEcoder.findReplace('find',true,false);
top.ICEcoder.findReplace(top.document.getElementById('find').value,true,false);
top.ICEcoder.getCaretPosition();
top.ICEcoder.updateCharDisplay();
tok = thisCM.getTokenAt(thisCM.getCursor());

View File

@@ -153,10 +153,10 @@ if (file_exists(dirname(__FILE__)."/plugins/jshint/jshint.js")) {
?><div class="newTab" onClick="ICEcoder.newTab()" id="newTab"><img src="images/nav-new.png"></div>
</div>
<div id="findBar" class="findBar" onContextMenu="return false">
<form name="findAndReplace" onSubmit="ICEcoder.findReplace('findReplace',false,true);return false">
<form name="findAndReplace" onSubmit="ICEcoder.findReplace(top.document.getElementById('find').value,false,true);return false">
<div class="findReplace">
<div class="findText">Find</div>
<input type="text" name="find" value="" id="find" class="textbox find" onKeyUp="ICEcoder.findReplace('find',true,false)">
<input type="text" name="find" value="" id="find" class="textbox find" onKeyUp="ICEcoder.findReplace(top.document.getElementById('find').value,true,false)">
<select name="connector" onChange="ICEcoder.findReplaceOptions()">
<option>in</option>