From 4d710d5a8a54e8de922caab12e9e1941ac3265d2 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Mon, 31 Dec 2018 22:24:30 +0100 Subject: [PATCH] EOM work 6 --- Site/Pages/v5/Ledgers/EndOfMonth.aspx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Site/Pages/v5/Ledgers/EndOfMonth.aspx b/Site/Pages/v5/Ledgers/EndOfMonth.aspx index 889f7288..4e3484bf 100644 --- a/Site/Pages/v5/Ledgers/EndOfMonth.aspx +++ b/Site/Pages/v5/Ledgers/EndOfMonth.aspx @@ -223,6 +223,14 @@ $('img.status-icon-pleasewait[data-item="' + itemId + '"]').hide(); $('img.status-icon-completed[data-item="' + itemId + '"]').fadeIn(); + // If any items depended on this one, enable them now + + var dependentItemId = $('span.action-list-item[data-dependson="' + itemId + '"]').attr("data-item"); + $('span.action-list-item[data-item="' + dependentItemId + '"]').removeClass('action-list-item-disabled'); + $('img.action-icon[data-item="' + dependentItemId + '"]').removeClass('action-icon-disabled'); + + // Check if group is complete + var selector = ".action-list-item:not(.action-list-item-completed):not(.action-list-item-disabled)[data-group='" + groupId + "']"; if ($(selector).length == 0) // no further actions in this group enabled { @@ -230,12 +238,6 @@ $(".group-status-icon[data-group='" + groupId + "']").fadeIn(); } - // If any items depended on this one, enable them now - - var dependentItemId = $('span.action-list-item[data-dependson="' + itemId + '"]').attr("data-item"); - $('span.action-list-item[data-item="' + dependentItemId + '"]').removeClass('action-list-item-disabled'); - $('img.action-icon[data-item="' + dependentItemId + '"]').removeClass('action-icon-disabled'); - } function clientStartedUpload() {