CORS first try

This commit is contained in:
Bengt Brodersen 2015-01-18 18:06:39 +01:00
parent 500eb70734
commit 0e8bee57da
2 changed files with 35 additions and 6 deletions

View File

@ -13,7 +13,7 @@ if (window.jQuery === undefined) {
appendScript('//ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js'); appendScript('//ajax.googleapis.com/ajax/libs/jquery/1.7.0/jquery.min.js');
} }
// wait untill all other scripts loaded // wait untill all scripts loaded
appendScript('https://qoomon.github.io/void', function(){ appendScript('https://qoomon.github.io/void', function(){
init(); init();
main(); main();
@ -25,7 +25,10 @@ function init(){
addStringFunctions(); addStringFunctions();
addDateFunctions(); addDateFunctions();
printScopeDeviderToken = "<b>Attachment</b>" printScopeDeviderToken = "<b>Attachment</b>";
cors = "https://cors-anywhere.herokuapp.com/";
//$("#card").load("https://cors-anywhere.herokuapp.com/"+"https://qoomon.github.io/Jira-Issue-Card-Printer/card.html");
console.logLevel = console.INFO; console.logLevel = console.INFO;
} }
@ -274,6 +277,8 @@ function fillCardWithJSONData(card, data) {
// http://www.cssdesk.com/T9hXg // http://www.cssdesk.com/T9hXg
function printOverlayHTML(){ function printOverlayHTML(){
var result = jQuery(document.createElement('div')) var result = jQuery(document.createElement('div'))
.attr("id","card-print-overlay") .attr("id","card-print-overlay")
.html(multilineString(function() { .html(multilineString(function() {
@ -801,10 +806,6 @@ body {
//############################################################################################################################ //############################################################################################################################
//############################################################################################################################ //############################################################################################################################
function getCORS(url, callback){
$.get('https://cors-anywhere.herokuapp.com/' + url, callback);
}
function appendScript(url, callback){ function appendScript(url, callback){
var head = document.getElementsByTagName('head')[0]; var head = document.getElementsByTagName('head')[0];

28
card.html Normal file
View File

@ -0,0 +1,28 @@
<div class="card">
<div class="author">Bengt Brodersen - qoomon.com</div>
<div class="card-border"></div>
<div class="card-header">
<div class="type-icon badge circular"></div>
<div class="key badge"></div>
<div class="estimate badge circular " contenteditable="true"></div>
<div class="due">
<div class="due-icon badge circular "></div>
<div class="due-date badge" contenteditable="true"></div>
</div>
</div>
<div class="card-content">
<div class="content-header">
<span class="summary" contenteditable="true"></span>
</div>
<div class="description" contenteditable="true"></div>
</div>
<div class="card-footer">
<div class="assignee badge circular"></div>
<div class="qr-code badge"></div>
<div class="attachment badge circular"></div>
<div class="epic badge">
<span class="epic-key"></span>
<span class="epic-name" contenteditable="true"></span>
</div>
</div>
</div>