From 3525489ca1d8539a5b5d44de831cb276da27a58f Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Mon, 31 Dec 2018 15:46:02 +0100 Subject: [PATCH] EOM work 2 --- Site/Pages/v5/Ledgers/EndOfMonth.aspx | 38 +++++++++++++-------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/Site/Pages/v5/Ledgers/EndOfMonth.aspx b/Site/Pages/v5/Ledgers/EndOfMonth.aspx index 87af5aaa..21a29cef 100644 --- a/Site/Pages/v5/Ledgers/EndOfMonth.aspx +++ b/Site/Pages/v5/Ledgers/EndOfMonth.aspx @@ -286,30 +286,30 @@ function(result) { if (result.Success) { + markItemCompleted(activeUpload); + + // If there are items that depend on this one, + // disable their "skip" option now (because there's + // a first document in the series) + + var itemIterator = $('.action-list-item[data-dependson="' + activeUpload + '"]'); + + while (itemIterator.length > 0) { + // We're only supporting a 1:1 chain at this time, no 1:n dependencies + + var itemId = $(itemIterator).attr('data-item'); + $('span.action-list-item[data-item="' + itemId + '"] span.action-skip').addClass('action-skip-disabled'); + itemIterator = $('.action-list-item[data-dependson="' + itemId + '"]'); + } + + activeUpload = null; + } else { // Todo: add more error handling later, maybe clientFailedUpload(); } }); - - - markItemCompleted(activeUpload); - - // If there are items that depend on this one, - // disable their "skip" option now (because there's - // a first document in the series) - - var itemIterator = $('.action-list-item[data-dependson="' + activeUpload + '"]'); - - while (itemIterator.length > 0) { - // We're only supporting a 1:1 chain at this time, no 1:n dependencies - - var itemId = $(itemIterator).attr('data-item'); - $('span.action-list-item[data-item="' + itemId + '"] span.action-skip').addClass('action-skip-disabled'); - itemIterator = $('.action-list-item[data-dependson="' + itemId + '"]'); - } - - activeUpload = null; + } var uploadGuid = '<%=this.UploadControl.GuidString%>';