mirror of
https://github.com/drakkan/sftpgo.git
synced 2025-12-07 14:50:55 +03:00
WebClient: remove inline onclick from file edit page
Signed-off-by: Nicola Murino <nicola.murino@gmail.com>
This commit is contained in:
@@ -52,7 +52,7 @@ explicit grant from the SFTPGo Team (support@sftpgo.com).
|
|||||||
<div class="card-toolbar">
|
<div class="card-toolbar">
|
||||||
<a class="btn btn-light-primary px-10 me-5" href='{{.FilesURL}}?path={{.CurrentDir}}' role="button">Back</a>
|
<a class="btn btn-light-primary px-10 me-5" href='{{.FilesURL}}?path={{.CurrentDir}}' role="button">Back</a>
|
||||||
{{- if not .ReadOnly}}
|
{{- 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-label">Save</span>
|
||||||
<span class="indicator-progress">Please wait...
|
<span class="indicator-progress">Please wait...
|
||||||
<span class="spinner-border spinner-border-sm align-middle ms-2"></span>
|
<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 = cm6.createEditorView(undefined, document.getElementById("editor"));
|
||||||
cmView.setState(cm6.createEditorState("{{.Data}}", options));
|
cmView.setState(cm6.createEditorState("{{.Data}}", options));
|
||||||
|
|
||||||
|
var saveBtn = $('#save_button');
|
||||||
|
if (saveBtn){
|
||||||
|
saveBtn.on("click", function(){
|
||||||
|
saveFile();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
setInterval(keepAlive, 300000);
|
setInterval(keepAlive, 300000);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user