bug fix: sort in file browser to respect size and date order
This commit is contained in:
parent
767044fcb5
commit
983524b14b
|
@ -359,8 +359,8 @@ function actmoveto_not_empty() {
|
||||||
echo " (<a href=\"bro_main.php?actperms=Permissions&R=".urlencode($R)."&formu=2&d[]=".urlencode($c[$i]["name"])."\">"._("protected")."</a>)";
|
echo " (<a href=\"bro_main.php?actperms=Permissions&R=".urlencode($R)."&formu=2&d[]=".urlencode($c[$i]["name"])."\">"._("protected")."</a>)";
|
||||||
}
|
}
|
||||||
echo "</td>\n";
|
echo "</td>\n";
|
||||||
echo " <td>".format_size($c[$i]["size"])."</td>";
|
echo " <td data-sort-value=\"".$c[$i]["size"]."\">".format_size($c[$i]["size"])."</td>";
|
||||||
echo "<td>".format_date(_('%3$d-%2$d-%1$d %4$d:%5$d'),date("Y-m-d H:i:s",$c[$i]["date"]))."<br /></td>";
|
echo "<td data-sort-value=\"".$c[$i]["date"]."\">".format_date(_('%3$d-%2$d-%1$d %4$d:%5$d'),date("Y-m-d H:i:s",$c[$i]["date"]))."<br /></td>";
|
||||||
if ($p["showtype"]) {
|
if ($p["showtype"]) {
|
||||||
echo "<td>"._($bro->mime($c[$i]["name"]))."</td>";
|
echo "<td>"._($bro->mime($c[$i]["name"]))."</td>";
|
||||||
}
|
}
|
||||||
|
@ -399,8 +399,8 @@ function actmoveto_not_empty() {
|
||||||
echo "<td><b><a href=\"";
|
echo "<td><b><a href=\"";
|
||||||
echo "bro_main.php?R=".urlencode($R."/".$c[$i]["name"]);
|
echo "bro_main.php?R=".urlencode($R."/".$c[$i]["name"]);
|
||||||
echo "\">"; ehe($c[$i]["name"]); echo "/</a></b></td>\n";
|
echo "\">"; ehe($c[$i]["name"]); echo "/</a></b></td>\n";
|
||||||
echo " <td>".format_size($c[$i]["size"])."</td>";
|
echo " <td data-sort-value=\"".$c[$i]["size"]."\">".format_size($c[$i]["size"])."</td>";
|
||||||
echo "<td>".format_date(_('%3$d-%2$d-%1$d %4$d:%5$d'),date("Y-m-d h:i:s",$c[$i]["date"]))."<br /></td>";
|
echo "<td data-sort-value=\"".$c[$i]["date"]."\">".format_date(_('%3$d-%2$d-%1$d %4$d:%5$d'),date("Y-m-d h:i:s",$c[$i]["date"]))."<br /></td>";
|
||||||
if ($p["showtype"]) {
|
if ($p["showtype"]) {
|
||||||
echo "<td>"._("Folder")."</td>";
|
echo "<td>"._("Folder")."</td>";
|
||||||
}
|
}
|
||||||
|
@ -613,9 +613,9 @@ else {
|
||||||
|
|
||||||
<br/>
|
<br/>
|
||||||
|
|
||||||
<p>
|
<div class="showdirsize_button">
|
||||||
<span class="ina"><a href="bro_main.php?R=<?php echo (($R)?$R:"/"); ?>&showdirsize=1"><?php __("Show size of directories"); ?></a></span> <?php __("(slow)"); ?>
|
<span class="ina"><a href="bro_main.php?R=<?php echo (($R)?$R:"/"); ?>&showdirsize=1"><?php __("Show size of directories"); ?></a></span> <?php __("(slow)"); ?><br /> <br />
|
||||||
</p><p> </p><p>
|
</div>
|
||||||
<span class="ina"><?php
|
<span class="ina"><?php
|
||||||
if ($hta->is_protected($R)) {
|
if ($hta->is_protected($R)) {
|
||||||
echo "<a href=\"hta_edit.php?dir=".(($R)?$R:"/")."\">"._("Edit this folder's protection")."</a>";
|
echo "<a href=\"hta_edit.php?dir=".(($R)?$R:"/")."\">"._("Edit this folder's protection")."</a>";
|
||||||
|
@ -657,7 +657,17 @@ else {
|
||||||
</td></tr></table>
|
</td></tr></table>
|
||||||
|
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
$(document).ready(function() { $("#tab_files_w_details").tablesorter(); } );
|
$(document).ready(function() {
|
||||||
|
$("#tab_files_w_details").tablesorter({
|
||||||
|
textExtraction: function(node) {
|
||||||
|
var attr = $(node).attr('data-sort-value');
|
||||||
|
if (typeof attr !== 'undefined' && attr !== false) {
|
||||||
|
return attr;
|
||||||
|
}
|
||||||
|
return $(node).text();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<?php include_once("foot.php"); ?>
|
<?php include_once("foot.php"); ?>
|
||||||
|
|
Loading…
Reference in New Issue