diff --git a/head.php b/head.php
index 96e7b1c..5ab2d1d 100644
--- a/head.php
+++ b/head.php
@@ -13,6 +13,6 @@
diff --git a/lib/DataTable.php b/lib/DataTable.php
index 3b00af4..f1ad8e5 100644
--- a/lib/DataTable.php
+++ b/lib/DataTable.php
@@ -4,9 +4,9 @@
public static function sortIcon()
{
?>
-
-
-
+
+
+
0)
{
+ $strSelection = urldecode($strSelection);
$strFileData = file_get_contents("{$strQueryDir}/{$strSelection}");
// Get the inputs:
preg_match_all(
- "/declare\s+\@([A-Za-z0-9]{1,})\s+(.+)\s+=\s+\?/i",
+ "/declare\s+\@([A-Za-z0-9]{1,})\s+(.+)\s+=\s+\?;(\s+-- Default\:\s(.*))?/i",
$strFileData,
$varInputs);
+ //Respond::json($varInputs);
+
// Get the options defined in comments:
preg_match_all(
"/--\s+([A-Za-z0-9]{1,})\:\s+(.+)/i",
@@ -112,9 +115,17 @@
$strTitle = $strTitle ?? $strSelection ?? "Report";
?>
+
+
+
+
= $strTitle; ?>
-
+
= $strTitle; ?>
@@ -153,12 +164,12 @@
-
+
-
+
@@ -176,24 +187,24 @@
-
+
-
-
-
= ucfirst($strClass); ?>: = $varOptions[$strClass]; ?>
+
+
+ = $varOptions[$strClass]; ?>
-
+
-
-
- = $varOptions[$strClass]; ?>
+
+
+ = ucfirst($strClass); ?>: = $varOptions[$strClass]; ?>
@@ -211,16 +222,20 @@
if ($strInputType == "datetime")
$strInputTypeHTML = "date";
+
+ $strInputDefaultValue = "";
+ if (strlen($varInputs[4][$i]) > 0)
+ $strInputDefaultValue = $varInputs[4][$i];
?>
-
+
@@ -230,11 +245,11 @@
-
+
@@ -246,7 +261,7 @@
-
+
The selected report requires being logged in as a user with permission to run it.
@@ -269,21 +284,40 @@
?>
-
= $strTitle; ?>
+
+
+
+
= $strTitle; ?>
-
- $v): ?>
- - = $k; ?>: = $v; ?>
-
- - Printed: = date("Y-m-d H:i:s"); ?>
-
+
+
+
= $varOptions[$strClass]; ?>
+
+
+
+
+
+
+ $v): ?>
+ - = $k; ?>: = $v; ?>
+
+ - Printed: = date("Y-m-d H:i:s"); ?>
+
+
+
+
-
+
+
= $col; ?> |
@@ -291,9 +325,39 @@
+
- = $r[$col]; ?> |
+ 0)
+ $strCellClass = $strRowClass;
+
+ if (strlen($strNextCellClass) > 0)
+ $strCellClass = $strNextCellClass;
+
+ // Allow SQL data to controll next cell class with _next_cell_class column:
+ if (preg_match("/^_next_cell_class/i", $col))
+ $strNextCellClass = $r[$col];
+
+ // Hide columns that begin with underscore:
+ if ($col[0] == "_")
+ continue;
+ ?>
+
+ = $r[$col]; ?> |
+
+
@@ -307,6 +371,11 @@
$(function() {
var fileSearch = $("#query-search").first();
+ fileSearch.on("focus", function() {
+ fileSearch.trigger("input");
+ fileSearch.select();
+ });
+
fileSearch.on("input", function() {
var q = fileSearch.val();
@@ -314,8 +383,8 @@
x = $(x);
x.addClass("d-none");
- if (q.length < 1)
- return;
+ //if (q.length < 1)
+ // return;
var fileName = x.text();