1
0
mirror of https://github.com/misterunknown/ifm.git synced 2025-08-09 17:46:31 +02:00

Merge pull request #137 from misterunknown/v2.6.2

V2.6.2
This commit is contained in:
Marco Dickert
2020-07-18 19:26:29 +02:00
committed by GitHub
25 changed files with 453 additions and 352 deletions

4
.dockerignore Normal file
View File

@@ -0,0 +1,4 @@
*
!compiler.php
!src
!docker/docker-startup.sh

View File

@@ -24,9 +24,15 @@ RUN echo "Set disable_coredump false" > /etc/sudo.conf
# prepare files # prepare files
RUN rm -rf /var/www/html && \ RUN rm -rf /var/www/html && \
mkdir -p /usr/local/share/webapps/ifm && \ mkdir -p /usr/local/share/webapps/ifm && \
ln -s /var/www /usr/local/share/webapps/ifm/www chown -R 33:33 /var/www && \
COPY ifm.php /usr/local/share/webapps/ifm/index.php ln -s /var/www /usr/local/share/webapps/ifm/www && \
COPY docker-startup.sh /usr/local/bin mkdir -p /usr/src/ifm
COPY / /usr/src/ifm/
RUN /usr/src/ifm/compiler.php --languages=all && \
cp /usr/src/ifm/dist/ifm.php /usr/local/share/webapps/ifm/index.php && \
rm -rf /usr/src/ifm
COPY docker/docker-startup.sh /usr/local/bin
# start php server # start php server
WORKDIR /usr/local/share/webapps/ifm WORKDIR /usr/local/share/webapps/ifm

View File

