Commit 0566eaec authored by Tomas Pettersson's avatar Tomas Pettersson 🏸

testing full viewport

parent 1a588ebf
......@@ -18,10 +18,10 @@
"jquery": "latest",
"uikit": "latest",
"reqwest": "latest",
"moment": "latest"
},
"devDependencies": {
"moment": "latest",
"chart.js": "^2.5.0"
},
"devDependencies": {},
"license": "MIT",
"ignore": [
"**/.*",
......
......@@ -32,6 +32,8 @@
var graphDiv = document.createElement("DIV");
var graphbutton = document.createElement("BUTTON");
var t = document.createTextNode("Graph");
document.body.appendChild(graphbutton);
var id = '39e8929d-8d9d-4b0f-b95b-61361bd7446e';
var graphid = "graph" + id;
graphbutton.setAttribute('data-uk-modal', "{target:'#" + graphid + "'}");
......@@ -45,8 +47,7 @@
"lang" : language,
"langdata" : langData
});
document.body.appendChild(graphbutton);
</script>
</body>
......
......@@ -45,15 +45,21 @@ var Graph = (function () {
graphModal.id = id;
// places it outside to avoid conflicts with positioning
$(graphModal).appendTo('body');
var dialog = self.createDom('div', 'uk-modal-dialog', graphModal);
var dialog = self.createDom('div', 'uk-modal-dialog uk-modal-dialog-blank', graphModal);
var close = self.createDom('button', 'uk-modal-close uk-close', dialog);
var mainDiv = self.createDom('div', '', dialog);
var headerTxt = self.createDom('span', '', mainDiv);
headerTxt.innerHTML = "<b>Graph</b><br><p>";
var bodyDiv = self.createDom('div', '', mainDiv);
var footer = self.createDom('div', 'uk-modal-footer uk-text-right', dialog);
var okDialogButton = self.createDom('button', 'uk-button uk-modal-close', footer);
okDialogButton.textContent = "Ok";
var mainDiv = self.createDom('div', 'uk-grid uk-flex-middle', dialog);
var chartDiv = self.createDom('div', 'uk-width-medium-1-2 uk-height-viewport', mainDiv);
var selectionDiv = self.createDom('div', 'uk-width-medium-1-2', mainDiv);
var header = self.createDom('h1', '', selectionDiv);
header.textContent = "Graph";
var radioDiv = self.createDom('div', 'uk-width-medium-1-3', selectionDiv);
var radioButtons = self.createDom('p', '', radioDiv);
radioButtons.textContent = "Radiobuttons go here";
$('#' + id).on({
'show.uk.modal': function () {
console.log("Modal is visible.");
}
});
};
return Graph;
}());
......
{"version":3,"file":"stw-padmws-graph.js","sourceRoot":"","sources":["stw-padmws-graph.ts"],"names":[],"mappings":"AAAA,uCAAuC;AACvC,wCAAwC;AACxC,yCAAyC;AACzC,mDAAmD;AAGnD;IAMI,eAAY,EAAE,EAAE,OAAO;QACnB,IAAI,IAAI,GAAG,IAAI,CAAC;QAChB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC;YACf,IAAI,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,CAAC,CAAC;QAC/C,CAAC;QACD,EAAE,CAAC,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAC,CAAC;YACnB,IAAI,CAAC,QAAQ,GAAG,OAAO,CAAC,QAAQ,CAAC;QACrC,CAAC;QAGD,EAAE,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,CAAC;YAChB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;QACzC,CAAC;QAAC,IAAI,CAAC,CAAC;YACJ,OAAO,CAAC;gBACJ,GAAG,EAAE,aAAa,GAAG,IAAI,CAAC,IAAI,GAAG,OAAO;gBACxC,MAAM,EAAE,KAAK;gBACb,IAAI,EAAE,MAAM;gBACZ,OAAO,EAAE,UAAU,IAAI;oBACnB,IAAI,CAAC,QAAQ,GAAG,IAAI,CAAC;oBACrB,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;gBAEzC,CAAC;aACJ,CAAC,CAAC;QACP,CAAC;IACL,CAAC;IAGO,yBAAS,GAAjB,UAAkB,IAAa,EAAE,WAAmB,EAAE,MAAY;QAC9D,IAAI,OAAO,GAAG,QAAQ,CAAC,aAAa,CAAC,IAAI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,CAAC,MAAM,CAAC,CAAC;QAC/B,IAAI,MAAM,GAAmB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,uCAAuC,EAAE,UAAU,CAAC,CAAC;QACxG,IAAI,KAAK,GAAsB,IAAI,CAAC,SAAS,CAAC,QAAQ,EAAE,yBAAyB,EAAE,MAAM,CAAC,CAAC;QAC3F,IAAI,OAAO,GAAmB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,wBAAwB,EAAE,MAAM,CAAC,CAAC;QACtF,IAAI,QAAQ,GAAmB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,wCAAwC,EAAE,OAAO,CAAC,CAAC;QACxG,IAAI,YAAY,GAAmB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,qBAAqB,EAAE,OAAO,CAAC,CAAC;QACzF,IAAI,MAAM,GAAmB,IAAI,CAAC,SAAS,CAAC,IAAI,EAAE,EAAE,EAAE,YAAY,CAAC,CAAC;QACpE,MAAM,CAAC,WAAW,GAAG,OAAO,CAAC;QAC7B,IAAI,QAAQ,GAAmB,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,qBAAqB,EAAE,YAAY,CAAC,CAAC;QAC1F,IAAI,YAAY,GAAmB,IAAI,CAAC,SAAS,CAAC,GAAG,EAAE,EAAE,EAAE,QAAQ,CAAC,CAAC;QACrE,YAAY,CAAC,WAAW,GAAG,sBAAsB,CAAC;QAElD,CAAC,CAAC,GAAG,GAAC,EAAE,CAAC,CAAC,EAAE,CAAC;YACT,eAAe,EAAE;gBACb,OAAO,CAAC,GAAG,CAAC,mBAAmB,CAAC,CAAC;YACrC,CAAC;SACJ,CAAC,CAAC;IACP,CAAC;IACL,YAAC;AAAD,CAAC,AAtED,IAsEC"}
\ No newline at end of file
......@@ -38,7 +38,7 @@ class Graph {
}
private createDom(type : string, classString: string, parent?: any) {
private createDom(type: string, classString: string, parent?: any) {
var element = document.createElement(type);
var classes = classString.split(' ');
for (var i = 0; i < classes.length; i++) {
......@@ -57,17 +57,21 @@ class Graph {
graphModal.id = id;
// places it outside to avoid conflicts with positioning
$(graphModal).appendTo('body');
var dialog = <HTMLDivElement>self.createDom('div', 'uk-modal-dialog', graphModal);
var dialog = <HTMLDivElement>self.createDom('div', 'uk-modal-dialog uk-modal-dialog-blank', graphModal);
var close = <HTMLButtonElement>self.createDom('button', 'uk-modal-close uk-close', dialog);
var mainDiv = <HTMLDivElement>self.createDom('div', '', dialog);
var headerTxt = <HTMLSpanElement>self.createDom('span', '', mainDiv);
headerTxt.innerHTML = "<b>Graph</b><br><p>";
var bodyDiv = <HTMLDivElement>self.createDom('div', '', mainDiv);
var footer = <HTMLDivElement>self.createDom('div', 'uk-modal-footer uk-text-right', dialog);
var okDialogButton = <HTMLButtonElement>self.createDom('button', 'uk-button uk-modal-close', footer);
okDialogButton.textContent = "Ok";
var mainDiv = <HTMLDivElement>self.createDom('div', 'uk-grid uk-flex-middle', dialog);
var chartDiv = <HTMLDivElement>self.createDom('div', 'uk-width-medium-1-2 uk-height-viewport', mainDiv);
var selectionDiv = <HTMLDivElement>self.createDom('div', 'uk-width-medium-1-2', mainDiv);
var header = <HTMLDivElement>self.createDom('h1', '', selectionDiv);
header.textContent = "Graph";
var radioDiv = <HTMLDivElement>self.createDom('div', 'uk-width-medium-1-3', selectionDiv);
var radioButtons = <HTMLDivElement>self.createDom('p', '', radioDiv);
radioButtons.textContent = "Radiobuttons go here";
$('#'+id).on({
'show.uk.modal': function () {
console.log("Modal is visible.");
}
});
}
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment