From 1298bc8099986a0b6ea090a17084844da84cc40b Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Wed, 30 Jan 2019 17:27:17 +0100 Subject: [PATCH] Syncing UX --- Site/App_GlobalResources/Global.resx | 4 ++-- Site/Pages/v5/Financial/AttestCosts.aspx | 8 ++++---- Site/Pages/v5/Financial/Json-AttestableCosts.aspx.cs | 2 +- Site/Pages/v5/Financial/ValidateReceipts.aspx | 12 ++++++++++++ Site/Style/style-v5.css | 5 +++++ 5 files changed, 24 insertions(+), 7 deletions(-) diff --git a/Site/App_GlobalResources/Global.resx b/Site/App_GlobalResources/Global.resx index 429ecbb4..19bf3062 100644 --- a/Site/App_GlobalResources/Global.resx +++ b/Site/App_GlobalResources/Global.resx @@ -1066,7 +1066,7 @@ Closed - As in "record closed" + As in "record or transaction closed" No records @@ -1082,6 +1082,6 @@ Opened - As in "record opened" + As in "record or transaction opened" \ No newline at end of file diff --git a/Site/Pages/v5/Financial/AttestCosts.aspx b/Site/Pages/v5/Financial/AttestCosts.aspx index 3cf5b1c9..ecf77e50 100644 --- a/Site/Pages/v5/Financial/AttestCosts.aspx +++ b/Site/Pages/v5/Financial/AttestCosts.aspx @@ -53,8 +53,8 @@ $('#TableAttestableCosts').datagrid( { rowStyler: function (index, rowData) { - if (rowData.previous != null) { - return { class: "rowPrevious row" + rowData.itemId }; + if (rowData.approved != null) { + return { class: "action-list-item-approved row" + rowData.itemId }; } if (rowData.itemId != null) { @@ -200,7 +200,7 @@ $("#IconApproved" + baseid).finish().css("opacity", 0.5).css("display", "none"); $("#IconApproval" + baseid).fadeIn(100); $("#IconDenial" + baseid).fadeIn(100).css("cursor", "pointer"); - $('.row' + baseid).animate({ color: "#000" }, 100); + $('.row' + baseid).removeClass("action-list-item-approved"); alertify.log(SwarmopsJS.unescape(msg.d.DisplayMessage)); recheckBudgets(); // will double-check budgets against server @@ -320,7 +320,7 @@ $("#IconApproved" + baseid).fadeTo(250, 0.5); $("#IconDenial" + baseid).finish().css("display", "none").css("opacity", 1.0); $("#IconUndo" + baseid).fadeIn(100); - $('.row' + baseid).animate({ color: "#AAA" }, 400); + $('.row' + baseid).addClass("action-list-item-approved"); alertify.success(SwarmopsJS.unescape(msg.d.DisplayMessage)); recheckBudgets(); // will double-check budgets against server diff --git a/Site/Pages/v5/Financial/Json-AttestableCosts.aspx.cs b/Site/Pages/v5/Financial/Json-AttestableCosts.aspx.cs index bd5ed7f8..751ada58 100644 --- a/Site/Pages/v5/Financial/Json-AttestableCosts.aspx.cs +++ b/Site/Pages/v5/Financial/Json-AttestableCosts.aspx.cs @@ -69,7 +69,7 @@ public partial class Pages_v5_Finance_Json_AttestableCosts : DataV5Base { result.Append("{"); result.AppendFormat( - "\"item\":\"{0}\",\"beneficiary\":\"{1}\",\"description\":\"{2}\",\"budgetName\":\"{3}\",\"previous\":\"yes\",\"amountRequested\":\"{4:N2}\",\"itemId\":\"{5}\"," + + "\"item\":\"{0}\",\"beneficiary\":\"{1}\",\"description\":\"{2}\",\"budgetName\":\"{3}\",\"approved\":\"yes\",\"amountRequested\":\"{4:N2}\",\"itemId\":\"{5}\"," + "\"dox\":\"" + (item.HasDox ? hasDoxString : " ") + "\"," + "\"actions\":\"" + "" + diff --git a/Site/Pages/v5/Financial/ValidateReceipts.aspx b/Site/Pages/v5/Financial/ValidateReceipts.aspx index 96e72fb6..bbd15af1 100644 --- a/Site/Pages/v5/Financial/ValidateReceipts.aspx +++ b/Site/Pages/v5/Financial/ValidateReceipts.aspx @@ -30,6 +30,18 @@ $(document).ready(function () { $('#TableAttestableCosts').datagrid( { + rowStyler: function (index, rowData) { + if (rowData.approved != null) { + return { class: "action-list-item-approved row" + rowData.itemId }; + } + + if (rowData.itemId != null) { + return { class: "row" + rowData.itemId.replace(/\|/g, '') }; + } + + return ''; + }, + onLoadSuccess: function () { $(".LocalIconApproval").attr('src', '/Images/Icons/iconshock-balloon-yes-128x96px.png'); diff --git a/Site/Style/style-v5.css b/Site/Style/style-v5.css index b4d199a8..73706d58 100644 --- a/Site/Style/style-v5.css +++ b/Site/Style/style-v5.css @@ -1036,6 +1036,11 @@ input.entryError, span.entryError, div.entryError { background:transparent !important; } +.action-list-item-approved { + color: #aaa; + transition: all 0.50s; + -webkit-transition: all 0.50s; +} /* DISPLAY FIELDS */