Merge branch 'develop' into gh-pages

* develop:
  add Scale
  add Scale
  add scale option
  add scale option
This commit is contained in:
Bengt Brodersen 2015-11-27 07:56:21 +01:00
commit 2d53109c1e
5 changed files with 306 additions and 329 deletions

View File

@ -1,9 +1,10 @@
(function() { (function() {
var global = {}; var global = {};
global.version = "4.2.4"; global.version = "4.2.6";
global.issueTrackingUrl = "https://github.com/qoomon/Jira-Issue-Card-Printer"; global.issueTrackingUrl = "https://github.com/qoomon/Jira-Issue-Card-Printer";
global.isDev = document.currentScript == null; global.isDev = document.currentScript == null;
global.isProd = !global.isDev; global.isProd = !global.isDev;
global.settings = {};
window.addEventListener("error", function(event) { window.addEventListener("error", function(event) {
var error = event.error; var error = event.error;
@ -24,14 +25,16 @@
// wait untill all scripts loaded // wait untill all scripts loaded
appendScript('https://qoomon.github.io/void', function() { appendScript('https://qoomon.github.io/void', function() {
init().then(function(){ init().then(function(){
main(); return main();
}).catch(function(cause){ }).catch(function(cause){
console.log("ERROR " + JSON.stringify(cause,2,2)); console.log("ERROR " + cause.stack);
alert("Sorry somthing went wrong. Please create an issue at " + global.issueTrackingUrl); alert("Sorry somthing went wrong.\n\nPlease create an issue at " + global.issueTrackingUrl + "\n\n" + cause.stack);
}); });
}); });
function main() { function main() {
var promises = [];
console.log("Run...") console.log("Run...")
// determine application // determine application
if (jQuery("meta[name='application-name'][ content='JIRA']").length > 0) { if (jQuery("meta[name='application-name'][ content='JIRA']").length > 0) {
@ -62,8 +65,16 @@
if (issueKeyList.length <= 0) { if (issueKeyList.length <= 0) {
alert("Please select at least one issue."); alert("Please select at least one issue.");
return; return;
} else if (issueKeyList.length > 100) {
confirm("Are you sure you want select " + issueKeyList.length + " issues?");
return;
} }
var settings = global.settings;
settings.scale = readCookie("card_printer_font_scale",1);
settings.rowCount = readCookie("card_printer_row_count",2);
settings.colCount = readCookie("card_printer_column_count", 1);
// open print preview // open print preview
jQuery("body").append(printPreviewElement()); jQuery("body").append(printPreviewElement());
jQuery("#card-print-overlay").prepend(printOverlayStyleElement()); jQuery("#card-print-overlay").prepend(printOverlayStyleElement());
@ -77,24 +88,24 @@
redrawCards(); redrawCards();
}); });
jQuery("#rowCount").val(readCookie("card_printer_row_count", 2)); jQuery("#font-scale-range").val(settings.scale);
jQuery("#columnCount").val(readCookie("card_printer_column_count", 1)); jQuery("#rowCount").val(settings.rowCount);
//jQuery("#font-scale-range").val(readCookie("card_printer_font_scale",1)); jQuery("#columnCount").val(settings.colCount);
jQuery("#single-card-page-checkbox").attr('checked', readCookie("card_printer_single_card_page", 'true') == 'true'); jQuery("#single-card-page-checkbox").attr('checked', readCookie("card_printer_single_card_page", 'true') == 'true');
jQuery("#hide-description-checkbox").attr('checked', readCookie("card_printer_hide_description", 'false') == 'true'); jQuery("#hide-description-checkbox").attr('checked', readCookie("card_printer_hide_description", 'false') == 'true');
jQuery("#hide-assignee-checkbox").attr('checked', readCookie("card_printer_hide_assignee", 'true') == 'true'); jQuery("#hide-assignee-checkbox").attr('checked', readCookie("card_printer_hide_assignee", 'true') == 'true');
jQuery("#hide-due-date-checkbox").attr('checked', readCookie("card_printer_hide_due_date", 'false') == 'true'); jQuery("#hide-due-date-checkbox").attr('checked', readCookie("card_printer_hide_due_date", 'false') == 'true');
jQuery("#hide-status-checkbox").attr('checked', readCookie("card_printer_hide_status", 'true') == 'true');
jQuery("#card-print-dialog-title").text("Card Printer " + global.version + " - Loading issues..."); jQuery("#card-print-dialog-title").text("Card Printer " + global.version + " - Loading issues...");
renderCards(issueKeyList).then(function() { promises.push(renderCards(issueKeyList).then(function() {
jQuery("#card-print-dialog-title").text("Card Printer " + global.version); jQuery("#card-print-dialog-title").text("Card Printer " + global.version);
//print(); }));
});
if (global.isProd) { if (global.isProd) {
ga('send', 'pageview'); ga('send', 'pageview');
} }
return Promise.all(promises);
} }
function init() { function init() {
@ -189,9 +200,7 @@
}); });
console.log("wait for resources loaded..."); console.log("wait for resources loaded...");
printDocument.close(); printDocument.close();
}).catch(function(cause){ });
console.log("ERROR " + JSON.stringify(cause))
});;
} }
function redrawCards() { function redrawCards() {
@ -301,16 +310,6 @@
jQuery("head", printDocument).append(style); jQuery("head", printDocument).append(style);
} }
// hide/show status
jQuery("#styleHideStatus", printDocument).remove();
if (!jQuery("#hide-status-checkbox")[0].checked) {
var style = document.createElement('style');
style.id = 'styleHideStatus';
style.type = 'text/css';
style.innerHTML = ".issue-status { display: none; }"
jQuery("head", printDocument).append(style);
}
// enable/disable single card page // enable/disable single card page
jQuery("#styleSingleCardPage", printDocument).remove(); jQuery("#styleSingleCardPage", printDocument).remove();
if (jQuery("#single-card-page-checkbox")[0].checked) { if (jQuery("#single-card-page-checkbox")[0].checked) {
@ -327,16 +326,14 @@
var printWindow = printFrame[0].contentWindow; var printWindow = printFrame[0].contentWindow;
var printDocument = printWindow.document; var printDocument = printWindow.document;
var columnCount = jQuery("#columnCount").val(); var scaleRoot = global.settings.scale;
var rowCount = jQuery("#rowCount").val(); var rowCount = global.settings.rowCount;
var columnCount = global.settings.colCount;
var cardCount = jQuery(".card", printDocument).length;
var pageCount = Math.ceil(cardCount / (columnCount * rowCount))
// scale // scale
// reset scale // reset scale
jQuery("html", printDocument).css("font-size", "1cm"); jQuery("html", printDocument).css("font-size", scaleRoot +"cm");
jQuery("#styleColumnCount", printDocument).remove(); jQuery("#styleColumnCount", printDocument).remove();
jQuery("#styleRowCount", printDocument).remove(); jQuery("#styleRowCount", printDocument).remove();
@ -356,7 +353,7 @@
// scale down // scale down
var scale = Math.min(scaleWidth, scaleHeight, 1); var scale = Math.min(scaleWidth, scaleHeight, 1);
if (scale < 1) { if (scale < 1) {
jQuery("html", printDocument).css("font-size", scale + "cm"); jQuery("html", printDocument).css("font-size", ( scaleRoot * scale) + "cm");
} }
// size // size
@ -455,24 +452,12 @@
return true; return true;
}); });
// show status
result.find("#hide-status-checkbox").click(function() {
writeCookie("card_printer_hide_status", this.checked);
redrawCards();
return true;
});
// scale font // scale font
result.find("#font-scale-range").on("input", function() { result.find("#font-scale-range").on("input", function() {
writeCookie("card_printer_font_scale", jQuery(this).val()); writeCookie("card_printer_font_scale", jQuery(this).val());
var printFrame = result.find("#card-print-dialog-content-iframe"); global.settings.scale = jQuery(this).val();
var printWindow = printFrame[0].contentWindow;
var printDocument = printWindow.document;
jQuery("html", printDocument).css("font-size", jQuery(this).val() + "cm");
redrawCards(); redrawCards();
}); });
@ -481,6 +466,9 @@
result.find("#rowCount").on("input", function() { result.find("#rowCount").on("input", function() {
writeCookie("card_printer_row_count", jQuery(this).val()); writeCookie("card_printer_row_count", jQuery(this).val());
global.settings.rowCount = jQuery(this).val();
redrawCards(); redrawCards();
}); });
result.find("#rowCount").click(function() { result.find("#rowCount").click(function() {
@ -490,6 +478,9 @@
result.find("#columnCount").on("input", function() { result.find("#columnCount").on("input", function() {
writeCookie("card_printer_column_count", jQuery(this).val()); writeCookie("card_printer_column_count", jQuery(this).val());
global.settings.colCount = jQuery(this).val();
redrawCards(); redrawCards();
}); });
result.find("#columnCount").click(function() { result.find("#columnCount").click(function() {
@ -857,7 +848,7 @@
if (/.*\/issues\/\?jql=.*/g.test(document.URL)) { if (/.*\/issues\/\?jql=.*/g.test(document.URL)) {
var jql = document.URL.replace(/.*\?jql=(.*)/, '$1'); var jql = document.URL.replace(/.*\?jql=(.*)/, '$1');
var jqlIssues = []; var jqlIssues = [];
var url = '/rest/api/2/search?jql=' + jql + "&maxResults=1000"; var url = '/rest/api/2/search?jql=' + jql + "&maxResults=500&fields=key";
console.log("IssueUrl: " + url); console.log("IssueUrl: " + url);
//console.log("Issue: " + issueKey + " Loading..."); //console.log("Issue: " + issueKey + " Loading...");
jQuery.ajax({ jQuery.ajax({
@ -1017,11 +1008,7 @@
issueData.url = window.location.origin + "/youtrack/issue/" + issueData.key; issueData.url = window.location.origin + "/youtrack/issue/" + issueData.key;
})); }));
return new Promise(function(resolve, reject) { return Promise.all(promises).then(function(results){return issueData;});
Promise.all(promises)
.then(function(){resolve(issueData);})
.catch(function(cause){reject(cause);});
});
}; };
module.getIssueData = function(issueKey) { module.getIssueData = function(issueKey) {
@ -1086,11 +1073,7 @@
issueData.url = data.url; issueData.url = data.url;
})); }));
return new Promise(function(resolve, reject) { return Promise.all(promises).then(function(results){return issueData;});
Promise.all(promises)
.then(function(){resolve(issueData);})
.catch(function(cause){reject(cause);});
});
}; };
module.getIssueData = function(issueKey, callback, async) { module.getIssueData = function(issueKey, callback, async) {
@ -1141,11 +1124,7 @@
issueData.url = data.shortUrl; issueData.url = data.shortUrl;
})); }));
return new Promise(function(resolve, reject) { return Promise.all(promises).then(function(results){return issueData;});
Promise.all(promises)
.then(function(){resolve(issueData);})
.catch(function(cause){reject(cause);});
});
}; };
module.getIssueData = function(issueKey, callback, async) { module.getIssueData = function(issueKey, callback, async) {

482
card.css
View File

@ -1,321 +1,319 @@
* { * {
box-sizing: border-box; box-sizing: border-box;
overflow: hidden; overflow: hidden;
} }
html { html {
background: WHITE; background: WHITE;
padding: 0rem; padding: 0rem;
margin: 0rem; margin: 0rem;
font-size: 1.3cm; font-size: 1.0cm;
overflow-y: scroll; overflow-y: scroll;
} }
body { body {
padding: 0rem; padding: 0rem;
margin: 0rem; margin: 0rem;
} }
.badge, .shadow { .badge, .shadow {
border-style: solid; border-style: solid;
border-color: #333; border-color: #333;
border-top-width: 0.12rem; border-top-width: 0.12rem;
border-left-width: 0.12rem; border-left-width: 0.12rem;
border-bottom-width: 0.21rem; border-bottom-width: 0.21rem;
border-right-width: 0.21rem; border-right-width: 0.21rem;
border-radius: 0.25rem; border-radius: 0.25rem;
} }
.badge { .badge {
// WHITESMOKE, GAINSBOROM; background-color: WHITESMOKE;
background-color: #E0E0E0;
} }
.hidden { .hidden {
display: none; display: none;
} }
.zigzag { .zigzag {
border-bottom-width: 0rem; border-bottom-width: 0rem;
} }
.zigzag::after { .zigzag::after {
position: absolute; position: absolute;
bottom: 0.03rem; bottom: 0.03rem;
left:-0.16rem; left: -0.16rem;
content:""; content: "";
width: 100%; width: 100%;
border-style:solid; border-style: solid;
border-bottom-width: 1rem; border-bottom-width: 1rem;
border-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/Tearing.png); border-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/Tearing.png);
border-image-width: 0 0 0.7rem 0; border-image-width: 0 0 0.7rem 0;
border-image-slice: 56 0 56 1; border-image-slice: 56 0 56 1;
border-image-repeat: round round; border-image-repeat: round round;
} }
#preload { #preload {
position: fixed; position: fixed;
top: 0rem; top: 0rem;
left: 100%; left: 100%;
} }
.author { .author {
color: DIMGREY; color: DIMGREY;
position: absolute; position: absolute;
top:0.35rem; top: 0.5rem;
left:calc(50% - 2rem); left: calc(50% - 2rem);
font-size: 0.6rem; font-size: 0.8rem;
overflow:visible; overflow: visible;
line-height: 0.38rem; line-height: 0.38rem;
} }
.author > span { .author > span:nth-of-type(2) {
position: relative; position: relative;
left: 0.23rem; top: 0.0rem;
font-size: 0.6em; left: 0.65rem;
text-align: center; font-size: 0.5em;
} }
.card { .card {
position: relative; position: relative;
float:left; float: left;
height: 100%; height: 100%;
width: 100%; width: 100%;
padding: 0.5cm; padding: 0.5cm;
min-width:14.5rem; min-width: 14.5rem;
min-height:10.0rem; min-height: 10.0rem;
border-color: LightGray; border-color: LightGray;
border-style: dotted; border-style: dotted;
border-width: 0.03cm; border-width: 0.03cm;
} }
.card-content { .card-content {
position: relative; position: relative;
height: 100%; height: 100%;
// find .card-header; // find .card-header;
padding-top: 2rem; padding-top: 2rem;
// find .card-footer; // find .card-footer;
padding-bottom: 1.3rem; padding-bottom: 1.3rem;
} }
.card-body { .card-body {
position: relative; position: relative;
height: 100%; height: 100%;
margin-left: 0.4rem; margin-left: 0.4rem;
margin-right: 0.4rem; margin-right: 0.4rem;
padding-top: 1.1rem; padding-top: 1.1rem;
padding-bottom: 1.1rem; padding-bottom: 1.1rem;
padding-left: 0.4rem; padding-left: 0.4rem;
padding-right: 0.4rem; padding-right: 0.4rem;
background: WHITE; background: WHITE;
} }
.card-header { .card-header {
position: absolute; position: absolute;
top: 0rem; top: 0rem;
height: 4.2rem; height: 4.2rem;
width: 100%; width: 100%;
} }
.card-footer { .card-footer {
position: absolute; position: absolute;
bottom: 0rem; bottom: 0rem;
height: 2.2rem; height: 2.2rem;
width: 100%; width: 100%;
} }
.issue-summary { .issue-summary {
font-weight: bold; font-weight: bold;
font-size: 0.9rem; font-size: 0.9rem;
} }
.issue-description { .issue-description {
margin-top: 0.1rem; margin-top: 0.1rem;
display: block; display: block;
font-size: 0.6rem; font-size: 0.6rem;
line-height: 0.62rem; line-height: 0.62rem;
overflow: hidden; overflow: hidden;
} }
.issue-description p:first-of-type { .issue-description p:first-of-type {
margin-top: 0rem; margin-top: 0rem;
} }
.issue-description p:last-of-type { .issue-description p:last-of-type {
margin-bottom: 0rem; margin-bottom: 0rem;
} }
.issue-id { .issue-id {
position: absolute; position: absolute;
left: 1rem; left: 1rem;
top: 1.2rem; top: 1.2rem;
height: 1.5rem; height: 1.5rem;
max-width: calc(100% - 7.5rem); max-width: calc(100% - 7.5rem);
min-width: 6.0rem; min-width: 6.0rem;
padding-left: 2.1rem; padding-left: 2.1rem;
padding-right: 0.4rem; padding-right: 0.4rem;
background-color: WHITESMOKE; background-color: WHITESMOKE;
line-height: 1.3rem; line-height: 1.3rem;
font-size: 0.8rem; font-size: 0.8rem;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
white-space: nowrap; white-space: nowrap;
direction: rtl; direction: rtl;
} }
.issue-id-fadeout { .issue-id-fadeout {
position: absolute; position: absolute;
left: 2.4rem; left: 2.4rem;
top: 1.3rem; top: 1.3rem;
width: 1.2rem; width: 1.2rem;
height: 1.2rem; height: 1.2rem;
z-index: 0; z-index: 0;
background: linear-gradient(to left, rgba(224, 224, 224, 0) 0%, rgba(224, 224, 224, 1) 60%); background: linear-gradient(to left, rgba(224, 224, 224, 0) 0%, rgba(224, 224, 224, 1) 60%);
} }
.issue-icon { .issue-icon {
position: absolute; position: absolute;
left: 0rem; left: 0rem;
top: 0rem; top: 0rem;
height: 3.0rem; height: 3.0rem;
width: 3.0rem; width: 3.0rem;
border-radius: 50%; border-radius: 50%;
background-color: LIGHTSEAGREEN; background-color: LIGHTSEAGREEN;
background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Objects.png); background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Objects.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
background-size: 63%; background-size: 63%;
} }
.issue-icon[type="story"], .issue-icon[type="user story"] { .issue-icon[type="story"], .issue-icon[type="user story"] {
background-color: GOLD; background-color: GOLD;
background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Bulb.png); background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Bulb.png);
} }
.issue-icon[type="bug"], .issue-icon[type="correction"] { .issue-icon[type="bug"], .issue-icon[type="correction"] {
background-color: CRIMSON; background-color: CRIMSON;
background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Bug.png); background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Bug.png);
} }
.issue-icon[type="epic"] { .issue-icon[type="epic"] {
background-color: ROYALBLUE; background-color: ROYALBLUE;
background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Flash.png); background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Flash.png);
} }
.issue-icon[type="task"] { .issue-icon[type="task"] {
background-color: WHEAT; background-color: WHEAT;
background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Task.png); background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Task.png);
} }
.issue-icon[type="new feature"] { .issue-icon[type="new feature"] {
background-color: LIMEGREEN; background-color: LIMEGREEN;
background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Plus.png); background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Plus.png);
} }
.issue-icon[type="improvement"] { .issue-icon[type="improvement"] {
background-color: CORNFLOWERBLUE; background-color: CORNFLOWERBLUE;
background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Arrow.png); background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Arrow.png);
} }
.issue-estimate { .issue-estimate {
position: absolute; position: absolute;
left: 2.5rem; left: 2.5rem;
top: 0.0rem; top: 0.0rem;
height: 1.6rem; height: 1.6rem;
width: 1.6rem; width: 1.6rem;
border-radius: 50%; border-radius: 50%;
background-color: WHITESMOKE; background-color: WHITESMOKE;
line-height: 1.4rem; line-height: 1.4rem;
font-size: 0.9rem; font-size: 0.9rem;
font-weight: bold; font-weight: bold;
text-align: center; text-align: center;
} }
.issue-qr-code { .issue-qr-code {
position: absolute; position: absolute;
left:0rem; left: 0rem;
top: 0rem; top: 0rem;
width: 2.2rem; width: 2.2rem;
height: 2.2rem; height: 2.2rem;
background-image: url(https://chart.googleapis.com/chart?cht=qr&chs=256x256&chld=L|1&chl=blog.qoomon.com); background-image: url(https://chart.googleapis.com/chart?cht=qr&chs=256x256&chld=L|1&chl=blog.qoomon.com);
background-repeat: no-repeat; background-repeat: no-repeat;
background-size: cover; background-size: cover;
background-position: center; background-position: center;
} }
.issue-attachment { .issue-attachment {
position: absolute; position: absolute;
left:2.5rem; left: 2.5rem;
top: 0rem; top: 0rem;
width: 2.0rem; width: 2.0rem;
height: 2.0rem; height: 2.0rem;
border-radius: 50%; border-radius: 50%;
background-color: LIGHTSKYBLUE; background-color: LIGHTSKYBLUE;
background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Attachment.png); background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Attachment.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
background-size: 70%; background-size: 70%;
} }
.issue-assignee { .issue-assignee {
position: absolute; position: absolute;
top:0rem; top: 0rem;
right:0rem; right: 0rem;
width: 2.2rem; width: 2.2rem;
height: 2.2rem; height: 2.2rem;
border-radius: 50%; border-radius: 50%;
background-color: WHITESMOKE; background-color: WHITESMOKE;
//background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Person.png); //background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Person.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
background-size: cover; background-size: cover;
//-webkit-filter: contrast(200%) grayscale(100%); //-webkit-filter: contrast(200%) grayscale(100%);
//filter: contrast(200%) grayscale(100%); //filter: contrast(200%) grayscale(100%);
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
font-size: 1.4rem; font-size: 1.4rem;
line-height: 1.9rem; line-height: 1.9rem;
} }
.issue-epic-box { .issue-epic-box {
position: absolute; position: absolute;
right:2.5rem; right: 2.5rem;
top: 0rem; top: 0rem;
width: auto; width: auto;
min-width: 2rem; min-width: 2rem;
width: auto; width: auto;
max-width: calc(100% - 7.5rem); max-width: calc(100% - 7.5rem);
height: auto; height: auto;
max-height: 2.2rem; max-height: 2.2rem;
padding-top: 0.1rem; padding-top: 0.1rem;
padding-bottom: 0.2rem; padding-bottom: 0.2rem;
padding-left: 0.3rem; padding-left: 0.3rem;
padding-right: 0.3rem; padding-right: 0.3rem;
text-align: left; text-align: left;
font-size: 0.5rem; font-size: 0.5rem;
line-height: 0.55rem; line-height: 0.55rem;
} }
.issue-epic-id { .issue-epic-id {
font-size: 0.5rem; font-size: 0.5rem;
font-weight: bold; font-weight: bold;
max-width: 1rem; max-width: 1rem;
} }
.issue-epic-name { .issue-epic-name {
margin-left: 0.1rem; margin-left: 0.1rem;
font-size: 0.6rem; font-size: 0.6rem;
font-weight: bold; font-weight: bold;
} }
.issue-due-date-box { .issue-due-date-box {
position: absolute; position: absolute;
right: 0rem; right: 0rem;
top: 0rem; top: 0rem;
overflow: visible !important; overflow: visible !important;
} }
.issue-due-date { .issue-due-date {
position: absolute; position: absolute;
top: 1.3rem; top: 1.3rem;
right: 1rem; right: 1rem;
width: 5.3rem; width: 5.3rem;
min-width: 2.8rem; min-width: 2.8rem;
height: 1.3rem; height: 1.3rem;
padding-left: 0.2rem; padding-left: 0.2rem;
padding-right: 1.4rem; padding-right: 1.4rem;
text-align: center; text-align: center;
font-weight: bold; font-weight: bold;
font-size: 0.7rem; font-size: 0.7rem;
line-height: 1.0rem; line-height: 1.0rem;
} }
.issue-due-icon { .issue-due-icon {
position: absolute; position: absolute;
top: 0.5rem; top: 0.5rem;
right: 0rem; right: 0rem;
width: 2.5rem; width: 2.5rem;
height: 2.5rem; height: 2.5rem;
border-radius: 50%; border-radius: 50%;
background-color: ORCHID; background-color: ORCHID;
background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/AlarmClock.png); background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/AlarmClock.png);
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: center; background-position: center;
background-size: 65%; background-size: 65%;
} }
@media print { @media print {
@page { @page {
margin: 0.0mm; margin: 0.0mm;
padding: 0.0mm; padding: 0.0mm;
} }
html { html {
-webkit-print-color-adjust:exact; -webkit-print-color-adjust: exact;
print-color-adjust: exact; print-color-adjust: exact;
} }
.card { .card {
page-break-inside: avoid; page-break-inside: avoid;
} }
} }

