mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2025-01-18 06:38:37 +01: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
|
||||
$GLOBALS['online_viewer'] = true;
|
||||
|
||||
//Sticky Nav bar
|
||||
$sticky_navbar = true;
|
||||
|
||||
// private key and session name to store to the session
|
||||
if ( !defined( 'FM_SESSION_ID')) {
|
||||
define('FM_SESSION_ID', 'filemanager');
|
||||
@ -105,6 +108,7 @@ setcookie('fm_cache', true, 2147483647, "/");
|
||||
// if fm included
|
||||
if (defined('FM_EMBED')) {
|
||||
$use_auth = false;
|
||||
$sticky_navbar = false;
|
||||
} else {
|
||||
@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)">
|
||||
<input type="hidden" name="type" value="settings" aria-label="hidden" aria-hidden="true">
|
||||
<div class="form-group row">
|
||||
<label for="js-language" class="col-sm-2 col-form-label"><?php echo lng('Language') ?></label>
|
||||
<div class="col-sm-10">
|
||||
<label for="js-language" class="col-sm-3 col-form-label"><?php echo lng('Language') ?></label>
|
||||
<div class="col-sm-9">
|
||||
<select class="form-control" id="js-language" name="js-language">
|
||||
<?php
|
||||
function getSelected($l) {
|
||||
@ -1077,8 +1081,8 @@ if (isset($_GET['settings']) && !FM_READONLY) {
|
||||
}
|
||||
?>
|
||||
<div class="form-group row">
|
||||
<label for="js-err-rpt-1" class="col-sm-2 col-form-label">Error Reporting</label>
|
||||
<div class="col-sm-10">
|
||||
<label for="js-err-rpt-1" class="col-sm-3 col-form-label">Error Reporting</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<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
|
||||
@ -1091,8 +1095,8 @@ if (isset($_GET['settings']) && !FM_READONLY) {
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="js-hdn-1" class="col-sm-2 col-form-label">Show Hidden Files</label>
|
||||
<div class="col-sm-10">
|
||||
<label for="js-hdn-1" class="col-sm-3 col-form-label">Show Hidden Files</label>
|
||||
<div class="col-sm-9">
|
||||
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<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
|
||||
@ -1681,26 +1685,30 @@ $all_files_size = 0;
|
||||
?>
|
||||
</table>
|
||||
</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>
|
||||
|
||||
<?php
|
||||
@ -2580,9 +2588,10 @@ class FM_Zipper_Tar
|
||||
*/
|
||||
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>
|
||||
<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>
|
||||
@ -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("Pragma: no-cache");
|
||||
|
||||
global $lang;
|
||||
global $lang, $sticky_navbar;
|
||||
$isStickyNavBar = $sticky_navbar ? 'navbar-fixed' : 'navbar-normal';
|
||||
?>
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
@ -2757,11 +2767,13 @@ global $lang;
|
||||
<?php endif; ?>
|
||||
<style>
|
||||
body {
|
||||
margin-top: 55px;
|
||||
font-size: 14px;
|
||||
color: #222;
|
||||
background: #F7F7F7;
|
||||
}
|
||||
body.navbar-fixed {
|
||||
margin-top: 55px;
|
||||
}
|
||||
a:hover, a:visited, a:focus {
|
||||
text-decoration: none !important;
|
||||
}
|
||||
@ -3078,7 +3090,7 @@ global $lang;
|
||||
}
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<body class="<?php echo $isStickyNavBar; ?>">
|
||||
<div id="wrapper" class="container-fluid">
|
||||
|
||||
<!-- New Item creation -->
|
||||
|
Loading…
x
Reference in New Issue
Block a user