diff --git a/head.php b/head.php
index 9577681..17357ba 100644
--- a/head.php
+++ b/head.php
@@ -17,11 +17,17 @@
+ // Run this function as soon as the body tag is available:
+ fnApplyDark();
+
diff --git a/pages/run.php b/pages/run.php
index 7067dc5..6fd3731 100644
--- a/pages/run.php
+++ b/pages/run.php
@@ -30,6 +30,7 @@
$varOptions = [];
$intAllowed = 1;
+ $intSortable = 1;
if ($strSelection !== null && strlen($strSelection) > 0)
{
@@ -94,11 +95,6 @@
catch (Exception $x) {}
}
- //Respond::json($strFileData);
-
- //foreach ($varReplacements as $k => $v)
- // $strFileData = preg_replace("/\{\{{$k}\}\}/i", $v, $strFileData);
-
// Get the inputs:
preg_match_all(
"/declare\s+\@([A-Za-z0-9]{1,})\s+(.+)\s+=\s+\?;(\s+-- ([A-Za-z0-9]{1,})\:\s(.*))?/i",
@@ -121,6 +117,9 @@
}
}
+ if (array_key_exists("nosorting", $varOptions))
+ $intSortable = 0;
+
if (array_key_exists("allow", $varOptions))
{
$intAllowed = 0;
@@ -205,15 +204,22 @@
@@ -254,9 +260,9 @@
-
+
-
+
@@ -503,7 +510,7 @@
$strNextCellClass = "";
?>
-
+
@@ -569,7 +576,7 @@
if ($col[0] == "_")
continue;
?>
- = $col; ?> |
+ = $col; ?> |
@@ -584,7 +591,7 @@
$strNextCellClass = "";
?>
-
+
$(function() {
- var fileSearch = $("#query-search").first();
+ var fileSearch = $("#file-search").first();
+ var tableSearch = $("#table-search").first();
fileSearch.on("focus", function() {
fileSearch.trigger("input");
@@ -632,13 +640,10 @@
fileSearch.on("input", function() {
var q = fileSearch.val();
- $(".query-search-results div").each(function(i, x) {
+ $(".file-search-results div").each(function(i, x) {
x = $(x);
x.addClass("d-none");
- //if (q.length < 1)
- // return;
-
var fileName = x.text();
if (fileName.includesAll(q))
@@ -646,6 +651,40 @@
});
});
+ if (tableSearch)
+ {
+ var searchText = $("#search-text").first();
+
+ tableSearch.on("input", function() {
+ var q = tableSearch.val();
+
+ searchText.html(q);
+
+ searchText
+ .parents("li")
+ .first()
+ .addClass("d-none");
+
+ if (q.length > 0)
+ {
+ searchText
+ .parents("li")
+ .first()
+ .removeClass("d-none");
+ }
+
+ $(".searchable").each(function(i, x) {
+ x = $(x);
+ x.addClass("d-none");
+
+ var searchableText = x.text();
+
+ if (searchableText.includesAll(q))
+ x.removeClass("d-none");
+ });
+ });
+ }
+
fnShowPage = function(id)
{
@@ -687,13 +726,18 @@
0): ?>
+
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
@@ -733,7 +777,7 @@
-
+