View File

@ -1,31 +1,32 @@
<div class="card"> <div class="card">
<div class="card-content"> <div class="card-content">
<div class="card-body shadow"> <div class="card-body shadow">
<div class="issue-summary"></div> <div class="issue-summary"></div>
<div class="issue-description"></div> <div class="issue-description"></div>
</div>
<div class="card-header">
<div class="issue-id badge"></div>
<div class="issue-id-fadeout"></div>
<div class="issue-icon badge" type="story"></div>
<div class="issue-estimate badge"></div>
<div class="issue-due-box">
<div class="issue-due-date badge"></div>
<div class="issue-due-icon badge"></div>
</div> </div>
<div class="card-header"> </div>
<div class="issue-id badge"></div> <div class="card-footer">
<div class="issue-id-fadeout"></div> <div class="issue-qr-code badge"></div>
<div class="issue-icon badge" type="story"></div> <div class="issue-attachment badge"></div>
<div class="issue-estimate badge"></div> <div class="issue-assignee badge"></div>
<div class="issue-due-box"> <div class="issue-epic-box badge">
<div class="issue-due-date badge"></div> <span class="issue-epic-id"></span>
<div class="issue-due-icon badge"></div> <span class="issue-epic-name"></span>
</div>
</div>
<div class="card-footer">
<div class="issue-qr-code badge"></div>
<div class="issue-attachment badge"></div>
<div class="issue-assignee badge"></div>
<div class="issue-epic-box badge">
<span class="issue-epic-id"></span>
<span class="issue-epic-name"></span>
</div>
</div> </div>
</div>
</div> </div>
<div class="author"> <div class="author">
<span>©BengtBrodersen</span><br> <span>qoomon.com</span>
qoomon.com <br>
<span>©BengtBrodersen</span>
</div> </div>
</div> </div>

