From d74fcf9e8bfb15158fce16a9920ce638f4c675cf Mon Sep 17 00:00:00 2001 From: Malfurious Date: Mon, 18 Oct 2021 19:42:58 -0400 Subject: Automatically call-up issue modal for newly-opened issues This patch will cause the interface for new issues to be immediately visible after page load on opening a new issue, as it is likely the user may wish to perform some action on it. This patch also fixes a bug which has previously prevented this from being the default behavior. The pad view's script imports have been reordered such that all issue state manipulation is done and pushed to the DB before any of the pad view page content is rendered. This prevents situations where the page would often load in a broken state (the reason for the previous 'location()' call - to force a reload), and enables us to use the new issue as the autoModal window as this patch does. Signed-off-by: Malfurious --- app/model/datamods.php | 2 +- app/view/pad.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/model/datamods.php b/app/model/datamods.php index 0b7f3da..b3384a7 100644 --- a/app/model/datamods.php +++ b/app/model/datamods.php @@ -114,7 +114,7 @@ if (isAction("dm-issue-add")) $issue = issue::initNew($mesg, $user, $stages[0]); $log = mesg::initNewLog("%s opened issue", $user, $issue); - location(); // bug mitigation + setAutoModal("#issueModal-" . $issue->guid); } ?> diff --git a/app/view/pad.php b/app/view/pad.php index 4408df2..f47b2e7 100644 --- a/app/view/pad.php +++ b/app/view/pad.php @@ -12,10 +12,10 @@ * For more information, please refer to UNLICENSE */ -require_once "model/pad.php"; require_once "view/stdpage.php"; require_once "view/datalsts.php"; require_once "view/issue.php"; +require_once "model/pad.php"; ?> -- cgit v1.2.3