mirror of
https://github.com/prasathmani/tinyfilemanager
synced 2024-05-20 14:36:36 +02:00
Color on action buttons
I'm not very good, I did it with (id = ""), in the future someone wants to organize better.
This commit is contained in:
parent
c5d481c5cc
commit
6d2ae9d923
|
@ -1,6 +1,6 @@
|
|||
<?php
|
||||
//Default Configuration
|
||||
$CONFIG = '{"lang":"en","error_reporting":false,"show_hidden":false,"hide_Cols":false,"calc_folder":false}';
|
||||
$CONFIG = '{"lang":"en","error_reporting":false,"show_hidden":false,"hide_Cols":false,"calc_folder":false,"actioncolor":false}';
|
||||
|
||||
/**
|
||||
* H3K | Tiny File Manager V2.4.5
|
||||
|
@ -166,6 +166,9 @@ $hide_Cols = isset($cfg->data['hide_Cols']) ? $cfg->data['hide_Cols'] : true;
|
|||
// Show directory size: true or speedup output: false
|
||||
$calc_folder = isset($cfg->data['calc_folder']) ? $cfg->data['calc_folder'] : true;
|
||||
|
||||
// Color on action buttons
|
||||
$actioncolor = isset($cfg->data['actioncolor']) ? $cfg->data['actioncolor'] : true;
|
||||
|
||||
//available languages
|
||||
$lang_list = array(
|
||||
'en' => 'English'
|
||||
|
@ -473,7 +476,7 @@ if (isset($_POST['ajax']) && !FM_READONLY) {
|
|||
|
||||
// Save Config
|
||||
if (isset($_POST['type']) && $_POST['type'] == "settings") {
|
||||
global $cfg, $lang, $report_errors, $show_hidden_files, $lang_list, $hide_Cols, $calc_folder;
|
||||
global $cfg, $lang, $report_errors, $show_hidden_files, $lang_list, $hide_Cols, $calc_folder, $actioncolor;
|
||||
$newLng = $_POST['js-language'];
|
||||
fm_get_translations([]);
|
||||
if (!array_key_exists($newLng, $lang_list)) {
|
||||
|
@ -484,6 +487,7 @@ if (isset($_POST['ajax']) && !FM_READONLY) {
|
|||
$shf = isset($_POST['js-show-hidden']) && $_POST['js-show-hidden'] == "true" ? true : false;
|
||||
$hco = isset($_POST['js-hide-cols']) && $_POST['js-hide-cols'] == "true" ? true : false;
|
||||
$caf = isset($_POST['js-calc-folder']) && $_POST['js-calc-folder'] == "true" ? true : false;
|
||||
$actcol = isset($_POST['js-actcol-2']) && $_POST['js-actcol-2'] == "true" ? true : false;
|
||||
|
||||
if ($cfg->data['lang'] != $newLng) {
|
||||
$cfg->data['lang'] = $newLng;
|
||||
|
@ -509,6 +513,10 @@ if (isset($_POST['ajax']) && !FM_READONLY) {
|
|||
$cfg->data['calc_folder'] = $caf;
|
||||
$calc_folder = $caf;
|
||||
}
|
||||
if ($cfg->data['actioncolor'] != $actcol) {
|
||||
$cfg->data['actioncolor'] = $actcol;
|
||||
$actioncolor = $actcol;
|
||||
}
|
||||
$cfg->save();
|
||||
echo true;
|
||||
}
|
||||
|
@ -1435,6 +1443,20 @@ if (isset($_GET['settings']) && !FM_READONLY) {
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<label for="js-ac-2-1" class="col-sm-3 col-form-label"><?php echo lng('Cor nas ações') ?></label>
|
||||
<div class="col-sm-9">
|
||||
<div class="btn-group btn-group-toggle" data-toggle="buttons">
|
||||
<label class="btn btn-secondary <?php echo getChecked($actioncolor, 1, 'active') ?>">
|
||||
<input type="radio" name="js-actcol-2" id="js-ac-2-1" autocomplete="off" value="true" <?php echo getChecked($actioncolor, 1, 'checked') ?> > ON
|
||||
</label>
|
||||
<label class="btn btn-secondary <?php echo getChecked($actioncolor, '', 'active') ?>">
|
||||
<input type="radio" name="js-actcol-2" id="js-ac-2-0" autocomplete="off" value="false" <?php echo getChecked($actioncolor, '', 'checked') ?> > OFF
|
||||
</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group row">
|
||||
<div class="col-sm-10">
|
||||
|
@ -1881,6 +1903,22 @@ $num_folders = count($folders);
|
|||
$all_files_size = 0;
|
||||
$tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white";
|
||||
?>
|
||||
|
||||
<?php
|
||||
if($actioncolor == "true"){
|
||||
echo "<style>
|
||||
#testclass1120{ }
|
||||
#testclass1121{ background-color:red; }
|
||||
#testclass1122{ background-color:yellow; color:black; }
|
||||
#testclass1123{ background-color:green; }
|
||||
#testclass1124{ }
|
||||
#testclass1125{ }
|
||||
#testclass1128{ background-color:blue; }
|
||||
#testclass1129{ background-color:blue; }
|
||||
</style>";
|
||||
}
|
||||
?>
|
||||
|
||||
<form action="" method="post" class="pt-3">
|
||||
<input type="hidden" name="p" value="<?php echo fm_enc(FM_PATH) ?>">
|
||||
<input type="hidden" name="group" value="1">
|
||||
|
@ -1966,9 +2004,10 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white
|
|||
<td><?php echo $owner['name'] . ':' . $group['name'] ?></td>
|
||||
<?php endif; ?>
|
||||
<td class="inline-actions"><?php if (!FM_READONLY): ?>
|
||||
<a title="<?php echo lng('Delete')?>" href="?p=<?php echo urlencode(FM_PATH) ?>&del=<?php echo urlencode($f) ?>" onclick="return confirm('<?php echo lng('Delete').' '.lng('Folder').'?'; ?>\n \n ( <?php echo urlencode($f) ?> )');"> <i class="fa fa-trash-o" aria-hidden="true"></i></a>
|
||||
<a title="<?php echo lng('Rename')?>" href="#" onclick="rename('<?php echo fm_enc(addslashes(FM_PATH)) ?>', '<?php echo fm_enc(addslashes($f)) ?>');return false;"><i class="fa fa-pencil-square-o" aria-hidden="true"></i></a>
|
||||
<a title="<?php echo lng('CopyTo')?>..." href="?p=&copy=<?php echo urlencode(trim(FM_PATH . '/' . $f, '/')) ?>"><i class="fa fa-files-o" aria-hidden="true"></i></a>
|
||||
<a data-max-width="100%" data-width="100%"><i class="fa fa-pencil-square-o" style="background-color:transparent; color:transparent;"></i></a>
|
||||
<a title="<?php echo lng('Delete')?>" href="?p=<?php echo urlencode(FM_PATH) ?>&del=<?php echo urlencode($f) ?>" onclick="return confirm('<?php echo lng('Delete').' '.lng('Folder').'?'; ?>\n \n ( <?php echo urlencode($f) ?> )');"> <i class="fa fa-trash-o" aria-hidden="true" id="testclass1121"></i></a>
|
||||
<a title="<?php echo lng('Rename')?>" href="#" onclick="rename('<?php echo fm_enc(addslashes(FM_PATH)) ?>', '<?php echo fm_enc(addslashes($f)) ?>');return false;"><i class="fa fa-pencil-square-o" aria-hidden="true" id="testclass1122"></i></a>
|
||||
<a title="<?php echo lng('CopyTo')?>..." href="?p=&copy=<?php echo urlencode(trim(FM_PATH . '/' . $f, '/')) ?>"><i class="fa fa-files-o" aria-hidden="true" id="testclass1123"></i></a>
|
||||
<?php endif; ?>
|
||||
<a title="<?php echo lng('DirectLink')?>" href="<?php echo fm_enc(FM_ROOT_URL . (FM_PATH != '' ? '/' . FM_PATH : '') . '/' . $f . '/') ?>" target="_blank"><i class="fa fa-link" aria-hidden="true"></i></a>
|
||||
</td>
|
||||
|
@ -2030,13 +2069,13 @@ $tableTheme = (FM_THEME == "dark") ? "text-white bg-dark table-dark" : "bg-white
|
|||
<td class="inline-actions">
|
||||
<a title="<?php echo lng('Preview') ?>" href="<?php echo $filelink.'&quickView=1'; ?>" data-toggle="lightbox" data-gallery="tiny-gallery" data-title="<?php echo fm_convert_win(fm_enc($f)) ?>" data-max-width="100%" data-width="100%"><i class="fa fa-eye"></i></a>
|
||||
<?php if (!FM_READONLY): ?>
|
||||
<a title="<?php echo lng('Delete') ?>" href="?p=<?php echo urlencode(FM_PATH) ?>&del=<?php echo urlencode($f) ?>" onclick="return confirm('<?php echo lng('Delete').' '.lng('File').'?'; ?>\n \n ( <?php echo urlencode($f) ?> )');"> <i class="fa fa-trash-o"></i></a>
|
||||
<a title="<?php echo lng('Rename') ?>" href="#" onclick="rename('<?php echo fm_enc(addslashes(FM_PATH)) ?>', '<?php echo fm_enc(addslashes($f)) ?>');return false;"><i class="fa fa-pencil-square-o"></i></a>
|
||||
<a title="<?php echo lng('Delete') ?>" href="?p=<?php echo urlencode(FM_PATH) ?>&del=<?php echo urlencode($f) ?>" onclick="return confirm('<?php echo lng('Delete').' '.lng('File').'?'; ?>\n \n ( <?php echo urlencode($f) ?> )');"> <i class="fa fa-trash-o" id="testclass1121"></i></a>
|
||||
<a title="<?php echo lng('Rename') ?>" href="#" onclick="rename('<?php echo fm_enc(addslashes(FM_PATH)) ?>', '<?php echo fm_enc(addslashes($f)) ?>');return false;"><i class="fa fa-pencil-square-o" id="testclass1122"></i></a>
|
||||
<a title="<?php echo lng('CopyTo') ?>..."
|
||||
href="?p=<?php echo urlencode(FM_PATH) ?>&copy=<?php echo urlencode(trim(FM_PATH . '/' . $f, '/')) ?>"><i class="fa fa-files-o"></i></a>
|
||||
href="?p=<?php echo urlencode(FM_PATH) ?>&copy=<?php echo urlencode(trim(FM_PATH . '/' . $f, '/')) ?>"><i class="fa fa-files-o" id="testclass1123"></i></a>
|
||||
<?php endif; ?>
|
||||
<a title="<?php echo lng('DirectLink') ?>" href="<?php echo fm_enc(FM_ROOT_URL . (FM_PATH != '' ? '/' . FM_PATH : '') . '/' . $f) ?>" target="_blank"><i class="fa fa-link"></i></a>
|
||||
<a title="<?php echo lng('Download') ?>" href="?p=<?php echo urlencode(FM_PATH) ?>&dl=<?php echo urlencode($f) ?>"><i class="fa fa-download"></i></a>
|
||||
<a title="<?php echo lng('DirectLink') ?>" href="<?php echo fm_enc(FM_ROOT_URL . (FM_PATH != '' ? '/' . FM_PATH : '') . '/' . $f) ?>" target="_blank"><i class="fa fa-link" id="testclass1124"></i></a>
|
||||
<a title="<?php echo lng('Download') ?>" href="?p=<?php echo urlencode(FM_PATH) ?>&dl=<?php echo urlencode($f) ?>"><i class="fa fa-download" id="testclass1125"></i></a>
|
||||
</td>
|
||||
</tr>
|
||||
<?php
|
||||
|
|
Loading…
Reference in a new issue