From 67f589933f91d710dd7e20302efb586576085b7d Mon Sep 17 00:00:00 2001 From: Bengt Brodersen Date: Tue, 24 Nov 2015 07:06:00 +0100 Subject: [PATCH 1/8] Update bookmarklet.js --- bookmarklet.js | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/bookmarklet.js b/bookmarklet.js index 3042471..fa74d7c 100644 --- a/bookmarklet.js +++ b/bookmarklet.js @@ -1291,6 +1291,19 @@ body { } }; } + + function httpGet(url){ + var response; + jQuery.ajax({ + url: 'https://jsonp.afeld.me/?url=' + url, + success: function (data) { + result = data + }, + async: false + }); + return response; + } + function multilineString(commentFunction) { return commentFunction.toString() From c4c40002b94bffbff423babda2aaa3c19497dc40 Mon Sep 17 00:00:00 2001 From: Bengt Brodersen Date: Tue, 24 Nov 2015 08:19:01 +0100 Subject: [PATCH 2/8] Update bookmarklet.js --- bookmarklet.js | 102 ++++++++++++++++++++++++++----------------------- 1 file changed, 54 insertions(+), 48 deletions(-) diff --git a/bookmarklet.js b/bookmarklet.js index fa74d7c..3b71764 100644 --- a/bookmarklet.js +++ b/bookmarklet.js @@ -668,31 +668,34 @@ .addClass("card") .html(multilineString(function() { /*! -
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
- -
© qoomon.com Bengt Brodersen
*/ })); @@ -712,7 +715,7 @@ html { background: WHITE; padding: 0rem; margin: 0rem; - font-size: 1.0cm; + font-size: 1.3cm; overflow-y: scroll; } body { @@ -725,10 +728,19 @@ body { left: 100%; } .author { + color: DIMGREY; position: absolute; - top:0.6rem; - left:calc(50% - 3rem); + top:0.35rem; + left:calc(50% - 2rem); font-size: 0.6rem; + overflow:visible; + line-height: 0.38rem; +} +.author > span { + position: relative; + left: 0.23rem; + font-size: 0.6em; + text-align: center; } .card { position: relative; @@ -736,9 +748,8 @@ body { height: 100%; width: 100%; padding: 0.5cm; - min-width:19.0rem; + min-width:14.0rem; min-height:10.0rem; - border-color: LightGray; border-style: dotted; border-width: 0.03cm; @@ -756,7 +767,7 @@ body { height: 100%; margin-left: 0.4rem; margin-right: 0.4rem; - padding-top: 1.2rem; + padding-top: 1.1rem; padding-bottom: 1.1rem; padding-left: 0.4rem; padding-right: 0.4rem; @@ -776,15 +787,13 @@ body { } .issue-summary { font-weight: bold; - display: -webkit-box; - //-webkit-line-clamp: 2; - //-webkit-box-orient: vertical; + font-size: 0.9rem; } .issue-description { - margin-top: 0.4rem; + margin-top: 0.1rem; display: block; - font-size: 0.5rem; - line-height: 0.52rem; + font-size: 0.6rem; + line-height: 0.62rem; overflow: hidden; } .issue-description p:first-of-type { @@ -798,8 +807,8 @@ body { left: 1rem; top: 1.2rem; height: 1.5rem; - max-width: calc(85% - 5rem); - min-width: 5rem; + max-width: calc(100% - 7.5rem); + min-width: 4rem; padding-left: 2.1rem; padding-right: 0.4rem; background-color: WHITESMOKE; @@ -823,7 +832,7 @@ body { background-position: center; background-size: 63%; } -.issue-icon[type="story"], .issue-icon[type="user story"]{ +.issue-icon[type="story"], .issue-icon[type="user story"] { background-color: GOLD !important; background-image: url(https://qoomon.github.io/Jira-Issue-Card-Printer/resources/icons/Bulb.png); } @@ -873,7 +882,7 @@ body { } .issue-attachment { position: absolute; - left:2.8rem; + left:2.5rem; top: 0rem; width: 2.0rem; height: 2.0rem; @@ -905,12 +914,12 @@ body { } .issue-epic-box { position: absolute; - right:3.0rem; + right:2.5rem; top: 0rem; width: auto; - min-width: 6rem; + min-width: 2rem; width: auto; - max-width: 10rem; + max-width: calc(100% - 7.5rem); height: auto; max-height: 2.2rem; padding-top: 0.1rem; @@ -918,15 +927,13 @@ body { padding-left: 0.3rem; padding-right: 0.3rem; text-align: left; - font-size: 0.6rem; - line-height: 0.8rem; - display: -webkit-box; - -webkit-line-clamp: 2; - -webkit-box-orient: vertical; + font-size: 0.5rem; + line-height: 0.55rem; } .issue-epic-id { font-size: 0.5rem; font-weight: bold; + max-width: 1rem; } .issue-epic-name { margin-left: 0.1rem; @@ -982,7 +989,6 @@ body { .hidden { display: none; } - .zigzag { border-bottom-width: 0rem; } @@ -1011,8 +1017,8 @@ body { .card { page-break-inside: avoid; } - } } + */ }).replace(/https:\/\/qoomon.github.io\/Jira-Issue-Card-Printer\/resources/g, global.resourceOrigin)); return result; From 42ae3c7e5b0108fca3404e1d94e17502b53bebe7 Mon Sep 17 00:00:00 2001 From: Bengt Brodersen Date: Tue, 24 Nov 2015 08:29:43 +0100 Subject: [PATCH 3/8] Update bookmarklet.js --- bookmarklet.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/bookmarklet.js b/bookmarklet.js index 3b71764..d268132 100644 --- a/bookmarklet.js +++ b/bookmarklet.js @@ -325,7 +325,7 @@ var style = document.createElement('style'); style.id = 'styleRowCount'; style.type = 'text/css'; - style.innerHTML = ".card { height: calc( 100% / " + rowCount + " - 0.0001px ); }" + style.innerHTML = ".card { height: calc( 100% / " + rowCount + " - 0.0001px ); }" jQuery("head", printDocument).append(style); // scale @@ -348,6 +348,7 @@ // scale min var scale = Math.min(scaleWidth, scaleHeight, 1); if (scale < 1) { + console.log("scale: " + scale ) jQuery("html", printDocument).css("font-size", scale + "cm"); } } From 6e7f24775019d9d53fe033be59cc35311335d58c Mon Sep 17 00:00:00 2001 From: Bengt Brodersen Date: Tue, 24 Nov 2015 08:31:30 +0100 Subject: [PATCH 4/8] Update bookmarklet.js --- bookmarklet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookmarklet.js b/bookmarklet.js index d268132..cbd3f90 100644 --- a/bookmarklet.js +++ b/bookmarklet.js @@ -661,7 +661,7 @@ return result; } - // card layout: http://jsfiddle.net/qoomon/ykbLb2pw/ + // card layout: http://jsfiddle.net/qoomon/ykbLb2pw/76 function cardHtml(issueKey) { var page = jQuery(document.createElement('div')) From 726bbac5a9076dd7cdb2f257cf29b9d7c3a25790 Mon Sep 17 00:00:00 2001 From: Bengt Brodersen Date: Tue, 24 Nov 2015 09:02:18 +0100 Subject: [PATCH 5/8] improove scaling --- bookmarklet.js | 37 +++++++++++++++++++------------------ 1 file changed, 19 insertions(+), 18 deletions(-) diff --git a/bookmarklet.js b/bookmarklet.js index cbd3f90..e7db4ca 100644 --- a/bookmarklet.js +++ b/bookmarklet.js @@ -310,27 +310,13 @@ var cardCount = jQuery(".card", printDocument).length; var pageCount = Math.ceil(cardCount / (columnCount * rowCount)) - // size - - // size horizontal - jQuery("#styleColumnCount", printDocument).remove(); - var style = document.createElement('style'); - style.id = 'styleColumnCount'; - style.type = 'text/css'; - style.innerHTML = ".card { width: calc( 100% / " + columnCount + " - 0.0001px ); }" - jQuery("head", printDocument).append(style); - - // size horizontal - jQuery("#styleRowCount", printDocument).remove(); - var style = document.createElement('style'); - style.id = 'styleRowCount'; - style.type = 'text/css'; - style.innerHTML = ".card { height: calc( 100% / " + rowCount + " - 0.0001px ); }" - jQuery("head", printDocument).append(style); + // scale jQuery("html", printDocument).css("font-size", "1cm"); + jQuery("#styleColumnCount", printDocument).remove(); + jQuery("#styleRowCount", printDocument).remove(); // scale horizontal // substract one pixel due to rounding problems @@ -348,9 +334,24 @@ // scale min var scale = Math.min(scaleWidth, scaleHeight, 1); if (scale < 1) { - console.log("scale: " + scale ) jQuery("html", printDocument).css("font-size", scale + "cm"); } + + // size + + // size horizontal + var style = document.createElement('style'); + style.id = 'styleColumnCount'; + style.type = 'text/css'; + style.innerHTML = ".card { width: calc( 100% / " + columnCount + " - 0.0001px ); }" + jQuery("head", printDocument).append(style); + + // size horizontal + var style = document.createElement('style'); + style.id = 'styleRowCount'; + style.type = 'text/css'; + style.innerHTML = ".card { height: calc( 100% / " + rowCount + " - 0.0001px ); }" + jQuery("head", printDocument).append(style); } function cropCards() { From eee9f9057e3d8f695915ea58fea4dde5d59f746f Mon Sep 17 00:00:00 2001 From: Bengt Brodersen Date: Tue, 24 Nov 2015 09:44:23 +0100 Subject: [PATCH 6/8] Update bookmarklet.js --- bookmarklet.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/bookmarklet.js b/bookmarklet.js index e7db4ca..d7ce2c2 100644 --- a/bookmarklet.js +++ b/bookmarklet.js @@ -311,9 +311,9 @@ var pageCount = Math.ceil(cardCount / (columnCount * rowCount)) - // scale + // reset scale jQuery("html", printDocument).css("font-size", "1cm"); jQuery("#styleColumnCount", printDocument).remove(); jQuery("#styleRowCount", printDocument).remove(); @@ -331,7 +331,7 @@ var cardMinHeight = jQuery(".card", printDocument).css("min-height").replace("px", ""); var scaleHeight = cardMaxHeight / cardMinHeight; - // scale min + // scale down var scale = Math.min(scaleWidth, scaleHeight, 1); if (scale < 1) { jQuery("html", printDocument).css("font-size", scale + "cm"); @@ -750,7 +750,7 @@ body { height: 100%; width: 100%; padding: 0.5cm; - min-width:14.0rem; + min-width:14.5rem; min-height:10.0rem; border-color: LightGray; border-style: dotted; From 93b95c65965a4116b9aee9652834e19dbc36a5af Mon Sep 17 00:00:00 2001 From: Bengt Brodersen Date: Tue, 24 Nov 2015 13:33:52 +0100 Subject: [PATCH 7/8] Update bookmarklet.js --- bookmarklet.js | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/bookmarklet.js b/bookmarklet.js index d7ce2c2..8b1d09a 100644 --- a/bookmarklet.js +++ b/bookmarklet.js @@ -677,6 +677,7 @@
+
@@ -821,6 +822,15 @@ body { white-space: nowrap; direction: rtl; } +.issue-id-fadeout { + position: absolute; + left: 2.4rem; + top: 1.2rem; + width: 1.2rem; + height: 1.3rem; + z-index: 0; + background: linear-gradient(to left, rgba(224, 224, 224, 0) 0%, rgba(224, 224, 224, 1) 60%); +} .issue-icon { position: absolute; left: 0rem; @@ -1020,7 +1030,7 @@ body { page-break-inside: avoid; } } - +} */ }).replace(/https:\/\/qoomon.github.io\/Jira-Issue-Card-Printer\/resources/g, global.resourceOrigin)); return result; From d222151ff611853723939a4289cdcf116d100b8f Mon Sep 17 00:00:00 2001 From: Bengt Brodersen Date: Tue, 24 Nov 2015 13:34:13 +0100 Subject: [PATCH 8/8] bump version --- bookmarklet.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bookmarklet.js b/bookmarklet.js index 8b1d09a..7e6a198 100644 --- a/bookmarklet.js +++ b/bookmarklet.js @@ -1,5 +1,5 @@ (function() { - var version = "4.1.1"; + var version = "4.2.0"; console.log("Version: " + version); var global = {};