This commit is contained in:
Bengt Brodersen 2015-12-11 11:16:50 +01:00
parent b36a6a74b0
commit 8e8c1597fc
3 changed files with 42 additions and 44 deletions

View File

@ -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;
@ -97,10 +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("#hide-qr-code-checkbox").attr('checked', settings.hideQrCode );
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() {
@ -321,13 +321,9 @@
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;}"
jQuery("head", printDocument).append(style);
jQuery(".card", printDocument).css({ 'page-break-after': 'always', 'float': 'none', 'margin-bottom': '10px' });
}
}
@ -448,8 +444,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;
@ -457,8 +453,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;
@ -466,8 +462,8 @@
// 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;
@ -475,7 +471,7 @@
// show QR Code
result.find("#hide-qr-code-checkbox").click(function() {
result.find("#qr-code-checkbox").click(function() {
global.settings.hideQrCode = this.checked;
saveSettings();
redrawCards();

View File

@ -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;
@ -78,16 +79,17 @@ body {
overflow: hidden;
}
.card::after {
overflow: visible;
position: absolute;
top: -0.015rem;
left: -0.015rem;
content: "";
width: calc(100% - 0.03cm);
height: calc(100% - 0.03cm);
border-color: LightGray;
border-style: dashed;
border-width: 0.03cm;
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;

View File

@ -24,10 +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="hide-qr-code-checkbox" type="checkbox"/>Hide QR Code</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>