@@ -6,22 +6,15 @@
* This script compiles all sources into one single file. * This script compiles all sources into one single file.
*/ */
chdir( realpath( dirname( __FILE__ ) ) ); chdir(realpath(dirname(__FILE__)));
// output files and common attrs // output files and common attrs
define( "IFM_CDN", false ); define( "IFM_VERSION", "v2.6.2" );
define( "IFM_VERSION", "<a href='https://github.com/misterunknown/ifm/tree/cryol-2.6.1' target=_blank>v2.6.1</a>" );
define( "IFM_RELEASE_DIR", "dist/"); define( "IFM_RELEASE_DIR", "dist/");
define( "IFM_STANDALONE", "ifm.php" ); define( "IFM_STANDALONE", "ifm.php" );
define( "IFM_STANDALONE_GZ", "ifm.min.php" ); define( "IFM_STANDALONE_GZ", "ifm.min.php" );
define( "IFM_LIB", "libifm.php" ); define( "IFM_LIB", "libifm.php" );
if( IFM_CDN ){
$IFM_ASSETS = "src/assets.cdn.part";
} else {
$IFM_ASSETS = "src/assets.part";
}
// php source files // php source files
$IFM_SRC_PHP = array( $IFM_SRC_PHP = array(
0 => "src/main.php", 0 => "src/main.php",
@@ -30,14 +23,31 @@ $IFM_SRC_PHP = array(
); );
// get options // get options
$options = getopt( null, array( "language::" ) ); $options = getopt(null, array("language::", "languages::", "lang::", "cdn"));
// build CDN version?
if (isset($options['cdn']))
define("IFM_CDN", true);
else
define("IFM_CDN", false);
// process languages // process languages
$vars['languages'] = isset( $options['language'] ) ? explode( ',', $options['language'] ) : array( "en", "ru" ); $langs = [];
$vars['defaultlanguage'] = $vars['languages'][0]; foreach ($options as $key => $value)
if (substr($key, 0, 4) == "lang")
$langs = array_merge($langs, explode(",", $value));
$langs = array_unique($langs);
$vars['default_lang'] = ($langs[0] == "all") ? "en" : $langs[0];
if (in_array("all", $langs))
$langs = array_map(
function($i) { return str_replace("src/i18n/", "", str_replace(".json", "", $i)); },
glob("src/i18n/*.json")
);
$vars['languageincludes'] = ""; $vars['languageincludes'] = "";
foreach( $vars['languages'] as $l ) { foreach ($langs as $l)
if( file_exists( "src/i18n/".$l.".json" ) ) if (file_exists("src/i18n/".$l.".json"))
$vars['languageincludes'] .= $vars['languageincludes'] .=
'$i18n["'.$l.'"] = <<<\'f00bar\'' . "\n" '$i18n["'.$l.'"] = <<<\'f00bar\'' . "\n"
. file_get_contents( "src/i18n/".$l.".json" ) . "\n" . file_get_contents( "src/i18n/".$l.".json" ) . "\n"
@@ -45,11 +55,8 @@ foreach( $vars['languages'] as $l ) {
. '$i18n["'.$l.'"] = json_decode( $i18n["'.$l.'"], true );' . "\n" ; . '$i18n["'.$l.'"] = json_decode( $i18n["'.$l.'"], true );' . "\n" ;
else else
print "WARNING: Language file src/i18n/".$l.".json not found.\n"; print "WARNING: Language file src/i18n/".$l.".json not found.\n";
}
/** // Concat PHP Files
* Concat PHP Files
*/
$compiled = array( "<?php" ); $compiled = array( "<?php" );
foreach( $IFM_SRC_PHP as $phpfile ) { foreach( $IFM_SRC_PHP as $phpfile ) {
$lines = file( $phpfile ); $lines = file( $phpfile );
@@ -58,18 +65,19 @@ foreach( $IFM_SRC_PHP as $phpfile ) {
} }
$compiled = join( $compiled ); $compiled = join( $compiled );
$compiled = str_replace( "IFM_ASSETS", file_get_contents( $IFM_ASSETS ), $compiled ); if( IFM_CDN )
/** $IFM_ASSETS = "src/assets.cdn.part";
* Process file includes else
*/ $IFM_ASSETS = "src/assets.part";
$compiled = str_replace( "IFM_ASSETS", file_get_contents("src/assets".(IFM_CDN?".cdn":"").".part"), $compiled );
// Process file includes
$includes = NULL; $includes = NULL;
preg_match_all( "/\@\@\@file:([^\@]+)\@\@\@/", $compiled, $includes, PREG_SET_ORDER ); preg_match_all( "/\@\@\@file:([^\@]+)\@\@\@/", $compiled, $includes, PREG_SET_ORDER );
foreach( $includes as $file ) foreach( $includes as $file )
$compiled = str_replace( $file[0], file_get_contents( $file[1] ), $compiled ); $compiled = str_replace( $file[0], file_get_contents( $file[1] ), $compiled );
/** // Process ace includes
* Process ace includes
*/
$includes = NULL; $includes = NULL;
$vars['ace_includes'] = ""; $vars['ace_includes'] = "";
preg_match_all( "/\@\@\@acedir:([^\@]+)\@\@\@/", $compiled, $includes, PREG_SET_ORDER ); preg_match_all( "/\@\@\@acedir:([^\@]+)\@\@\@/", $compiled, $includes, PREG_SET_ORDER );
@@ -84,9 +92,7 @@ foreach( $includes as $dir ) {
$compiled = str_replace( $dir[0], $dircontent, $compiled ); $compiled = str_replace( $dir[0], $dircontent, $compiled );
} }
/** // Process variable includes
* Process variable includes
*/
$includes = NULL; $includes = NULL;
preg_match_all( "/\@\@\@vars:([^\@]+)\@\@\@/", $compiled, $includes, PREG_SET_ORDER ); preg_match_all( "/\@\@\@vars:([^\@]+)\@\@\@/", $compiled, $includes, PREG_SET_ORDER );
foreach( $includes as $var ) foreach( $includes as $var )
@@ -99,8 +105,8 @@ if (!is_dir(IFM_RELEASE_DIR)){
} }
// build standalone ifm // build standalone ifm
file_put_contents( IFM_RELEASE_DIR . (IFM_CDN ? 'cdn.' : 'simple.') . IFM_STANDALONE, $compiled ); file_put_contents( IFM_RELEASE_DIR . (IFM_CDN ? 'cdn.' : '') . IFM_STANDALONE, $compiled );
file_put_contents( IFM_RELEASE_DIR . (IFM_CDN ? 'cdn.' : 'simple.') . IFM_STANDALONE, ' file_put_contents( IFM_RELEASE_DIR . (IFM_CDN ? 'cdn.' : '') . IFM_STANDALONE, '
/** /**
* start IFM * start IFM
*/ */
@@ -110,9 +116,9 @@ $ifm->run();
// build compressed ifm // build compressed ifm
file_put_contents( file_put_contents(
IFM_RELEASE_DIR . (IFM_CDN ? 'cdn.' : 'simple.') . IFM_STANDALONE_GZ, IFM_RELEASE_DIR . (IFM_CDN ? 'cdn.' : '') . IFM_STANDALONE_GZ,
'<?php eval( gzdecode( file_get_contents( __FILE__, false, null, 85 ) ) ); exit(0); ?>' '<?php eval( gzdecode( file_get_contents( __FILE__, false, null, 85 ) ) ); exit(0); ?>'
. gzencode( file_get_contents( IFM_RELEASE_DIR . (IFM_CDN ? 'cdn.' : 'simple.') .IFM_STANDALONE, false, null, 5 ) ) . gzencode( file_get_contents( IFM_RELEASE_DIR . (IFM_CDN ? 'cdn.' : '') .IFM_STANDALONE, false, null, 5 ) )
); );
// build lib // build lib
file_put_contents( IFM_RELEASE_DIR . (IFM_CDN ? 'cdn.' : 'simple.') . IFM_LIB, $compiled ); file_put_contents( IFM_RELEASE_DIR . (IFM_CDN ? 'cdn.' : '') . IFM_LIB, $compiled );

View File

@@ -1,3 +0,0 @@
*
!ifm.php
!docker-startup.sh

0
docker/docker-startup.sh Normal file → Executable file
View File

View File

@@ -101,7 +101,7 @@
"toggle_nav": "Переключить вид", "toggle_nav": "Переключить вид",
"upload": "Загрузить", "upload": "Загрузить",
"upload_drop": "Перетащите файлы для загрузки", "upload_drop": "Перетащите файлы для загрузки",
"upload_file": "Загрузить файла", "upload_file": "Загрузить файл",
"upload_remote": "Удаленная загрузка", "upload_remote": "Удаленная загрузка",
"upload_remote_url": "Удаленная загрузка по URL", "upload_remote_url": "Удаленная загрузка по URL",
"username": "Имя пользователя", "username": "Имя пользователя",

View File

@@ -1390,18 +1390,19 @@ function IFM(params) {
if( ! document.querySelector( "footer" ) ) { if( ! document.querySelector( "footer" ) ) {
var newFooter = self.getNodeFromString( Mustache.render( self.templates.footer, { i18n: self.i18n } ) ); var newFooter = self.getNodeFromString( Mustache.render( self.templates.footer, { i18n: self.i18n } ) );
newFooter.addEventListener( 'click', function( e ) { newFooter.addEventListener( 'click', function( e ) {
if( e.target.name == 'showAll' ) { if( e.target.name == 'showAll' || e.target.parentElement.name == "showAll" ) {
if( newFooter.style.maxHeight == '80%' ) { wq = newFooter.children.wq_container.children[0].children.waitqueue;
newFooter.style.maxHeight = '6em'; if( wq.style.maxHeight == '70vh' ) {
newFooter.style.overflow = 'hidden'; wq.style.maxHeight = '6rem';
wq.style.overflow = 'hidden';
} else { } else {
newFooter.style.maxHeight = '80%'; wq.style.maxHeight = '70vh';
newFooter.style.overflow = 'scroll'; wq.style.overflow = 'auto';
} }
} }
}); });
document.body.appendChild( newFooter ); document.body.appendChild( newFooter );
document.body.style.paddingBottom = '6em'; document.body.style.paddingBottom = '9rem';
} }
task.id = "wq-"+task.id; task.id = "wq-"+task.id;
task.type = task.type || "info"; task.type = task.type || "info";

View File

@@ -31,15 +31,17 @@ class IFMArchive {
while (false !== $f = readdir($handle)) { while (false !== $f = readdir($handle)) {
if ($f != '.' && $f != '..') { if ($f != '.' && $f != '..') {
$filePath = $folder . '/' . $f; $filePath = $folder . '/' . $f;
if (file_exists($filePath) && is_readable($filePath)) if (file_exists($filePath) && is_readable($filePath)) {
if (is_file($filePath)) if (is_file($filePath)) {
if (!is_callable($exclude_callback) || $exclude_callback($f)) if (!is_callable($exclude_callback) || $exclude_callback($f))
$archive->addFile( $filePath, substr( $filePath, $offset ) ); $archive->addFile( $filePath, substr( $filePath, $offset ) );
elseif (is_dir($filePath)) } elseif (is_dir($filePath)) {
if (is_callable($exclude_callback)) if (is_callable($exclude_callback))
self::addFolder($archive, $filePath, $offset, $exclude_callback); self::addFolder($archive, $filePath, $offset, $exclude_callback);
else else
self::addFolder($archive, $filePath, $offset); self::addFolder($archive, $filePath, $offset);
}
}
} }
} }
closedir($handle); closedir($handle);
@@ -55,8 +57,6 @@ class IFMArchive {
if (!is_array($src)) if (!is_array($src))
$src = array($src); $src = array($src);
file_put_contents("debug.ifm.log", var_export(is_callable($exclude_callback), true)."\n");
foreach ($src as $s) foreach ($src as $s)
if (is_dir($s)) if (is_dir($s))
if (is_callable($exclude_callback)) if (is_callable($exclude_callback))

View File

@@ -24,7 +24,7 @@ class IFM {
"timezone" => "", "timezone" => "",
"forbiddenChars" => array(), "forbiddenChars" => array(),
"dateLocale" => "en-US", "dateLocale" => "en-US",
"language" => "@@@vars:defaultlanguage@@@", "language" => "@@@vars:default_lang@@@",
"selfoverwrite" => 0, "selfoverwrite" => 0,
// api controls // api controls
@@ -62,7 +62,7 @@ class IFM {
private $config = array(); private $config = array();
private $templates = array(); private $templates = array();
private $i18n = array(); private $i18n = array();
public $mode = ""; public $mode = "standalone";
public function __construct( $config=array() ) { public function __construct( $config=array() ) {
@@ -218,7 +218,7 @@ IFM_ASSETS
<title>IFM - improved file manager</title> <title>IFM - improved file manager</title>
<meta charset="utf-8"> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">'; <meta name="viewport" content="user-scalable=no, width=device-width, initial-scale=1.0, shrink-to-fit=no">';
$this->getCSS(); $this->getCSS();
print '</head><body>'; print '</head><body>';
} }
@@ -972,7 +972,7 @@ IFM_ASSETS
$item = utf8_encode( $item ); $item = utf8_encode( $item );
} }
public function checkAuth() { function checkAuth() {
if( $this->config['auth'] == 0 ) if( $this->config['auth'] == 0 )
return true; return true;
@@ -1080,10 +1080,10 @@ IFM_ASSETS
return false; return false;
} }
private function loginForm($loginFailed=false) { private function loginForm($loginFailed=false, $loginMessage="") {
$err = ""; $err = "";
if( $loginFailed ) if( $loginFailed )
$err = '<div class="alert alert-primary" role="alert">'.$this->l['login_failed'].'</div>'; $err = '<div class="alert alert-danger" role="alert">'.$loginMessage.'</div>';
$this->getHTMLHeader(); $this->getHTMLHeader();
$html = str_replace( "{{error}}", $err, $this->templates['login'] ); $html = str_replace( "{{error}}", $err, $this->templates['login'] );
$html = str_replace( "{{i18n.username}}", $this->l['username'], $html ); $html = str_replace( "{{i18n.username}}", $this->l['username'], $html );
@@ -1177,15 +1177,16 @@ IFM_ASSETS
private function getTypeIcon( $type ) { private function getTypeIcon( $type ) {
$type = strtolower($type); $type = strtolower($type);
switch( $type ) { switch( $type ) {
case "aac": case "aiff": case "mid": case "mp3": case "wav": return 'icon icon-file-audio'; break; case "aac": case "aiff": case "mid": case "mp3": case "wav": return 'icon icon-file-audio'; break;
case "ai": case "bmp": case "eps": case "tiff": case "gif": case "jpg": case "jpeg": case "png": case "psd": return 'icon icon-file-image'; break; case "ai": case "bmp": case "eps": case "tiff": case "gif": case "jpg": case "jpeg": case "png": case "psd": case "svg": return 'icon icon-file-image'; break;
case "avi": case "flv": case "mp4": case "mpg": case "mkv": case "mpeg": case "webm": case "wmv": case "mov": return 'icon icon-file-video'; break; case "avi": case "flv": case "mp4": case "mpg": case "mkv": case "mpeg": case "webm": case "wmv": case "mov": return 'icon icon-file-video'; break;
case "c": case "cpp": case "css": case "dat": case "h": case "html": case "java": case "js": case "php": case "py": case "sql": case "xml": case "yml": return 'icon icon-file-code'; break; case "c": case "cpp": case "css": case "dat": case "h": case "html": case "java": case "js": case "php": case "py": case "sql": case "xml": case "yml": case "json": return 'icon icon-file-code'; break;
case "doc": case "docx": case "odf": case "odt": case "rtf": return 'icon icon-file-word'; break; case "doc": case "docx": case "odf": case "odt": case "rtf": return 'icon icon-file-word'; break;
case "txt": case "log": return 'icon icon-doc-text'; break;
case "ods": case "xls": case "xlsx": return 'icon icon-file-excel'; break; case "ods": case "xls": case "xlsx": return 'icon icon-file-excel'; break;
case "odp": case "ppt": case "pptx": return 'icon icon-file-powerpoint'; break; case "odp": case "ppt": case "pptx": return 'icon icon-file-powerpoint'; break;
case "pdf": return 'icon icon-file-pdf'; break; case "pdf": return 'icon icon-file-pdf'; break;
case "tgz": case "zip": case "tar": case "tgz": case "tar.gz": case "tar.xz": case "tar.bz2": case "7z": case "rar": return 'icon icon-file-archive'; case "tgz": case "zip": case "tar": case "tgz": case "tar.gz": case "tar.xz": case "tar.bz2": case "7z": case "rar": return 'icon icon-file-archive';
default: return 'icon icon-doc'; default: return 'icon icon-doc';
} }
} }

View File

@@ -1,59 +1,75 @@
body { body {
padding-top: 70px; padding-top: 70px;
overflow-y: scroll !important; overflow-y: scroll !important;
} }
a { cursor: pointer !important; } main {
a.ifmitem:focus { outline: 0 } margin-bottom: 1rem;
img.imgpreview { max-width: 100%; }
div#content { width: 100%; height: 350px; } /* is for the ACE editor */
label {
display: inline-block;
margin-bottom: .5rem;
font-weight: 700;
} }
a {
cursor: pointer !important;
}
a.ifmitem:focus {
outline: 0
}
img.imgpreview {
max-width: 100%;
background-repeat: repeat repeat;
background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAAAAACoWZBhAAABI2lDQ1BJQ0MgcHJvZmlsZQAAKJGdkLFKw1AUhr9UsaXYSXEQhwyuBRHM5FIVgqAQYwWrU5qkWExiSFKKb+Cb6MN0EASfwCdQcPa/0cHBLF44/B+Hc/7/3gstOwnTcnkH0qwqXH8wuhxd2e032nTosksvCMt84HknNJ7PVyyjL33j1Tz351mJ4jKULlRZmBcVWPtiZ17lhlWs3w79Q/GD2I7SLBI/ibejNDJsdv00mYU/nuY2q3F2cW76qi1cjjnFw2bMjCkJFX1pps4RDntSl4KAe0pCaUKs3lwzFTeiUk4uB6KhSLdpyNus8zyljOUxlZdJuCOVp8nD/O/32sdZvWltLPKgCOrWkqo1mcD7I/RGsPYM3euGrM7vtzXMOPXMP9/4BdaxUFxWskm6AAAAAmJLR0QAy6Y7OAoAAAAJcEhZcwAALiMAAC4jAXilP3YAAAAiSURBVAjXY/zPwMDAcIaBgYGBiQEOCDJZzjAwMDCYkKoNAPmXAuEuYku0AAAAAElFTkSuQmCC");
}
div#content { /* is for the ACE editor */
width: 100%;
height: 350px;
}
/* label {
display: inline-block;
margin-bottom: .5rem;
font-weight: 700;
} */
/* Make tables more compact (overwrites bootstrap default of 0.75rem) */ /* Make tables more compact (overwrites bootstrap default of 0.75rem) */
.table td, .table th { .table td, .table th {
padding: 0.25rem; padding: 0.25rem;
} }
/* narrow navbar */ /* narrow navbar */
.navbar { .navbar {
padding: 0.3rem; padding: 0.3rem !important;
} }
/* /*
* Icon size * Icon size
*/ */
.icon { .icon {
font-size: 14pt; font-size: 14pt;
} }
@media (max-width: 768px) { @media (max-width: 768px) {
.icon { font-size: 12pt; } .icon { font-size: 12pt; }
#filetable tr th.buttons { min-width: 85px !important; } #filetable tr th.buttons { min-width: 85px !important; }
} }
/* /*
* Filetable related settings * Filetable related settings
*/ */
#filetable th { #filetable th {
border-top: 0; border-top: 0;
} }
#filetable td:nth-child(5), #filetable th:nth-child(5) { #filetable td:nth-child(5), #filetable th:nth-child(5) {
text-align: center; text-align: center;
} }
#filetable td:nth-child(6), #filetable th:nth-child(6) { #filetable td:nth-child(6), #filetable th:nth-child(6) {
text-align: center; text-align: center;
} }
#filetable tr td:last-child { #filetable tr td:last-child {
text-align: right; text-align: right;
} }
#filetable td:last-child a:hover { #filetable td:last-child a:hover {
text-decoration: none; text-decoration: none;
} }
.td-permissions { width: 1px; } .td-permissions { width: 1px; }
@@ -76,53 +92,56 @@ div.ifminfo div.panel div.panel-body { padding: 0px !important; text-align: cen
* Footer / Task-Queue settings * Footer / Task-Queue settings
*/ */
footer { footer {
position: fixed; position: fixed;
padding-top: 1em; padding-top: 1em;
border-top: 1px; border-top: 1px;
background-color: #EEE; background-color: #EEE;
bottom: 0; bottom: 0;
width: 100%; width: 100%;
max-height: 6em; overflow: hidden;
overflow: hidden; }
#waitqueue {
max-height: 6rem;
} }
#waitqueue .progress { #waitqueue .progress {
position: relative; position: relative;
margin-bottom: 0; margin-bottom: 0;
} }
#waitqueue .progbarlabel { #waitqueue .progbarlabel {
position:absolute; position:absolute;
top: 0; top: 0;
left: 10px; left: 10px;
font-weight: bold; font-weight: bold;
} }
/* /*
* File drop overlay * File drop overlay
*/ */
#filedropoverlay { #filedropoverlay {
display: none; display: none;
position: fixed; position: fixed;
top: 0; top: 0;
left: 0; left: 0;
width: 100%; width: 100%;
height: 100%; height: 100%;
text-align: center; text-align: center;
color: #FFF; color: #FFF;
background-color: lightblue; background-color: lightblue;
filter: alpha(opacity=70); filter: alpha(opacity=70);
-moz-opacity: 0.7; -moz-opacity: 0.7;
opacity: 0.7; opacity: 0.7;
z-index: 1000; z-index: 1000;
} }
#filedropoverlay h1 { #filedropoverlay h1 {
border-radius: 5px; border-radius: 5px;
color: #000; color: #000;
position:relative; position:relative;
top:50%; top:50%;
font-size: 6em; font-size: 6em;
pointer-events: none; pointer-events: none;
} }
@@ -130,8 +149,8 @@ footer {
* Datatables related settings * Datatables related settings
*/ */
table.dataTable thead th { table.dataTable thead th {
position: relative; position: relative;
background-image: none !important; background-image: none !important;
} }
/* remove original sort icons */ /* remove original sort icons */
@@ -140,50 +159,54 @@ table.dataTable thead .sorting_asc:before,
table.dataTable thead .sorting_desc:before, table.dataTable thead .sorting_desc:before,
table.dataTable thead .sorting_asc_disabled:before, table.dataTable thead .sorting_asc_disabled:before,
table.dataTable thead .sorting_desc_disabled:before { table.dataTable thead .sorting_desc_disabled:before {
right: 0 !important; right: 0 !important;
content: "" !important; content: "" !important;
} }
/* custom sort icons */ /* custom sort icons */
table.dataTable thead th.sorting:after, table.dataTable thead th.sorting:after,
table.dataTable thead th.sorting_asc:after, table.dataTable thead th.sorting_asc:after,
table.dataTable thead th.sorting_desc:after { table.dataTable thead th.sorting_desc:after {
position: absolute; position: absolute;
top: 6px; top: 6px;
right: 8px; right: 8px;
display: block; display: block;
font-family: fontello; font-family: fontello;
font-size: 0.8em; font-size: 0.8em;
opacity: 1; opacity: 1;
color: #000; color: #000;
} }
table.dataTable thead th.sorting:after { table.dataTable thead th.sorting:after {
content: "\F0DC"; content: "\F0DC";
color: #ddd; color: #ddd;
} }
table.dataTable thead th.sorting_asc:after { table.dataTable thead th.sorting_asc:after {
content: "\f0de"; content: "\f0de";
} }
table.dataTable thead th.sorting_desc:after { table.dataTable thead th.sorting_desc:after {
content: "\f0dd"; content: "\f0dd";
} }
/* /*
* Modal related settings * Modal related settings
*/ */
#copyMoveTree { #copyMoveTree {
max-height: 80vh; max-height: 80vh;
overflow: auto; overflow: auto;
}
.modal-open {
padding-right: 0px !important;
} }
@media (min-width: 576px) { @media (min-width: 576px) {
.modal-dialog { .modal-dialog {
max-width: 600px; max-width: 600px;
margin: 1.75rem auto; margin: 1.75rem auto;
} }
} }
@media (min-width: 992px) { @media (min-width: 992px) {
.modal-lg, .modal-xl { .modal-lg, .modal-xl {
max-width: 800px; max-width: 800px;
} }
} }

