deletions: easy delete button on page editor
This commit is contained in:
parent
6c70f37ef8
commit
6a56a4b1b2
10
rModify.go
10
rModify.go
@ -67,6 +67,16 @@ func (this *WikiServer) routeModify(w http.ResponseWriter, r *http.Request, arti
|
|||||||
}
|
}
|
||||||
|
|
||||||
content += `
|
content += `
|
||||||
|
|
|
||||||
|
<a href="javascript:;" id="delete-page">delete</a>
|
||||||
|
<script type="text/javascript">
|
||||||
|
document.getElementById("delete-page").addEventListener("click", function() {
|
||||||
|
if (confirm('Are you sure you want to delete this page?\nThe history will be preserved.')) {
|
||||||
|
document.getElementsByName("content")[0].value = '[delete]';
|
||||||
|
document.getElementById("form-edit-page").submit();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
</script>
|
||||||
</div>
|
</div>
|
||||||
<div id="contentctr"><textarea name="content">` + template.HTMLEscapeString(existingBody) + `</textarea></div>
|
<div id="contentctr"><textarea name="content">` + template.HTMLEscapeString(existingBody) + `</textarea></div>
|
||||||
</form>
|
</form>
|
||||||
|
Loading…
Reference in New Issue
Block a user