Merge branch 'develop' into gh-pages
This commit is contained in:
commit
77f645b718
@ -6,7 +6,7 @@
|
||||
// YouTrack: http://qoomon.myjetbrains.com/youtrack/dashboard
|
||||
|
||||
var global = {};
|
||||
global.version = "4.3.5";
|
||||
global.version = "4.3.6";
|
||||
global.issueTrackingUrl = "https://github.com/qoomon/Jira-Issue-Card-Printer";
|
||||
global.isDev = document.currentScript == null;
|
||||
global.isProd = !global.isDev;
|
||||
@ -70,7 +70,7 @@
|
||||
if (issueKeyList.length <= 0) {
|
||||
alert("Please select at least one issue.");
|
||||
return;
|
||||
} else if (issueKeyList.length > 100) {
|
||||
} else if (issueKeyList.length > 30) {
|
||||
confirm("Are you sure you want select " + issueKeyList.length + " issues?");
|
||||
return;
|
||||
}
|
||||
@ -97,9 +97,10 @@
|
||||
jQuery("#columnCount").val(settings.colCount);
|
||||
|
||||
jQuery("#single-card-page-checkbox").attr('checked', settings.singleCardPage );
|
||||
jQuery("#hide-description-checkbox").attr('checked', settings.hideDescription );
|
||||
jQuery("#hide-assignee-checkbox").attr('checked', settings.hideAssignee );
|
||||
jQuery("#hide-due-date-checkbox").attr('checked', settings.hideDueDate );
|
||||
jQuery("#description-checkbox").attr('checked', !settings.hideDescription );
|
||||
jQuery("#assignee-checkbox").attr('checked', !settings.hideAssignee );
|
||||
jQuery("#due-date-checkbox").attr('checked', !settings.hideDueDate );
|
||||
jQuery("#qr-code-checkbox").attr('checked', !settings.hideQrCode );
|
||||
|
||||
jQuery("#card-print-dialog-title").text("Card Printer " + global.version + " - Loading issues...");
|
||||
promises.push(renderCards(issueKeyList).then(function() {
|
||||
@ -161,6 +162,7 @@
|
||||
writeCookie("card_printer_hide_description", settings.hideDescription);
|
||||
writeCookie("card_printer_hide_assignee", settings.hideAssignee);
|
||||
writeCookie("card_printer_hide_due_date", settings.hideDueDate);
|
||||
writeCookie("card_printer_hide_qr_code", settings.hideQrCode);
|
||||
}
|
||||
|
||||
function loadSettings(){
|
||||
@ -173,6 +175,7 @@
|
||||
settings.hideDescription = parseBool(readCookie("card_printer_hide_description"), false);
|
||||
settings.hideAssignee = parseBool(readCookie("card_printer_hide_assignee"), false);
|
||||
settings.hideDueDate = parseBool(readCookie("card_printer_hide_due_date"), false);
|
||||
settings.hideQrCode = parseBool(readCookie("card_printer_hide_qr_code"), false);
|
||||
}
|
||||
|
||||
function print() {
|
||||
@ -230,6 +233,7 @@
|
||||
});
|
||||
console.log("wait for resources loaded...");
|
||||
printDocument.close();
|
||||
redrawCards();
|
||||
});
|
||||
}
|
||||
|
||||
@ -266,26 +270,26 @@
|
||||
card.find(".issue-assignee").text(data.assignee[0].toUpperCase());
|
||||
}
|
||||
} else {
|
||||
card.find(".issue-assignee").addClass("hidden");
|
||||
card.find(".issue-assignee").remove();
|
||||
}
|
||||
|
||||
//Due-Date
|
||||
if (data.dueDate) {
|
||||
card.find(".issue-due-date").text(data.dueDate);
|
||||
} else {
|
||||
card.find(".issue-due-box").addClass("hidden");
|
||||
card.find(".issue-due-box").remove();
|
||||
}
|
||||
|
||||
//Attachment
|
||||
if (data.hasAttachment) {} else {
|
||||
card.find('.issue-attachment').addClass('hidden');
|
||||
card.find('.issue-attachment').remove();
|
||||
}
|
||||
|
||||
//Story Points
|
||||
if (data.storyPoints) {
|
||||
card.find(".issue-estimate").text(data.storyPoints);
|
||||
} else {
|
||||
card.find(".issue-estimate").addClass("hidden");
|
||||
card.find(".issue-estimate").remove();
|
||||
}
|
||||
|
||||
//Epic
|
||||
@ -293,7 +297,7 @@
|
||||
card.find(".issue-epic-id").text(data.superIssue.key);
|
||||
card.find(".issue-epic-name").text(data.superIssue.summary);
|
||||
} else {
|
||||
card.find(".issue-epic-box").addClass("hidden");
|
||||
card.find(".issue-epic-box").remove();
|
||||
}
|
||||
|
||||
//QR-Code
|
||||
@ -309,43 +313,18 @@
|
||||
var printDocument = printWindow.document;
|
||||
|
||||
// hide/show description
|
||||
jQuery("#styleHideDescription", printDocument).remove();
|
||||
if (settings.hideDescription) {
|
||||
var style = document.createElement('style');
|
||||
style.id = 'styleHideDescription';
|
||||
style.type = 'text/css';
|
||||
style.innerHTML = ".issue-description { display: none; }"
|
||||
jQuery("head", printDocument).append(style);
|
||||
}
|
||||
|
||||
jQuery(".issue-description", printDocument).toggle(!settings.hideDescription);
|
||||
// hide/show assignee
|
||||
jQuery("#styleHideAssignee", printDocument).remove();
|
||||
if (settings.hideAssignee) {
|
||||
var style = document.createElement('style');
|
||||
style.id = 'styleHideAssignee';
|
||||
style.type = 'text/css';
|
||||
style.innerHTML = ".issue-assignee { display: none; }"
|
||||
jQuery("head", printDocument).append(style);
|
||||
}
|
||||
|
||||
jQuery(".issue-assignee", printDocument).toggle(!settings.hideAssignee);
|
||||
// hide/show assignee
|
||||
jQuery("#styleHideDueDate", printDocument).remove();
|
||||
if (settings.hideDueDate) {
|
||||
var style = document.createElement('style');
|
||||
style.id = 'styleHideDueDate';
|
||||
style.type = 'text/css';
|
||||
style.innerHTML = ".issue-due-box { display: none; }"
|
||||
jQuery("head", printDocument).append(style);
|
||||
}
|
||||
jQuery(".issue-due-box", printDocument).toggle(!settings.hideDueDate);
|
||||
// hide/show cr code
|
||||
jQuery(".issue-qr-code", printDocument).toggle(!settings.hideQrCode);
|
||||
|
||||
// enable/disable single card page
|
||||
jQuery("#styleSingleCardPage", printDocument).remove();
|
||||
jQuery(".card", printDocument).css({ 'page-break-after' : '', 'float' : '', 'margin-bottom': '' });
|
||||
if (settings.singleCardPage) {
|
||||
var style = document.createElement('style');
|
||||
style.id = 'styleSingleCardPage';
|
||||
style.type = 'text/css';
|
||||
style.innerHTML = ".card { page-break-after: always; float: none; margin-bottom: 0.5cm}"
|
||||
jQuery("head", printDocument).append(style);
|
||||
jQuery(".card", printDocument).css({ 'page-break-after': 'always', 'float': 'none', 'margin-bottom': '10px' });
|
||||
}
|
||||
}
|
||||
|
||||
@ -466,8 +445,8 @@
|
||||
|
||||
// hide description
|
||||
|
||||
result.find("#hide-description-checkbox").click(function() {
|
||||
global.settings.hideDescription = this.checked;
|
||||
result.find("#description-checkbox").click(function() {
|
||||
global.settings.hideDescription = !this.checked;
|
||||
saveSettings();
|
||||
redrawCards();
|
||||
return true;
|
||||
@ -475,8 +454,8 @@
|
||||
|
||||
// show assignee
|
||||
|
||||
result.find("#hide-assignee-checkbox").click(function() {
|
||||
global.settings.hideAssignee = this.checked;
|
||||
result.find("#assignee-checkbox").click(function() {
|
||||
global.settings.hideAssignee = !this.checked;
|
||||
saveSettings();
|
||||
redrawCards();
|
||||
return true;
|
||||
@ -484,8 +463,17 @@
|
||||
|
||||
// show due date
|
||||
|
||||
result.find("#hide-due-date-checkbox").click(function() {
|
||||
global.settings.hideDueDate = this.checked;
|
||||
result.find("#due-date-checkbox").click(function() {
|
||||
global.settings.hideDueDate = !this.checked;
|
||||
saveSettings();
|
||||
redrawCards();
|
||||
return true;
|
||||
});
|
||||
|
||||
// show QR Code
|
||||
|
||||
result.find("#qr-code-checkbox").click(function() {
|
||||
global.settings.hideQrCode = !this.checked;
|
||||
saveSettings();
|
||||
redrawCards();
|
||||
return true;
|
||||
|
||||
48
card.css
48
card.css
@ -18,7 +18,7 @@ body {
|
||||
}
|
||||
.badge, .shadow {
|
||||
border-style: solid;
|
||||
border-color: #333;
|
||||
border-color: #454545;
|
||||
border-top-width: 0.12rem;
|
||||
border-left-width: 0.12rem;
|
||||
border-bottom-width: 0.21rem;
|
||||
@ -35,17 +35,18 @@ body {
|
||||
border-bottom-width: 0rem;
|
||||
}
|
||||
.zigzag::after {
|
||||
position: absolute;
|
||||
bottom: 0.03rem;
|
||||
left: -0.16rem;
|
||||
content: "";
|
||||
width: 100%;
|
||||
border-style: solid;
|
||||
border-bottom-width: 1rem;
|
||||
border-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/Tearing.png);
|
||||
border-image-width: 0 0 0.7rem 0;
|
||||
border-image-slice: 56 0 56 1;
|
||||
border-image-repeat: round round;
|
||||
box-sizing: border-box;
|
||||
position: absolute;
|
||||
bottom: 0.00rem;
|
||||
left: 0.0rem;
|
||||
content: "";
|
||||
width: 100%;
|
||||
border-style: solid;
|
||||
border-bottom-width: 0.5rem;
|
||||
border-image: url(https://rawgit.com/qoomon/Jira-Issue-Card-Printer/develop/resources//Tearing.png);
|
||||
border-image-width: 0 0 0.7rem 0;
|
||||
border-image-slice: 56 0 56 1;
|
||||
border-image-repeat: round round;
|
||||
}
|
||||
#preload {
|
||||
position: fixed;
|
||||
@ -75,19 +76,20 @@ body {
|
||||
padding: 0.5rem;
|
||||
min-width: 14.5rem;
|
||||
min-height: 8.65rem;
|
||||
overflow: visible;
|
||||
overflow: hidden;
|
||||
}
|
||||
.card::after {
|
||||
overflow: visible;
|
||||
position: absolute;
|
||||
top: -0.015rem;
|
||||
left: -0.015rem;
|
||||
content: "";
|
||||
width: calc(100% - 0.015cm);
|
||||
height: calc(100% - 0.015cm);
|
||||
border-color: LightGray;
|
||||
border-style: dashed;
|
||||
border-width: 0.03cm;
|
||||
box-sizing: border-box;
|
||||
overflow: visible;
|
||||
position: absolute;
|
||||
top: 0.0rem;
|
||||
left: 0.0rem;
|
||||
content: "";
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-color: LightGray;
|
||||
border-style: dashed;
|
||||
border-width: 0.03cm;
|
||||
}
|
||||
.card-content {
|
||||
position: relative;
|
||||
|
||||
@ -24,9 +24,10 @@
|
||||
<output name="amount" for="scaleRange"></output> Scale</form>
|
||||
</div>
|
||||
<div style="float: left; margin-right:10px"><input id="single-card-page-checkbox" type="checkbox"/>Single Card Per Page</div>
|
||||
<div style="float: left; margin-right:10px"><input id="hide-description-checkbox" type="checkbox"/>Hide Description</div>
|
||||
<div style="float: left; margin-right:10px"><input id="hide-assignee-checkbox" type="checkbox"/>Hide Assignee</div>
|
||||
<div style="float: left; margin-right:10px"><input id="hide-due-date-checkbox" type="checkbox"/>Hide Due Date</div>
|
||||
<div style="float: left; margin-right:10px"><input id="description-checkbox" type="checkbox"/>Description</div>
|
||||
<div style="float: left; margin-right:10px"><input id="assignee-checkbox" type="checkbox"/>Assignee</div>
|
||||
<div style="float: left; margin-right:10px"><input id="due-date-checkbox" type="checkbox"/>Due Date</div>
|
||||
<div style="float: left; margin-right:10px"><input id="qr-code-checkbox" type="checkbox"/>QR Code</div>
|
||||
|
||||
<input style="float: right;" id="card-print-dialog-print" type="button" class="aui-button aui-button-primary" value="Print" />
|
||||
<a style="float: right;" id="card-print-dialog-cancel" title="Cancel" class="cancel">Cancel</a>
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user