From dd2dc0fdc447ac7c7d3bc469103c1c3ee04557c8 Mon Sep 17 00:00:00 2001 From: Rick Falkvinge Date: Thu, 20 Dec 2018 18:00:09 +0100 Subject: [PATCH] Testing skip disabling on upload --- Site/Pages/v5/Ledgers/EndOfMonth.aspx | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Site/Pages/v5/Ledgers/EndOfMonth.aspx b/Site/Pages/v5/Ledgers/EndOfMonth.aspx index 013c091f..930a90af 100644 --- a/Site/Pages/v5/Ledgers/EndOfMonth.aspx +++ b/Site/Pages/v5/Ledgers/EndOfMonth.aspx @@ -251,9 +251,25 @@ return; } + var itemId = $(activeUpload).attr('data-item'); + // TODO: AJAX CALL TO STORE UPLOAD activeUpload = null; + + // 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="' + itemId + '"]'); + + while (itemIterator.length > 0) { + // We're only supporting a 1:1 chain at this time, no 1:n dependencies + + 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 + '"]'); + } } var uploadGuid = '<%=this.UploadControl.GuidString%>';