no message
This commit is contained in:
parent
74608dbdf8
commit
3913a41d8a
@ -4,18 +4,21 @@
|
|||||||
// PivotTracker: https://www.pivotaltracker.com/n/projects/510733
|
// PivotTracker: https://www.pivotaltracker.com/n/projects/510733
|
||||||
// Trello: https://trello.com/b/8zlPSh70/spike
|
// Trello: https://trello.com/b/8zlPSh70/spike
|
||||||
// YouTrack: http://qoomon.myjetbrains.com/youtrack/dashboard
|
// YouTrack: http://qoomon.myjetbrains.com/youtrack/dashboard
|
||||||
|
|
||||||
var global = {};
|
var global = {};
|
||||||
global.version = "4.4.0";
|
global.version = "4.4.0";
|
||||||
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.isProd = !global.isDev;
|
|
||||||
|
|
||||||
|
global.isDev = document.currentScript == null;
|
||||||
|
|
||||||
|
// enforce jQuery
|
||||||
if (typeof jQuery == 'undefined') {
|
if (typeof jQuery == 'undefined') {
|
||||||
alert("jQuery is required!\n\nPlease create an issue at " + global.issueTrackingUrl);
|
alert("jQuery is required!\n\nPlease create an issue at " + global.issueTrackingUrl);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
var $ = jQuery;
|
var $ = jQuery;
|
||||||
|
|
||||||
|
// run
|
||||||
try {
|
try {
|
||||||
init().then(main).catch(handleError);
|
init().then(main).catch(handleError);
|
||||||
} catch (e) {
|
} catch (e) {
|
||||||
@ -86,12 +89,13 @@
|
|||||||
printFrame.window.addEventListener("resize", redrawCards);
|
printFrame.window.addEventListener("resize", redrawCards);
|
||||||
printFrame.window.matchMedia("print").addListener(redrawCards);
|
printFrame.window.matchMedia("print").addListener(redrawCards);
|
||||||
|
|
||||||
$("#card-print-dialog-title", global.appFrame.document).text("Card Printer " + global.version + " - Loading issues...");
|
// render cards
|
||||||
promises.push(renderCards(issueKeyList).then(function() {
|
promises.push(renderCards(issueKeyList));
|
||||||
$("#card-print-dialog-title", global.appFrame.document).text("Card Printer " + global.version);
|
|
||||||
}));
|
|
||||||
|
|
||||||
return Promise.all(promises);
|
$("#card-print-dialog-title", global.appFrame.document).text("Card Printer " + global.version + " - Loading issues...");
|
||||||
|
return Promise.all(promises).then(function() {
|
||||||
|
$("#card-print-dialog-title", global.appFrame.document).text("Card Printer " + global.version);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
function init() {
|
function init() {
|
||||||
@ -205,6 +209,7 @@
|
|||||||
|
|
||||||
printFrameDocument.open();
|
printFrameDocument.open();
|
||||||
printFrameDocument.write("<head/><body></body>");
|
printFrameDocument.write("<head/><body></body>");
|
||||||
|
printFrameDocument.close();
|
||||||
|
|
||||||
$("head", printFrameDocument).append(cardElementStyle());
|
$("head", printFrameDocument).append(cardElementStyle());
|
||||||
$("body", printFrameDocument).append("<div id='preload'/>");
|
$("body", printFrameDocument).append("<div id='preload'/>");
|
||||||
@ -228,12 +233,6 @@
|
|||||||
}));
|
}));
|
||||||
});
|
});
|
||||||
|
|
||||||
printFrameDocument.close();
|
|
||||||
|
|
||||||
promises.push(new Promise(function(resolve){
|
|
||||||
printFrameDocument.onload = resolve;
|
|
||||||
}));
|
|
||||||
|
|
||||||
console.log("wait for issues loaded...");
|
console.log("wait for issues loaded...");
|
||||||
return Promise.all(promises).then(function() {
|
return Promise.all(promises).then(function() {
|
||||||
console.log("...all issues loaded.");
|
console.log("...all issues loaded.");
|
||||||
@ -623,7 +622,12 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function writeCookie(name, value) {
|
function writeCookie(name, value) {
|
||||||
document.cookie = name + "=" + value + "; path=/";
|
var expireDate = new Date(); // current date & time
|
||||||
|
expireDate.setFullYear(expireDate.getFullYear() + 1) // one year
|
||||||
|
document.cookie = name + "=" + value + "; path=/; expires=" + expireDate.toGMTString();
|
||||||
|
|
||||||
|
// cleanup due to former path
|
||||||
|
document.cookie = name + "=; expires=" + new Date(0).toGMTString();
|
||||||
}
|
}
|
||||||
|
|
||||||
function httpGetCORS(){
|
function httpGetCORS(){
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user