fix search modifying in server
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
<script src="https://cdn.jsdelivr.net/npm/easymde/dist/easymde.min.js"></script>
|
||||
<script src="https://cdn.jsdelivr.net/highlight.js/latest/highlight.min.js"></script>
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/highlight.js/latest/styles/github.min.css">
|
||||
<!-- TODO
|
||||
<!-- todo css
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/water.css@2/out/light.css">
|
||||
-->
|
||||
<style>
|
||||
@@ -88,6 +88,7 @@
|
||||
function searchFilesFor(q) {
|
||||
http("GET", "/api/v0/search?q=" + q, (body, status) => {
|
||||
var results = JSON.parse(body)
|
||||
console.log(q, results)
|
||||
results.sort()
|
||||
var innerHTML = "<ul>"
|
||||
for (var result in results)
|
||||
@@ -231,7 +232,7 @@
|
||||
<body style="width: 90%; max-width: 1024px; margin: auto;" onload="init(); return false;">
|
||||
<div style="width: 100%; display: flex; flex-direction: column;">
|
||||
<form action="return false;" style="margin: 1em; display: flex; flex-direction: row;">
|
||||
<input type="text" id="searchbox" style="flex-grow: 1;" placeholder="todo"/>
|
||||
<input type="text" id="searchbox" style="flex-grow: 1;" placeholder="search regexp"/>
|
||||
<input type="submit" value="search" onclick="searchFiles(); return false;"/>
|
||||
</form>
|
||||
<div style="width: 100%; display: flex; flex-direction: row; flex-grow: 1;">
|
||||
@@ -251,6 +252,7 @@
|
||||
</div>
|
||||
<div id="saveFeedback" style="min-height: 1.2em; text-align: right;">
|
||||
</div>
|
||||
<!-- todo: each line no is an anchor -->
|
||||
<textarea id="my-text-area"></textarea>
|
||||
</article>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user