WebClient: remove inline onclick from file edit page
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
parent
2d9e7dfba2
commit
3c522961af
1 changed files with 8 additions and 1 deletions
|
@ -52,7 +52,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||
<div class="card-toolbar">
|
||||
<a class="btn btn-light-primary px-10 me-5" href='{{.FilesURL}}?path={{.CurrentDir}}' role="button">Back</a>
|
||||
{{- if not .ReadOnly}}
|
||||
<a id="save_button" type="button" class="btn btn-primary px-10" href="#" role="button" onclick="saveFile();">
|
||||
<a id="save_button" type="button" class="btn btn-primary px-10" href="#" role="button">
|
||||
<span class="indicator-label">Save</span>
|
||||
<span class="indicator-progress">Please wait...
|
||||
<span class="spinner-border spinner-border-sm align-middle ms-2"></span>
|
||||
|
@ -159,6 +159,13 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||
cmView = cm6.createEditorView(undefined, document.getElementById("editor"));
|
||||
cmView.setState(cm6.createEditorState("{{.Data}}", options));
|
||||
|
||||
var saveBtn = $('#save_button');
|
||||
if (saveBtn){
|
||||
saveBtn.on("click", function(){
|
||||
saveFile();
|
||||
});
|
||||
}
|
||||
|
||||
setInterval(keepAlive, 300000);
|
||||
});
|
||||
</script>
|
||||
|
|
Loading…
Reference in a new issue