Improve journal UI when undoing a transaction

This commit is contained in:
Bernd Bestel
2018-11-18 12:58:15 +01:00
parent c71e46191f
commit 5966a3d678
6 changed files with 11 additions and 5 deletions

View File

@@ -59,7 +59,9 @@ $(document).on('click', '.undo-battery-execution-button', function(e)
function(result)
{
element.closest("tr").addClass("text-muted");
element.closest(".undo-battery-execution-button").addClass("disabled");
element.parent().siblings().find("span.name-anchor").addClass("text-strike-through").after("<br>" + L("Undone on") + " " + moment().format("YYYY-MM-DD HH:mm:ss") + " <time class='timeago timeago-contextual' datetime='" + moment().format("YYYY-MM-DD HH:mm:ss") + "'></time>");
element.closest(".undo-stock-booking-button").addClass("disabled");
RefreshContextualTimeago();
toastr.success(L("Charge cycle successfully undone"));
},
function(xhr)

View File

@@ -59,7 +59,9 @@ $(document).on('click', '.undo-chore-execution-button', function(e)
function(result)
{
element.closest("tr").addClass("text-muted");
element.closest(".undo-chore-execution-button").addClass("disabled");
element.parent().siblings().find("span.name-anchor").addClass("text-strike-through").after("<br>" + L("Undone on") + " " + moment().format("YYYY-MM-DD HH:mm:ss") + " <time class='timeago timeago-contextual' datetime='" + moment().format("YYYY-MM-DD HH:mm:ss") + "'></time>");
element.closest(".undo-stock-booking-button").addClass("disabled");
RefreshContextualTimeago();
toastr.success(L("Chore execution successfully undone"));
},
function(xhr)

View File

@@ -59,7 +59,9 @@ $(document).on('click', '.undo-stock-booking-button', function(e)
function(result)
{
element.closest("tr").addClass("text-muted");
element.parent().siblings().find("span.name-anchor").addClass("text-strike-through").after("<br>" + L("Undone on") + " " + moment().format("YYYY-MM-DD HH:mm:ss") + " <time class='timeago timeago-contextual' datetime='" + moment().format("YYYY-MM-DD HH:mm:ss") + "'></time>");
element.closest(".undo-stock-booking-button").addClass("disabled");
RefreshContextualTimeago();
toastr.success(L("Booking successfully undone"));
},
function(xhr)