mirror of
https://github.com/rejetto/hfs2.git
synced 2025-12-19 10:03:56 +01:00
back to 'selection' for submitting files, to facilitate tpls compatible with 2.3
This commit is contained in:
parent
d6d5b8f493
commit
db092e5eab
14
default.tpl
14
default.tpl
@ -107,8 +107,9 @@ def 3.0
|
||||
</button>
|
||||
|
||||
{.if|{.get|can archive.}|
|
||||
<button id='archiveBtn' title="{.!Download selected files as a single archive.}"
|
||||
onclick='ask("{.!Download these files as a single archive?.}", ()=> submit({ files: getSelectedItemsName() }, "{.get|url|mode=archive|recursive.}") )'>
|
||||
<button id='archiveBtn' title="{.!Download selected files as a single archive.}" onclick='
|
||||
ask("{.!Download these files as a single archive?.}", ()=>
|
||||
submit({ selection: getSelectedItemsName() }, "{.get|url|mode=archive|recursive.}") )'>
|
||||
<i class="fa fa-file-archive"></i>
|
||||
<span>{.!Archive.}</span>
|
||||
</button>
|
||||
@ -688,7 +689,6 @@ function submit(data, url) {
|
||||
f.append("<input type='hidden' name='"+k+"' value='"+v2+"' />")
|
||||
})
|
||||
}
|
||||
showLoading()
|
||||
f.submit()
|
||||
}//submit
|
||||
|
||||
@ -805,9 +805,11 @@ function getSelectedItemsName() {
|
||||
}//getSelectedItemsName
|
||||
|
||||
function deleteFiles(files) {
|
||||
ask("{.!confirm.}", ()=>
|
||||
submit({ action:'delete', files }))
|
||||
}
|
||||
ask("{.!confirm.}", ()=>{
|
||||
submit({ action:'delete', selection:files })
|
||||
showLoading()
|
||||
})
|
||||
}//deleteFiles
|
||||
|
||||
function moveFiles(files) {
|
||||
ask("{.!Enter the destination folder.}", 'text', function(dst) {
|
||||
|
||||
4
main.pas
4
main.pas
@ -4473,7 +4473,7 @@ end; // apacheLogCb
|
||||
procedure removeFilesFromComments(files:TStringDynArray);
|
||||
var
|
||||
fn, lastPath, path: string;
|
||||
trancheStart, trancheEnd: integer; // the tranche is a window within 'files' of items sharing the same path
|
||||
trancheStart, trancheEnd: integer; // the tranche is a window within 'selection' of items sharing the same path
|
||||
ss: TstringList;
|
||||
|
||||
procedure doTheTranche();
|
||||
@ -5038,7 +5038,7 @@ var
|
||||
begin
|
||||
result:=NIL;
|
||||
for i:=0 to data.postvars.count-1 do
|
||||
if sameText('files', data.postvars.names[i]) then
|
||||
if sameText('selection', data.postvars.names[i]) then
|
||||
addString(getTill('#', data.postvars.valueFromIndex[i]), result) // omit #anchors
|
||||
end; // getFilesSelection
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user