mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-06-10 09:52:15 +02:00
Improve embed and UI issues
This commit is contained in:
parent
89fb960679
commit
c413573952
|
@ -64,6 +64,9 @@ $GLOBALS['exclude_items'] = array();
|
||||||
// Google Docs Viewer
|
// Google Docs Viewer
|
||||||
$GLOBALS['online_viewer'] = true;
|
$GLOBALS['online_viewer'] = true;
|
||||||
|
|
||||||
|
//Sticky Nav bar
|
||||||
|
$sticky_navbar = true;
|
||||||
|
|
||||||
// private key and session name to store to the session
|
// private key and session name to store to the session
|
||||||
if ( !defined( 'FM_SESSION_ID')) {
|
if ( !defined( 'FM_SESSION_ID')) {
|
||||||
define('FM_SESSION_ID', 'filemanager');
|
define('FM_SESSION_ID', 'filemanager');
|
||||||
|
@ -105,6 +108,7 @@ setcookie('fm_cache', true, 2147483647, "/");
|
||||||
// if fm included
|
// if fm included
|
||||||
if (defined('FM_EMBED')) {
|
if (defined('FM_EMBED')) {
|
||||||
$use_auth = false;
|
$use_auth = false;
|
||||||
|
$sticky_navbar = false;
|
||||||
} else {
|
} else {
|
||||||
@set_time_limit(600);
|
@set_time_limit(600);
|
||||||
|
|
||||||
|
@ -1049,8 +1053,8 @@ if (isset($_GET['settings']) && !FM_READONLY) {
|
||||||
<form id="js-settings-form" action="" method="post" data-type="ajax" onsubmit="return save_settings(this)">
|
<form id="js-settings-form" action="" method="post" data-type="ajax" onsubmit="return save_settings(this)">
|
||||||
<input type="hidden" name="type" value="settings" aria-label="hidden" aria-hidden="true">
|
<input type="hidden" name="type" value="settings" aria-label="hidden" aria-hidden="true">
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="js-language" class="col-sm-2 col-form-label"><?php echo lng('Language') ?></label>
|
<label for="js-language" class="col-sm-3 col-form-label"><?php echo lng('Language') ?></label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-9">
|
||||||
<select class="form-control" id="js-language" name="js-language">
|
<select class="form-control" id="js-language" name="js-language">
|
||||||
<?php
|
<?php
|
||||||
function getSelected($l) {
|
function getSelected($l) {
|
||||||
|
@ -1077,8 +1081,8 @@ if (isset($_GET['settings']) && !FM_READONLY) {
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="js-err-rpt-1" class="col-sm-2 col-form-label">Error Reporting</label>
|
<label for="js-err-rpt-1" class="col-sm-3 col-form-label">Error Reporting</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-9">
|
||||||
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||||
<label class="btn btn-secondary <?php echo getChecked($report_errors, 1, 'active') ?>">
|
<label class="btn btn-secondary <?php echo getChecked($report_errors, 1, 'active') ?>">
|
||||||
<input type="radio" name="js-error-report" id="js-err-rpt-1" autocomplete="off" value="true" <?php echo getChecked($report_errors, 1, 'checked') ?> > ON
|
<input type="radio" name="js-error-report" id="js-err-rpt-1" autocomplete="off" value="true" <?php echo getChecked($report_errors, 1, 'checked') ?> > ON
|
||||||
|
@ -1091,8 +1095,8 @@ if (isset($_GET['settings']) && !FM_READONLY) {
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group row">
|
<div class="form-group row">
|
||||||
<label for="js-hdn-1" class="col-sm-2 col-form-label">Show Hidden Files</label>
|
<label for="js-hdn-1" class="col-sm-3 col-form-label">Show Hidden Files</label>
|
||||||
<div class="col-sm-10">
|
<div class="col-sm-9">
|
||||||
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||||
<label class="btn btn-secondary <?php echo getChecked($show_hidden_files, 1, 'active') ?>">
|
<label class="btn btn-secondary <?php echo getChecked($show_hidden_files, 1, 'active') ?>">
|
||||||
<input type="radio" name="js-show-hidden" id="js-hdn-1" autocomplete="off" value="true" <?php echo getChecked($show_hidden_files, 1, 'checked') ?> > ON
|
<input type="radio" name="js-show-hidden" id="js-hdn-1" autocomplete="off" value="true" <?php echo getChecked($show_hidden_files, 1, 'checked') ?> > ON
|
||||||
|
@ -1681,26 +1685,30 @@ $all_files_size = 0;
|
||||||
?>
|
?>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<?php if (!FM_READONLY): ?>
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-xs-12 col-sm-9">
|
|
||||||
<ul class="list-inline footer-action">
|
|
||||||
<li class="list-inline-item"> <a href="#/select-all" class="btn btn-small btn-outline-primary btn-2" onclick="select_all();return false;"><i class="fa fa-check-square"></i> <?php echo lng('SelectAll') ?> </a></li>
|
|
||||||
<li class="list-inline-item"><a href="#/unselect-all" class="btn btn-small btn-outline-primary btn-2" onclick="unselect_all();return false;"><i class="fa fa-window-close"></i> <?php echo lng('UnSelectAll') ?> </a></li>
|
|
||||||
<li class="list-inline-item"><a href="#/invert-all" class="btn btn-small btn-outline-primary btn-2" onclick="invert_all();return false;"><i class="fa fa-th-list"></i> <?php echo lng('InvertSelection') ?> </a></li>
|
|
||||||
<li class="list-inline-item"><input type="submit" class="hidden" name="delete" id="a-delete" value="Delete" onclick="return confirm('Delete selected files and folders?')">
|
|
||||||
<a href="javascript:document.getElementById('a-delete').click();" class="btn btn-small btn-outline-primary btn-2"><i class="fa fa-trash"></i> <?php echo lng('Delete') ?> </a></li>
|
|
||||||
<li class="list-inline-item"><input type="submit" class="hidden" name="zip" id="a-zip" value="zip" onclick="return confirm('Create archive?')">
|
|
||||||
<a href="javascript:document.getElementById('a-zip').click();" class="btn btn-small btn-outline-primary btn-2"><i class="fa fa-file-archive-o"></i> <?php echo lng('Zip') ?> </a></li>
|
|
||||||
<li class="list-inline-item"><input type="submit" class="hidden" name="tar" id="a-tar" value="tar" onclick="return confirm('Create archive?')">
|
|
||||||
<a href="javascript:document.getElementById('a-tar').click();" class="btn btn-small btn-outline-primary btn-2"><i class="fa fa-file-archive-o"></i> <?php echo lng('Tar') ?> </a></li>
|
|
||||||
<li class="list-inline-item"><input type="submit" class="hidden" name="copy" id="a-copy" value="Copy">
|
|
||||||
<a href="javascript:document.getElementById('a-copy').click();" class="btn btn-small btn-outline-primary btn-2"><i class="fa fa-files-o"></i> <?php echo lng('Copy') ?> </a></li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
<div class="col-3 d-none d-sm-block"><a href="https://tinyfilemanager.github.io" target="_blank" class="float-right" style="color:silver">Tiny File Manager v2.2</a></div>
|
|
||||||
|
|
||||||
<?php endif; ?>
|
<div class="row">
|
||||||
|
<?php if (!FM_READONLY): ?>
|
||||||
|
<div class="col-xs-12 col-sm-9">
|
||||||
|
<ul class="list-inline footer-action">
|
||||||
|
<li class="list-inline-item"> <a href="#/select-all" class="btn btn-small btn-outline-primary btn-2" onclick="select_all();return false;"><i class="fa fa-check-square"></i> <?php echo lng('SelectAll') ?> </a></li>
|
||||||
|
<li class="list-inline-item"><a href="#/unselect-all" class="btn btn-small btn-outline-primary btn-2" onclick="unselect_all();return false;"><i class="fa fa-window-close"></i> <?php echo lng('UnSelectAll') ?> </a></li>
|
||||||
|
<li class="list-inline-item"><a href="#/invert-all" class="btn btn-small btn-outline-primary btn-2" onclick="invert_all();return false;"><i class="fa fa-th-list"></i> <?php echo lng('InvertSelection') ?> </a></li>
|
||||||
|
<li class="list-inline-item"><input type="submit" class="hidden" name="delete" id="a-delete" value="Delete" onclick="return confirm('Delete selected files and folders?')">
|
||||||
|
<a href="javascript:document.getElementById('a-delete').click();" class="btn btn-small btn-outline-primary btn-2"><i class="fa fa-trash"></i> <?php echo lng('Delete') ?> </a></li>
|
||||||
|
<li class="list-inline-item"><input type="submit" class="hidden" name="zip" id="a-zip" value="zip" onclick="return confirm('Create archive?')">
|
||||||
|
<a href="javascript:document.getElementById('a-zip').click();" class="btn btn-small btn-outline-primary btn-2"><i class="fa fa-file-archive-o"></i> <?php echo lng('Zip') ?> </a></li>
|
||||||
|
<li class="list-inline-item"><input type="submit" class="hidden" name="tar" id="a-tar" value="tar" onclick="return confirm('Create archive?')">
|
||||||
|
<a href="javascript:document.getElementById('a-tar').click();" class="btn btn-small btn-outline-primary btn-2"><i class="fa fa-file-archive-o"></i> <?php echo lng('Tar') ?> </a></li>
|
||||||
|
<li class="list-inline-item"><input type="submit" class="hidden" name="copy" id="a-copy" value="Copy">
|
||||||
|
<a href="javascript:document.getElementById('a-copy').click();" class="btn btn-small btn-outline-primary btn-2"><i class="fa fa-files-o"></i> <?php echo lng('Copy') ?> </a></li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
<div class="col-3 d-none d-sm-block"><a href="https://tinyfilemanager.github.io" target="_blank" class="float-right text-muted">Tiny File Manager v2.2</a></div>
|
||||||
|
<?php else: ?>
|
||||||
|
<div class="col-12"><a href="https://tinyfilemanager.github.io" target="_blank" class="float-right text-muted">Tiny File Manager v2.2</a></div>
|
||||||
|
<?php endif; ?>
|
||||||
|
</div>
|
||||||
|
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
|
@ -2580,9 +2588,10 @@ class FM_Zipper_Tar
|
||||||
*/
|
*/
|
||||||
function fm_show_nav_path($path)
|
function fm_show_nav_path($path)
|
||||||
{
|
{
|
||||||
global $lang;
|
global $lang, $sticky_navbar;
|
||||||
|
$isStickyNavBar = $sticky_navbar ? 'fixed-top' : '';
|
||||||
?>
|
?>
|
||||||
<nav class="navbar navbar-expand-lg fixed-top navbar-light bg-white mb-4 main-nav">
|
<nav class="navbar navbar-expand-lg navbar-light bg-white mb-4 main-nav <?php echo $isStickyNavBar ?>">
|
||||||
<a class="navbar-brand" href=""> <?php echo lng('AppTitle') ?> </a>
|
<a class="navbar-brand" href=""> <?php echo lng('AppTitle') ?> </a>
|
||||||
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
|
||||||
<span class="navbar-toggler-icon"></span>
|
<span class="navbar-toggler-icon"></span>
|
||||||
|
@ -2737,7 +2746,8 @@ header("Expires: Sat, 26 Jul 1997 05:00:00 GMT");
|
||||||
header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
|
header("Cache-Control: no-store, no-cache, must-revalidate, post-check=0, pre-check=0");
|
||||||
header("Pragma: no-cache");
|
header("Pragma: no-cache");
|
||||||
|
|
||||||
global $lang;
|
global $lang, $sticky_navbar;
|
||||||
|
$isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
|
||||||
?>
|
?>
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
|
@ -2757,11 +2767,13 @@ global $lang;
|
||||||
<?php endif; ?>
|
<?php endif; ?>
|
||||||
<style>
|
<style>
|
||||||
body {
|
body {
|
||||||
margin-top: 55px;
|
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
color: #222;
|
color: #222;
|
||||||
background: #F7F7F7;
|
background: #F7F7F7;
|
||||||
}
|
}
|
||||||
|
body.navbar-fixed {
|
||||||
|
margin-top: 55px;
|
||||||
|
}
|
||||||
a:hover, a:visited, a:focus {
|
a:hover, a:visited, a:focus {
|
||||||
text-decoration: none !important;
|
text-decoration: none !important;
|
||||||
}
|
}
|
||||||
|
@ -3078,7 +3090,7 @@ global $lang;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="<?php echo $isStickyNavBar; ?>">
|
||||||
<div id="wrapper" class="container-fluid">
|
<div id="wrapper" class="container-fluid">
|
||||||
|
|
||||||
<!-- New Item creation -->
|
<!-- New Item creation -->
|
||||||
|
|
Loading…
Reference in a new issue