mirror of
https://github.com/misterunknown/ifm.git
synced 2025-08-09 17:46:31 +02:00
Fix download function when a specific api url is given.
This commit is contained in:
@@ -278,7 +278,7 @@ f00bar;
|
||||
</td>
|
||||
{{#config.download}}
|
||||
<td>
|
||||
<form id="d_{{guid}}">
|
||||
<form id="d_{{guid}}" action="{{api}}" method="post">
|
||||
<input type="hidden" name="dir" value="{{download.currentDir}}">
|
||||
<input type="hidden" name="filename" value="{{download.name}}">
|
||||
<input type="hidden" name="api" value="{{download.action}}">
|
||||
@@ -1631,7 +1631,7 @@ function IFM( params ) {
|
||||
|
||||
|
||||
// build new tbody and replace the old one with the new
|
||||
var newTBody = Mustache.render( self.templates.filetable, { items: data, config: self.config, i18n: self.i18n } );
|
||||
var newTBody = Mustache.render( self.templates.filetable, { items: data, config: self.config, i18n: self.i18n, api: self.api } );
|
||||
var filetable = document.getElementById( 'filetable' );
|
||||
filetable.tBodies[0].remove();
|
||||
filetable.append( document.createElement( 'tbody' ) );
|
||||
|
4
ifm.php
4
ifm.php
@@ -278,7 +278,7 @@ f00bar;
|
||||
</td>
|
||||
{{#config.download}}
|
||||
<td>
|
||||
<form id="d_{{guid}}">
|
||||
<form id="d_{{guid}}" action="{{api}}" method="post">
|
||||
<input type="hidden" name="dir" value="{{download.currentDir}}">
|
||||
<input type="hidden" name="filename" value="{{download.name}}">
|
||||
<input type="hidden" name="api" value="{{download.action}}">
|
||||
@@ -1631,7 +1631,7 @@ function IFM( params ) {
|
||||
|
||||
|
||||
// build new tbody and replace the old one with the new
|
||||
var newTBody = Mustache.render( self.templates.filetable, { items: data, config: self.config, i18n: self.i18n } );
|
||||
var newTBody = Mustache.render( self.templates.filetable, { items: data, config: self.config, i18n: self.i18n, api: self.api } );
|
||||
var filetable = document.getElementById( 'filetable' );
|
||||
filetable.tBodies[0].remove();
|
||||
filetable.append( document.createElement( 'tbody' ) );
|
||||
|
@@ -192,7 +192,7 @@ function IFM( params ) {
|
||||
|
||||
|
||||
// build new tbody and replace the old one with the new
|
||||
var newTBody = Mustache.render( self.templates.filetable, { items: data, config: self.config, i18n: self.i18n } );
|
||||
var newTBody = Mustache.render( self.templates.filetable, { items: data, config: self.config, i18n: self.i18n, api: self.api } );
|
||||
var filetable = document.getElementById( 'filetable' );
|
||||
filetable.tBodies[0].remove();
|
||||
filetable.append( document.createElement( 'tbody' ) );
|
||||
|
@@ -14,7 +14,7 @@
|
||||
</td>
|
||||
{{#config.download}}
|
||||
<td>
|
||||
<form id="d_{{guid}}">
|
||||
<form id="d_{{guid}}" action="{{api}}" method="post">
|
||||
<input type="hidden" name="dir" value="{{download.currentDir}}">
|
||||
<input type="hidden" name="filename" value="{{download.name}}">
|
||||
<input type="hidden" name="api" value="{{download.action}}">
|
||||
|
Reference in New Issue
Block a user