View File

@ -13,14 +13,13 @@
</div> </div>
<div id="card-print-dialog-footer"> <div id="card-print-dialog-footer">
<div class="buttons"> <div class="buttons">
<label style="display:none; margin-right:10px"><input id="font-scale-range" type="range" min="0.4" max="1.6" step="0.1" value="1.0" />Font Scale</label> <label style="margin-right:10px; padding-right: 3px;"><input id="font-scale-range" type="range" min="0.5" max="2.0" step="0.01" style="width: 100px; position: relative; top: 2px; margin-right:5px;" value="1.0" />Scale</label>
<label style="margin-right:10px;"><input id="rowCount" type="text" class="text" maxlength="1" style="width: 10px;" value="2"/>Row Count</label> <label style="margin-right:0px;"><input id="rowCount" type="text" class="text" maxlength="1" style="width: 10px;" value="2"/>x</label>
<label style="margin-right:10px;"><input id="columnCount" type="text" class="text" maxlength="1" style="width: 10px;" value="1"/>Column Count</label> <label style="margin-right:10px;"><input id="columnCount" type="text" class="text" maxlength="1" style="width: 10px; margin-right:5px;" value="1"/>Page Grid</label>
<label style="margin-right:10px"><input id="single-card-page-checkbox" type="checkbox"/>Single Card Per Page</label> <label style="margin-right:10px"><input id="single-card-page-checkbox" type="checkbox"/>Single Card Per Page</label>
<label style="margin-right:10px"><input id="hide-description-checkbox" type="checkbox"/>Hide Description</label> <label style="margin-right:10px"><input id="hide-description-checkbox" type="checkbox"/>Hide Description</label>
<label style="margin-right:10px"><input id="hide-assignee-checkbox" type="checkbox"/>Hide Assignee</label> <label style="margin-right:10px"><input id="hide-assignee-checkbox" type="checkbox"/>Hide Assignee</label>
<label style="margin-right:10px"><input id="hide-due-date-checkbox" type="checkbox"/>Hide Due Date</label> <label style="margin-right:10px"><input id="hide-due-date-checkbox" type="checkbox"/>Hide Due Date</label>
<label style="display:none; margin-right:10px"><input id="hide-status-checkbox" type="checkbox"/>Hide Status</label>
<input id="card-print-dialog-print" type="button" class="aui-button aui-button-primary" value="Print" /> <input id="card-print-dialog-print" type="button" class="aui-button aui-button-primary" value="Print" />
<a id="card-print-dialog-cancel" title="Cancel" class="cancel">Cancel</a> <a id="card-print-dialog-cancel" title="Cancel" class="cancel">Cancel</a>
</div> </div>

View File