From ae43f98573ff1385d95286c49fc8e73fc805f782 Mon Sep 17 00:00:00 2001 From: SimonOrJ Date: Wed, 17 Aug 2016 23:31:29 -0400 Subject: [PATCH] Update URL on Submit + Re-center form labels due to the update of Boostrap v4-alpha.2 to v4-alpha.3 --- changelog.md | 3 +++ web/index.php | 27 +++++++++++++++------------ web/login.php | 4 ++-- web/res/js/lookup.js | 8 +++++++- web/setup.php | 38 +++++++++++++++++++------------------- 5 files changed, 46 insertions(+), 34 deletions(-) diff --git a/changelog.md b/changelog.md index 5ce967f..e334677 100644 --- a/changelog.md +++ b/changelog.md @@ -6,6 +6,9 @@ v0.9.2 - August 17, 2016 - New feature: - Now using minecraft.woff and a sign image to display sign data to better replicate the sign in-game. + - Making a lookup will update the URL to make the output look the same even + when you give the link to someone else and they make a lookup with it right + away. - Fix: - Container option is fixed. - The date ordering for multiple action search is fixed. diff --git a/web/index.php b/web/index.php index 3088500..2cf3c0d 100644 --- a/web/index.php +++ b/web/index.php @@ -94,7 +94,7 @@
Make a Lookup
- +
> @@ -151,7 +151,7 @@
-
Toggle
+
Toggle
@@ -171,7 +171,7 @@
- +
> @@ -181,7 +181,7 @@ >
- +
> @@ -193,13 +193,13 @@
- +
>
- +
@@ -213,7 +213,7 @@
- +
@@ -227,12 +227,12 @@
- +
data-toggle="tooltip" data-placement="top" title='Space [ ] for AND. Comma [,] for OR. Enclose terms in quotes [""] to escape spaces/commas. Only applies to chat and command.'>
- +
@@ -241,11 +241,11 @@ Reverse - > + " id="lT" name="t" placeholder="0000-00-00T00:00:00">
- +
>
@@ -338,6 +338,9 @@ document.getElementById("lT").setAttribute("placeholder","") document.getElementById("lT").setAttribute("type","text"); document.getElementById("lT").removeAttribute("name"); + + document.getElementById("lSubmit").disabled = true; + document.getElementById("mSubmit").disabled = true; diff --git a/web/login.php b/web/login.php index cc77f84..6cda5e9 100644 --- a/web/login.php +++ b/web/login.php @@ -70,11 +70,11 @@
- +
- +
diff --git a/web/res/js/lookup.js b/web/res/js/lookup.js index 59914d1..829dfba 100644 --- a/web/res/js/lookup.js +++ b/web/res/js/lookup.js @@ -63,6 +63,9 @@ $.getJSON("config.json", function(data) { .format(c.form.dateFormat+" "+c.form.timeFormat)); $date.datetimepicker({format:c.form.dateFormat+" "+c.form.timeFormat}); + + // Unlock the lookup button + $submit.prop("disabled", false); }); $('[data-toggle="tooltip"]').tooltip(); @@ -294,7 +297,10 @@ $form.submit(function(e) { } else { time += moment(Date.now()).format("X"); } - s.data += time; + + // Set the URL and data + window.history.replaceState(null, "", "?" + (s.data += time)) + // Set offset $moreOffset.val($limit.val() !== "" ? parseInt($limit.val()) : 30); diff --git a/web/setup.php b/web/setup.php index 5a329e4..56f439e 100644 --- a/web/setup.php +++ b/web/setup.php @@ -311,7 +311,7 @@
- +
- +
- +
- +
- +
- +
@@ -395,7 +395,7 @@
- +
@@ -404,7 +404,7 @@
- +
@@ -413,7 +413,7 @@
- +
@@ -441,31 +441,31 @@
- +
- +
- +
- +
- +
- +
- +