diff options
author | Luke Shumaker <lukeshu@lukeshu.com> | 2018-03-19 22:01:53 -0400 |
---|---|---|
committer | Luke Shumaker <lukeshu@lukeshu.com> | 2018-03-19 22:02:59 -0400 |
commit | de3d574804637c5f99e0993c0d4750c218fde07c (patch) | |
tree | 3f5429646ac1b9a7f6f20c86aa55ca593dbef4df /public-src/components | |
parent | 51ad09fc770f9eb24a0f143156610dfe850c6e8e (diff) |
do page layout with golden-layout
Diffstat (limited to 'public-src/components')
-rw-r--r-- | public-src/components/gl/html.js | 5 | ||||
-rw-r--r-- | public-src/components/gl/jarmon-tabbed-chart-ui.js | 44 |
2 files changed, 49 insertions, 0 deletions
diff --git a/public-src/components/gl/html.js b/public-src/components/gl/html.js new file mode 100644 index 0000000..1270818 --- /dev/null +++ b/public-src/components/gl/html.js @@ -0,0 +1,5 @@ +define([], function() { + return function(container, state) { + container.getElement().html(container.getState()); + } +}); diff --git a/public-src/components/gl/jarmon-tabbed-chart-ui.js b/public-src/components/gl/jarmon-tabbed-chart-ui.js new file mode 100644 index 0000000..ac449d8 --- /dev/null +++ b/public-src/components/gl/jarmon-tabbed-chart-ui.js @@ -0,0 +1,44 @@ +define([], function() { + return function(container, state) { + container.getElement().html(''+ + '<div class="jarmon">'+ + ' <div class="chart-container">'+ + ' <h2 class="title"></h2>'+ + ' <form>'+ + ' <input name="chart_edit" value="Edit" type="button" />'+ + ' <input name="chart_delete" value="Delete" type="button" />'+ + ' </form>'+ + ' <div class="error"></div>'+ + ' <div class="chart"></div>'+ + ' <div class="graph-legend"></div>'+ + ' </div>'+ + ' <div class="chartRangeControl">'+ + ' <form>'+ + ' <div class="range-inputs">'+ + ' <input name="from" type="datetime-local" step="1" />'+ + ' <input name="to" type="datetime-local" step="1" />'+ + ' <select name="shortcuts" title="Time range shortcuts - click to select an alternative time range" ></select>'+ + ' <select name="tzoffset" title="Timezone offset - click to choose a custom timezone offset" ></select>'+ + ' <input name="action" value="Update" type="button"'+ + ' title="Graph update - click to update all graphs" />'+ + ' </div>'+ + ' <div class="range-preview"'+ + ' title="Time range preview - click and drag to select a custom timerange" ></div>'+ + ' </form>'+ + ' </div>'+ + ' <div class="tabbed-chart-interface"></div>'+ + '</div>'+ + ''); + var chartTemplate = container.getElement().find(".chart-container").remove(); + + container.on('open', function() { + jarmon.buildTabbedChartUi( + chartTemplate, + state.chartRecipes, + container.getElement().find('.tabbed-chart-interface'), + state.tabRecipes, + container.getElement().find('.chartRangeControl') + ) + }); + }; +}); |