Go to line on typing line num, focus if submit

This commit is contained in:
Matt Pass
2019-09-21 21:30:07 +01:00
committed by GitHub
parent 56738ab792
commit 5b529ee542

View File

@@ -304,12 +304,12 @@ $t = $text['index'];
</div>
<input type="hidden" name="csrf" value="<?php echo $_SESSION["csrf"]; ?>">
</form>
<form onSubmit="return ICEcoder.goToLine()">
<form onSubmit="return ICEcoder.goToLine(top.get('goToLineNo').value, 0, false)">
<div class="codeAssist" title="<?php echo $t['Turn on/off...'];?>">
<input type="checkbox" name="codeAssist" id="codeAssist" class="codeAssistCheckbox" <?php if ($ICEcoder['codeAssist']) {echo 'checked ';};?>>
<span class="codeAssistDisplay" id="codeAssistDisplay" style="background-position: <?php echo $ICEcoder['codeAssist'] ? "0" : "-16";?> 0" onClick="top.ICEcoder.codeAssistToggle()"></span> <?php echo $t['Code Assist'];?>
</div>
<div class="goLine"><?php echo $t['Go to Line'];?> <input type="text" name="goToLine" value="" id="goToLineNo" class="textbox goToLine">
<div class="goLine"><?php echo $t['Go to Line'];?> <input type="text" name="goToLine" value="" id="goToLineNo" onkeyup="ICEcoder.goToLine(this.value, 0, true)" class="textbox goToLine">
<div class="view" title="<?php echo $t['View'];?>" onClick="top.ICEcoder.openPreviewWindow()" id="fMView"></div>
<div class="bug" title="<?php echo $t['Bug reporting not active'];?>" onClick="top.ICEcoder.openBugReport()" id="bugIcon"></div>
<div class="minimapLink" onclick="top.ICEcoder.docExplorerShow('miniMap')"></div>