generated from jric11/baseProject
Chat's updates for security, db and workflow
Security and workflow regressions / regression (push) Has been cancelled
Security and workflow regressions / regression (push) Has been cancelled
This commit is contained in:
+11
-40
@@ -3,7 +3,7 @@
|
||||
// View Journal
|
||||
// ============
|
||||
|
||||
$(document).ready(function() {
|
||||
$(document).ready(function () {
|
||||
|
||||
var $application = $("#APPLICATION_MNEMONIC").val(),
|
||||
$sessionStorage = JSON.parse(sessionStorage.getItem($application) || "{}");
|
||||
@@ -12,7 +12,7 @@ $(document).ready(function() {
|
||||
// Find Button
|
||||
// -----------
|
||||
|
||||
$(".btnFind").on("click", function() {
|
||||
$(".btnFind").on("click", async function () {
|
||||
|
||||
$sessionStorage.action = "Journal.viewJournal";
|
||||
$sessionStorage.pagination = "first";
|
||||
@@ -25,7 +25,7 @@ $(document).ready(function() {
|
||||
|
||||
});
|
||||
|
||||
$("#find_journal").on("keyup", function(e) {
|
||||
$("#find_journal").on("keyup", async function (e) {
|
||||
if (e.key === "Enter") {
|
||||
$(".btnFind").trigger("click");
|
||||
}
|
||||
@@ -35,7 +35,7 @@ $(document).ready(function() {
|
||||
// Clear Find Button
|
||||
// -----------------
|
||||
|
||||
$(".btnClearFind").on("click", function() {
|
||||
$(".btnClearFind").on("click", async function () {
|
||||
|
||||
$("#find_journal").val("").trigger("change");
|
||||
|
||||
@@ -54,7 +54,7 @@ $(document).ready(function() {
|
||||
// Pagination Buttons
|
||||
// ------------------
|
||||
|
||||
$(".btnPagination").on("click", function() {
|
||||
$(".btnPagination").on("click", async function () {
|
||||
|
||||
$sessionStorage.action = "Journal.viewJournal";
|
||||
$sessionStorage.pagination = $(this).data("pagination");
|
||||
@@ -75,7 +75,7 @@ $(document).ready(function() {
|
||||
// Done Button
|
||||
// -----------
|
||||
|
||||
$(".btnDone").on("click", function() {
|
||||
$(".btnDone").on("click", async function () {
|
||||
|
||||
formSubmit({ action : "" });
|
||||
|
||||
@@ -85,46 +85,17 @@ $(document).ready(function() {
|
||||
// Refresh Button
|
||||
// --------------
|
||||
|
||||
$(".btnRefresh").on("click", function() {
|
||||
$(".btnRefresh").on("click", async function () {
|
||||
|
||||
window.location.reload();
|
||||
|
||||
});
|
||||
|
||||
// ---------------------
|
||||
// Clear Journal Button.
|
||||
// ---------------------
|
||||
|
||||
$(".btnClear").on("click", function() {
|
||||
|
||||
$("#confirm-dialog").removeClass().addClass("modal confirm-clear-journal")
|
||||
.find(".modal-title").html("Confirm Clear Journal").end()
|
||||
.find(".modal-body").html("Are you sure you wish to Clear the Journal?").end()
|
||||
.modal("show");
|
||||
|
||||
});
|
||||
|
||||
$("body").on("click", ".confirm-clear-journal .btnConfirmDialogConfirm", function() {
|
||||
|
||||
$.post("./", { action : "Journal.clearJournal" })
|
||||
|
||||
.done(function() {
|
||||
|
||||
$sessionStorage.toast = "Journal was Cleared";
|
||||
|
||||
sessionStorage.setItem($application, JSON.stringify($sessionStorage));
|
||||
|
||||
window.location.reload();
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
// -------------------
|
||||
// Save Changed Inputs
|
||||
// -------------------
|
||||
|
||||
$(".autosave").on("change", function(e) {
|
||||
$(".autosave").on("change", async function (e) {
|
||||
|
||||
switch (e.target.type) {
|
||||
|
||||
@@ -146,9 +117,9 @@ $(document).ready(function() {
|
||||
// Initalize Inputs
|
||||
// ----------------
|
||||
|
||||
$.each($sessionStorage, function(name, value) {
|
||||
$.each($sessionStorage, function (name, value) {
|
||||
|
||||
var $input = $(":input").filter("[name='" + name + "']");
|
||||
var $input = $(":input.autosave").not('[type="hidden"],[type="password"]').filter(function(){return this.name===name;});
|
||||
|
||||
if ($input.length > 0) {
|
||||
|
||||
@@ -178,7 +149,7 @@ $(document).ready(function() {
|
||||
// Per Page Dropdown
|
||||
// -----------------
|
||||
|
||||
$("#journals_per_page").on("change", function() {
|
||||
$("#journals_per_page").on("change", async function () {
|
||||
|
||||
$(".btnFind").trigger("click");
|
||||
|
||||
|
||||
Reference in New Issue
Block a user