diff --git a/bookmarklet.js b/bookmarklet.js index c9e8d3f..b5b6382 100644 --- a/bookmarklet.js +++ b/bookmarklet.js @@ -55,15 +55,7 @@ return; } - // collect selcted issues - var issueKeyList = global.appFunctions.getSelectedIssueKeyList(); - if (issueKeyList.length <= 0) { - alert("Please select at least one issue."); - return; - } else if (issueKeyList.length > 30) { - confirm("Are you sure you want select " + issueKeyList.length + " issues?"); - return; - } + // add overlay frame var appFrame = createOverlayFrame(); @@ -89,6 +81,18 @@ printFrame.window.addEventListener("resize", redrawCards); printFrame.window.matchMedia("print").addListener(redrawCards); + // collect selcted issues + var issueKeyList = global.appFunctions.getSelectedIssueKeyList(); + if (issueKeyList.length <= 0) { + alert("Please select at least one issue."); + return; + } else if (issueKeyList.length > 30) { + var confirmResult = confirm("Are you sure you want select " + issueKeyList.length + " issues?"); + if (!confirmResult) { + return; + } + } + // render cards promises.push(renderCards(issueKeyList)); @@ -220,7 +224,6 @@ $.each(issueKeyList, function(index, issueKey) { var card = cardElement(issueKey); card.attr("index", index); - card.hide(); card.find('.issue-id').text(issueKey); $("body", printFrameDocument).append(card); @@ -229,7 +232,6 @@ ga('send', 'event', 'card', 'generate', cardData.type); fillCard(card, cardData); redrawCards(); - card.show(); })); }); diff --git a/card.css b/card.css index 9cf8c09..7b341dc 100644 --- a/card.css +++ b/card.css @@ -178,6 +178,10 @@ body { background-position: center; background-size: 63%; } +.issue-icon[type="loading"]{ + background-color: DEEPSKYBLUE; + background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/CloudLoading.png); +} .issue-icon[type="story"], .issue-icon[type="user story"] { background-color: GOLD; background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Bulb.png); diff --git a/card.html b/card.html index 1685f0a..228bae8 100644 --- a/card.html +++ b/card.html @@ -1,4 +1,4 @@ -