View File

@@ -1,108 +1,108 @@
<nav class="navbar navbar-expand-lg navbar-dark <nav class="navbar navbar-expand-lg navbar-dark
{{^config.inline}} {{^config.inline}}
fixed-top fixed-top
{{/config.inline}} bg-dark"> {{/config.inline}} bg-dark">
<div class="container"> <div class="container">
<a class="navbar-brand" href="#">IFM</a> <a class="navbar-brand" href="#">IFM</a>
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="true" aria-label="{{i18n.toggle_nav}}"> <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarCollapse" aria-controls="navbarCollapse" aria-expanded="true" aria-label="{{i18n.toggle_nav}}">
<span class="navbar-toggler-icon"></span> <span class="navbar-toggler-icon"></span>
</button> </button>
<div class="collapse navbar-collapse" id="navbarCollapse"> <div class="collapse navbar-collapse" id="navbarCollapse">
<div class="navbar-nav mr-auto"> <div class="navbar-nav mr-auto">
<form class="form-inline mt-2 mt-md-0"> <form class="form-inline mt-2 mt-md-0">
<div class="input-group"> <div class="input-group">
<div class="input-group-prepend"> <div class="input-group-prepend">
<span class="input-group-text" id="currentDirLabel">{{i18n.path_content}} {{showpath}}</span> <span class="input-group-text" id="currentDirLabel">{{i18n.path_content}} {{showpath}}</span>
</div> </div>
<input class="form-control" id="currentDir" aria-describedby="currentDirLabel" type="text"> <input class="form-control" id="currentDir" aria-describedby="currentDirLabel" type="text">
</div> </div>
</form> </form>
</div> </div>
<ul class="navbar-nav"> <ul class="navbar-nav">
{{#config.showrefresh}} {{#config.showrefresh}}
<li class="nav-item"> <li class="nav-item">
<a id="refresh" class="nav-link"><span title="{{i18n.refresh}}" class="icon icon-arrows-cw" href="#"></span> <span class="d-inline d-sm-none">{{i18n.refresh}}</span></a> <a id="refresh" class="nav-link"><span title="{{i18n.refresh}}" class="icon icon-arrows-cw" href="#"></span> <span class="d-inline d-sm-none">{{i18n.refresh}}</span></a>
</li> </li>
{{/config.showrefresh}} {{/config.showrefresh}}
{{#config.search}} {{#config.search}}
<li class="nav-item"> <li class="nav-item">
<a id="search" class="nav-link"><span title="{{i18n.search}}" class="icon icon-search" href="#"></span> <span class="d-inline d-sm-none">{{i18n.search}}</span></a> <a id="search" class="nav-link"><span title="{{i18n.search}}" class="icon icon-search" href="#"></span> <span class="d-inline d-sm-none">{{i18n.search}}</span></a>
</li> </li>
{{/config.search}} {{/config.search}}
{{#config.upload}} {{#config.upload}}
<li class="nav-item"> <li class="nav-item">
<a id="upload" class="nav-link"><span title="{{i18n.upload}}" class="icon icon-upload" href="#"></span> <span class="d-inline d-sm-none">{{i18n.upload}}</span></a> <a id="upload" class="nav-link"><span title="{{i18n.upload}}" class="icon icon-upload" href="#"></span> <span class="d-inline d-sm-none">{{i18n.upload}}</span></a>
</li> </li>
{{/config.upload}} {{/config.upload}}
{{#config.createfile}} {{#config.createfile}}
<li class="nav-item"> <li class="nav-item">
<a id="createFile" class="nav-link"><span title="{{i18n.file_new}}" class="icon icon-doc-inv" href="#"></span> <span class="d-inline d-sm-none">{{i18n.file_new}}</span></a> <a id="createFile" class="nav-link"><span title="{{i18n.file_new}}" class="icon icon-doc-inv" href="#"></span> <span class="d-inline d-sm-none">{{i18n.file_new}}</span></a>
</li> </li>
{{/config.createfile}} {{/config.createfile}}
{{#config.createdir}} {{#config.createdir}}
<li class="nav-item"> <li class="nav-item">
<a id="createDir" class="nav-link"><span title="{{i18n.folder_new}}" class="icon icon-folder" href="#"></span> <span class="d-inline d-sm-none">{{i18n.folder_new}}</span></a> <a id="createDir" class="nav-link"><span title="{{i18n.folder_new}}" class="icon icon-folder" href="#"></span> <span class="d-inline d-sm-none">{{i18n.folder_new}}</span></a>
</li> </li>
{{/config.createdir}} {{/config.createdir}}
<li class="nav-item dropdown"> <li class="nav-item dropdown">
<a class="nav-link dropdown-toggle" href="#" id="menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></a> <a class="nav-link dropdown-toggle" href="#" id="menu" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false"></a>
<div class="dropdown-menu" aria-labelledby="menu"> <div class="dropdown-menu dropdown-menu-right" aria-labelledby="menu">
{{#config.remoteupload}} {{#config.remoteupload}}
<a class="dropdown-item" href="#" id="buttonRemoteUpload"><span class="icon icon-upload-cloud"></span> {{i18n.upload_remote}}</a> <a class="dropdown-item" href="#" id="buttonRemoteUpload"><span class="icon icon-upload-cloud"></span> {{i18n.upload_remote}}</a>
{{/config.remoteupload}} {{/config.remoteupload}}
{{#config.ajaxrequest}} {{#config.ajaxrequest}}
<a class="dropdown-item" href="#" id="buttonAjaxRequest"><span class="icon icon-link-ext"></span> {{i18n.ajax_request}}</a> <a class="dropdown-item" href="#" id="buttonAjaxRequest"><span class="icon icon-link-ext"></span> {{i18n.ajax_request}}</a>
{{/config.ajaxrequest}} {{/config.ajaxrequest}}
{{#config.auth}} {{#config.auth}}
<a class="dropdown-item" href="?api=logout" id="buttonLogout"><span class="icon icon-logout"></span> {{i18n.logout}}</a> <a class="dropdown-item" href="?api=logout" id="buttonLogout"><span class="icon icon-logout"></span> {{i18n.logout}}</a>
{{/config.auth}} {{/config.auth}}
</div> </div>
</li> </li>
</ul> </ul>
</div> </div>
</div> </div>
</nav> </nav>
<div id="filedropoverlay"> <div id="filedropoverlay">
<h1>{{i18n.upload_drop}}</h1> <h1>{{i18n.upload_drop}}</h1>
</div> </div>
<main role="main"> <main role="main">
<div class="container"> <div class="container">
<table id="filetable" class="table"> <table id="filetable" class="table">
<thead> <thead>
<tr> <tr>
<th class="th-meta hidden" data-visible="false"></th> <th class="th-meta hidden" data-visible="false"></th>
<th class="th-filename">{{i18n.filename}}</th> <th class="th-filename">{{i18n.filename}}</th>
{{#config.download}} {{#config.download}}
<th class="th-download"></th> <th class="th-download"></th>
{{/config.download}} {{/config.download}}
{{#config.showlastmodified}} {{#config.showlastmodified}}
<th class="th-lastmod">{{i18n.last_modified}}</th> <th class="th-lastmod">{{i18n.last_modified}}</th>
{{/config.showlastmodified}} {{/config.showlastmodified}}
{{#config.showfilesize}} {{#config.showfilesize}}
<th class="th-size">{{i18n.size}}</th> <th class="th-size">{{i18n.size}}</th>
{{/config.showfilesize}} {{/config.showfilesize}}
{{#config.showpermissions}} {{#config.showpermissions}}
<th class="th-permissions d-none d-md-table-cell">{{i18n.permissions}}</th> <th class="th-permissions d-none d-md-table-cell">{{i18n.permissions}}</th>
{{/config.showpermissions}} {{/config.showpermissions}}
{{#config.showowner}} {{#config.showowner}}
<th class="th-owner d-none d-lg-table-cell">{{i18n.owner}}</th> <th class="th-owner d-none d-lg-table-cell">{{i18n.owner}}</th>
{{/config.showowner}} {{/config.showowner}}
{{#config.showgroup}} {{#config.showgroup}}
<th class="th-group d-none d-xl-table-cell">{{i18n.group}}</th> <th class="th-group d-none d-xl-table-cell">{{i18n.group}}</th>
{{/config.showgroup}} {{/config.showgroup}}
<th class="th-buttons buttons"></th> <th class="th-buttons buttons"></th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
</tbody> </tbody>
</table> </table>
</div> </div>
<div class="container"> <div class="container">
<div class="card ifminfo"> <div class="card ifminfo">
<div class="card-body p-2"> <div class="card-body p-2">
<div style="float:left; padding-left: 10px;">{{i18n.footer}} IFM_VERSION</div> <div style="float:left; padding-left: 10px;">{{i18n.footer}} <a href='https://github.com/misterunknown/ifm/tree/IFM_VERSION' target=_blank>IFM_VERSION</a></div>
<a style="float:right; padding-right: 10px;" href="http://github.com/misterunknown/ifm">{{i18n.github}}</a> <a style="float:right; padding-right: 10px;" href="http://github.com/misterunknown/ifm" target="_blank">{{i18n.github}}</a>
</div> </div>
</div> </div>
</div> </div>
</main> </main>

View File

@@ -1,11 +1,11 @@
<footer class="footer mt-auto py-3"> <footer class="footer mt-auto py-3">
<div class="container"> <div id="wq_container" class="container">
<div class="row"> <div class="row">
<div class="col-1"> <div class="col-md-2 mb-1">
<a type="button" class="btn btn-light" name="showAll">{{i18n.tasks}} <span class="badge badge-secondary" name="taskCount">1</span></a> <a type="button" class="btn btn-light btn-block" name="showAll">{{i18n.tasks}} <span class="badge badge-secondary" name="taskCount">1</span></a>
</div> </div>
<div id="waitqueue" class="col-11"> <div id="waitqueue" class="col-md-10">
</div> </div>
</div> </div>
</div> </div>
</footer> </footer>

View File

@@ -107,6 +107,7 @@ body {
<div class="text-center mb-4"> <div class="text-center mb-4">
<h1 class="h3 mb-3 font-weight-normal">IFM {{i18n.login}}</h1> <h1 class="h3 mb-3 font-weight-normal">IFM {{i18n.login}}</h1>
</div> </div>
{{error}}
<div class="form-label-group"> <div class="form-label-group">
<input type="text" name="inputLogin" id="inputLogin" class="form-control" placeholder="{{i18n.username}}" required="" autofocus=""> <input type="text" name="inputLogin" id="inputLogin" class="form-control" placeholder="{{i18n.username}}" required="" autofocus="">
<label for="inputLogin">{{i18n.username}}</label> <label for="inputLogin">{{i18n.username}}</label>
@@ -115,6 +116,8 @@ body {
<input type="password" name="inputPassword" id="inputPassword" class="form-control" placeholder="{{i18n.password}}" required=""> <input type="password" name="inputPassword" id="inputPassword" class="form-control" placeholder="{{i18n.password}}" required="">
<label for="inputPassword">{{i18n.password}}</label> <label for="inputPassword">{{i18n.password}}</label>
</div> </div>
<div class="alert alert-danger d-none" role="alert"></div>
<button class="btn btn-lg btn-primary btn-block" type="submit">{{i18n.login}}</button> <button class="btn btn-lg btn-primary btn-block" type="submit">{{i18n.login}}</button>
</form> </form>

View File

@@ -1,16 +1,31 @@
<form id="formAjaxRequest"> <form id="formAjaxRequest">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>URL</label><br> <div class="form-group">
<input class="form-control" type="text" id="ajaxurl" required><br> <label for="ajaxurl">URL</label>
<label>{{i18n.data}}</label><br> <input class="form-control" type="url" id="ajaxurl" required>
<textarea class="form-control" id="ajaxdata"></textarea><br> </div>
<label>{{i18n.method}}</label><br> <div class="form-group">
<input type="radio" name="arMethod" value="GET">GET</input><input type="radio" name="arMethod" value="POST" checked="checked">POST</input><br> <label for="ajaxdata">{{i18n.data}}</label>
<textarea class="form-control" id="ajaxdata"></textarea>
</div>
<div class="form-group">
<legend>{{i18n.method}}</legend>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="radioget" name="arMethod" value="GET">
<label class="form-check-label" for="radioget">GET</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="radiopost" name="arMethod" value="POST" checked="checked">
<label class="form-check-label" for="radiopost">POST</label>
</div>
</div>
<button type="button" class="btn btn-success" id="buttonRequest">{{i18n.request}}</button> <button type="button" class="btn btn-success" id="buttonRequest">{{i18n.request}}</button>
<button type="button" class="btn btn-secondary" id="buttonClose">{{i18n.cancel}}</button><br> <button type="button" class="btn btn-danger" id="buttonClose">{{i18n.cancel}}</button>
<label>{{i18n.response}}</label><br> <div class="form-group">
<textarea class="form-control" id="ajaxresponse"></textarea> <label for="ajaxresponse">{{i18n.response}}</label>
<textarea class="form-control" id="ajaxresponse"></textarea>
</div>
</fieldset> </fieldset>
</form>
</div> </div>
</form>

View File

@@ -1,13 +1,15 @@
<form id="formCopyMove"> <form id="formCopyMove">
<fieldset> <fieldset>
<div class="modal-body"> <div class="modal-body">
<label>{{i18n.select_destination}}:</label> <div class="form-group">
<div id="copyMoveTree"><div class="text-center"><span class="icon icon-spin5 animate-spin"></span></div></div> <label for="copyMoveTree">{{i18n.select_destination}}:</label>
<div id="copyMoveTree"><div class="text-center"><span class="icon icon-spin5 animate-spin"></span></div></div>
</div>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" id="copyButton">{{i18n.copy}}</button> <button type="button" class="btn btn-secondary" id="copyButton">{{i18n.copy}}</button>
<button type="button" class="btn btn-secondary" id="moveButton">{{i18n.move}}</button> <button type="button" class="btn btn-secondary" id="moveButton">{{i18n.move}}</button>
<button type="button" class="btn btn-secondary" id="cancelButton">{{i18n.cancel}}</button> <button type="button" class="btn btn-danger" id="cancelButton">{{i18n.cancel}}</button>
</div> </div>
</fieldset> </fieldset>
</form> </form>

View File

@@ -1,12 +1,14 @@
<form id="formCreateArchive"> <form id="formCreateArchive">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>{{i18n.archivename}}:</label> <div class="form-group">
<input class="form-control" type="text" name="archivename" value="" /> <label for="archivename">{{i18n.archivename}}:</label>
<input id="archivename" class="form-control" type="text" name="archivename" value="" />
</div>
</fieldset> </fieldset>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" id="buttonSave">{{i18n.save}}</button> <button type="button" class="btn btn-success" id="buttonSave">{{i18n.save}}</button>
<button type="button" class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}}</button> <button type="button" class="btn btn-danger" id="buttonCancel">{{i18n.cancel}}</button>
</div> </div>
</form> </form>

View File

@@ -1,12 +1,14 @@
<form id="formCreateDir"> <form id="formCreateDir">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>{{i18n.directoryname}}:</label> <div class="form-group">
<input class="form-control" type="text" name="dirname" value="" /> <label for="dirname">{{i18n.directoryname}}:</label>
<input class="form-control" id="dirname" type="text" name="dirname" value="" />
</div>
</fieldset> </fieldset>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" id="buttonSave">{{i18n.save}}</button> <button type="button" class="btn btn-success" id="buttonSave">{{i18n.save}}</button>
<button type="button" class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}}</button> <button type="button" class="btn btn-danger" id="buttonCancel">{{i18n.cancel}}</button>
</div> </div>
</form> </form>

View File

@@ -1,29 +1,37 @@
<form id="formExtractFile"> <form id="formExtractFile">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>{{i18n.extract_filename}} {{filename}}:</label> <div class="form-group">
<div class="input-group"> <label>{{i18n.extract_filename}} {{filename}}:</label>
<div class="input-group-prepend"> <div class="input-group">
<span class="input-group-text"><input type="radio" name="extractTargetLocation" value="./" checked="checked"></span> <div class="input-group-prepend">
<div class="input-group-text">
<input type="radio" name="extractTargetLocation" value="./" checked="checked">
</div>
</div>
<input class="form-control" type="text" placeholder="./" readonly>
</div> </div>
<span class="form-control">./</span> <div class="input-group">
</div> <div class="input-group-prepend">
<div class="input-group"> <div class="input-group-text">
<div class="input-group-prepend"> <input type="radio" name="extractTargetLocation" value="./{{destination}}">
<span class="input-group-text"><input type="radio" name="extractTargetLocation" value="./{{destination}}"></span> </div>
</div>
<input class="form-control" type="text" placeholder="./{{destination}}" readonly>
</div> </div>
<span class="form-control">./{{destination}}</span> <div class="input-group">
</div> <div class="input-group-prepend">
<div class="input-group"> <div class="input-group-text">
<div class="input-group-prepend"> <input type="radio" name="extractTargetLocation" value="custom">
<span class="input-group-text"><input type="radio" name="extractTargetLocation" value="custom"></span> </div>
</div>
<input id="extractCustomLocation" type="text" class="form-control" placeholder="custom location" value="">
</div> </div>
<input id="extractCustomLocation" type="text" class="form-control" placeholder="custom location" value="">
</div> </div>
</fieldset> </fieldset>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" id="buttonExtract">{{i18n.extract}}</button> <button type="button" class="btn btn-primary" id="buttonExtract">{{i18n.extract}}</button>
<button type="button" class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}}</button> <button type="button" class="btn btn-danger" id="buttonCancel">{{i18n.cancel}}</button>
</div> </div>
</form> </form>

View File

@@ -1,15 +1,17 @@
<form id="formFile"> <form id="formFile">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>{{i18n.filename}}:</label> <div class="form-group">
<input type="text" class="form-control" name="filename" value="{{filename}}"><br> <label for="filename">{{i18n.filename}}:</label>
<div id="content" name="content"></div><br> <input type="text" class="form-control" name="filename" id="filename" value="{{filename}}">
</div>
<div class="form-group" id="content" name="content"></div>
<button type="button" class="btn btn-secondary" id="editoroptions">{{i18n.editor_options}}</button> <button type="button" class="btn btn-secondary" id="editoroptions">{{i18n.editor_options}}</button>
</fieldset> </fieldset>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" id="buttonSave" class="btn btn-secondary">{{i18n.save}}</button> <button type="button" id="buttonSave" class="btn btn-primary">{{i18n.save}}</button>
<button type="button" id="buttonSaveNotClose" class="btn btn-secondary">{{i18n.save_wo_close}}</button> <button type="button" id="buttonSaveNotClose" class="btn btn-success">{{i18n.save_wo_close}}</button>
<button type="button" id="buttonClose" class="btn btn-secondary">{{i18n.close}}</button> <button type="button" id="buttonClose" class="btn btn-danger">{{i18n.close}}</button>
</div> </div>
</form> </form>

View File

@@ -1,27 +1,33 @@
<div> <form>
<div class="form-check p-0"> <div class="form-group">
<input type="checkbox" id="editor-wordwrap" <div class="form-check">
{{#wordwrap}} <input class="form-check-input" type="checkbox" id="editor-wordwrap"
checked="checked" {{#wordwrap}}
{{/wordwrap}} checked="checked"
> {{/wordwrap}}
<label class="form-check-label" for="editor-wordwrap">{{i18n.word_wrap}}</label> >
</div> <label class="form-check-label" for="editor-wordwrap">{{i18n.word_wrap}}</label>
<div class="form-check"> </div>
<input class="form-check-input" type="checkbox" id="editor-softtabs" <div class="form-check">
{{#softtabs}} <input class="form-check-input" type="checkbox" id="editor-softtabs"
checked="checked" {{#softtabs}}
{{/softtabs}} checked="checked"
> {{/softtabs}}
<label class="form-check-label" for="editor-softtabs">{{i18n.soft_tabs}}</label> >
</div> <label class="form-check-label" for="editor-softtabs">{{i18n.soft_tabs}}</label>
<div class="input-group"> </div>
<div class="input-group-prepend"><span class="input-group-text">{{i18n.tab_size}}</span></div><input class="form-control" type="text" size="2" id="editor-tabsize" title="{{i18n.tab_size}}" value="{{tabsize}}"></div> </div>
{{#ace_includes}} <div class="input-group">
<select class="form-control selectpicker" data-toggle="dropdown" data-live-search="true" data-size="15" id="editor-syntax"> <div class="input-group-prepend">
{{#modes}} <span class="input-group-text" id="editor-tabsize-label">{{i18n.tab_size}}</span>
<option value="ace/mode/{{.}}" {{{ace_mode_selected}}}>{{.}}</option> </div>
{{/modes}} <input class="form-control" type="number" min="1" max="9" maxlength="1" id="editor-tabsize" title="{{i18n.tab_size}}" value="{{tabsize}}" aria-describedby="editor-tabsize-label">
</select> </div>
{{/ace_includes}} {{#ace_includes}}
</div> <select class="form-control selectpicker" data-toggle="dropdown" data-live-search="true" data-size="15" id="editor-syntax">
{{#modes}}
<option value="ace/mode/{{.}}" {{{ace_mode_selected}}}>{{.}}</option>
{{/modes}}
</select>
{{/ace_includes}}
</form>

View File

@@ -1,16 +1,29 @@
<form id="formRemoteUpload"> <form id="formRemoteUpload">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>{{i18n.upload_remote_url}}</label><br> <div class="form-group">
<input class="form-control" type="text" id="url" name="url" required><br> <label for="url">{{i18n.upload_remote_url}}</label>
<label>{{i18n.filename}}</label> <input class="form-control" type="url" id="url" name="url" required>
<input class="form-control" type="text" id="filename" name="filename" required><br> </div>
<label>{{i18n.method}}</label> <div class="form-group">
<input type="radio" name="method" value="curl" checked="checked">cURL<input type="radio" name="method" value="file">file</input><br> <label for="filename">{{i18n.filename}}</label>
<input class="form-control" type="text" id="filename" name="filename" required>
</div>
<div class="form-group">
<legend>{{i18n.method}}</legend>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="radiocurl" name="method" value="curl" checked="checked">
<label class="form-check-label" for="radiocurl">cURL</label>
</div>
<div class="form-check form-check-inline">
<input class="form-check-input" type="radio" id="radiofile" name="method" value="file">
<label class="form-check-label" for="radiofile">file</label>
</div>
</div>
</fieldset> </fieldset>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" id="buttonUpload">{{i18n.upload}}</button> <button type="button" class="btn btn-primary" id="buttonUpload">{{i18n.upload}}</button>
<button type="button" class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}}</button> <button type="button" class="btn btn-danger" id="buttonCancel">{{i18n.cancel}}</button>
</div> </div>
</form> </form>

View File

@@ -1,12 +1,14 @@
<form id="formRenameFile"> <form id="formRenameFile">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>{{i18n.rename_filename}} {{filename}}:</label> <div class="form-group">
<input class="form-control" type="text" name="newname" value="" /><br> <label for="newname">{{i18n.rename_filename}} {{filename}}:</label>
<input id="newname" class="form-control" type="text" name="newname" value="" />
</div>
</fieldset> </fieldset>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary" id="buttonRename">{{i18n.file_rename}}</button> <button type="button" class="btn btn-secondary" id="buttonRename">{{i18n.file_rename}}</button>
<button type="button" class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}} </button> <button type="button" class="btn btn-danger" id="buttonCancel">{{i18n.cancel}} </button>
</div> </div>
</form> </form>

View File

@@ -1,8 +1,10 @@
<form id="searchForm"> <form id="searchForm">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>{{i18n.search_pattern}}:</label> <div class="form-group">
<input type="text" class="form-control" id="searchPattern" name="pattern" autocomplete="off" value="{{lastSearch}}"><br> <label for="searchPattern">{{i18n.search_pattern}}:</label>
<input type="search" class="form-control" id="searchPattern" name="pattern" autocomplete="off" value="{{lastSearch}}">
</div>
<table id="searchResults" class="table"> <table id="searchResults" class="table">
</table> </table>
</fieldset> </fieldset>

View File

@@ -1,14 +1,20 @@
<form id="formUploadFile"> <form id="formUploadFile">
<div class="modal-body"> <div class="modal-body">
<fieldset> <fieldset>
<label>{{i18n.upload_file}}</label><br> <div class="form-group">
<input class="form-control-file" type="file" name="files" multiple><br> <div class="custom-file">
<label>{{i18n.filename_new}}</label> <label class="custom-file-label" for="fileselect">{{i18n.upload_file}}</label>
<input class="form-control" type="text" name="newfilename"><br> <input class="custom-file-input" type="file" name="files" id="fileselect" multiple>
</div>
</div>
<div class="form-group">
<label for="filename">{{i18n.filename_new}}</label>
<input class="form-control" type="text" name="newfilename" id="filename">
</div>
</fieldset> </fieldset>
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button class="btn btn-secondary" id="buttonUpload">{{i18n.upload}}</button> <button class="btn btn-primary" id="buttonUpload">{{i18n.upload}}</button>
<button class="btn btn-secondary" id="buttonCancel">{{i18n.cancel}}</button> <button class="btn btn-danger" id="buttonCancel">{{i18n.cancel}}</button>
</div> </div>
</form> </form>

View File

@@ -1,9 +1,9 @@
<div id="{{id}}" class="card"> <div id="{{id}}" class="card mb-1">
<div class="card-body"> <div class="card-body">
<div class="progress"> <div class="progress">
<div class="progress-bar bg-{{type}} progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemax="100" style="width:100%"> <div class="progress-bar bg-{{type}} progress-bar-striped active" role="progressbar" aria-valuenow="100" aria-valuemax="100" style="width:100%">
{{name}} {{name}}
</div> </div>
</div>
</div> </div>
</div> </div>
</div>