[214] | 1 | <?php |
---|
| 2 | /* |
---|
| 3 | * To change this template, choose Tools | Templates |
---|
| 4 | * and open the template in the editor. |
---|
| 5 | */ |
---|
| 6 | |
---|
| 7 | require "classes/master.php"; |
---|
| 8 | |
---|
| 9 | $dbDataSelectionWidget = new dbDataSelectionWidget(); |
---|
| 10 | $data = JSON_decode($_POST['selectedData']); |
---|
| 11 | ?> |
---|
| 12 | |
---|
| 13 | <!DOCTYPE html> |
---|
| 14 | <html> |
---|
| 15 | <head> |
---|
| 16 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> |
---|
| 17 | |
---|
[227] | 18 | <script type="text/javascript" src="js/generalScripts.js"></script> |
---|
| 19 | <script type="text/javascript" src="js/dashboardScripts.js"></script> |
---|
| 20 | <script src="RGraph/libraries/RGraph.common.core.js" ></script> |
---|
| 21 | <script src="RGraph/libraries/RGraph.common.annotate.js" ></script> |
---|
| 22 | <script src="RGraph/libraries/RGraph.common.context.js" ></script> |
---|
| 23 | |
---|
| 24 | <script src="RGraph/libraries/RGraph.common.tooltips.js" ></script> |
---|
| 25 | <script src="RGraph/libraries/RGraph.common.resizing.js" ></script> |
---|
| 26 | <script src="RGraph/libraries/RGraph.bar.js" ></script> |
---|
[242] | 27 | <script src="RGraph/libraries/RGraph.pie.js" ></script> |
---|
| 28 | <script src="RGraph/libraries/RGraph.radar.js" ></script> |
---|
[276] | 29 | <script src="RGraph/libraries/RGraph.rose.js" ></script> |
---|
[227] | 30 | |
---|
[239] | 31 | |
---|
[276] | 32 | |
---|
| 33 | |
---|
| 34 | |
---|
| 35 | |
---|
| 36 | |
---|
[227] | 37 | <script> |
---|
| 38 | myGraph.Set('chart.contextmenu', [ |
---|
| 39 | ['Get PNG', RGraph.showPNG], |
---|
| 40 | null, |
---|
| 41 | ['Cancel', function () {}] |
---|
| 42 | ]); |
---|
| 43 | </script> |
---|
| 44 | |
---|
[214] | 45 | <title> |
---|
| 46 | Dashboard Graph Selection |
---|
| 47 | </title> |
---|
| 48 | <?php new Stylesheet("visualEditors"); ?> |
---|
| 49 | |
---|
| 50 | </head> |
---|
[227] | 51 | |
---|
[214] | 52 | <body> |
---|
| 53 | <div id="header"> |
---|
[242] | 54 | |
---|
[214] | 55 | </div> |
---|
| 56 | |
---|
[239] | 57 | |
---|
[242] | 58 | <div |
---|
| 59 | <div id="content"> |
---|
| 60 | <div id="wrapper"> |
---|
[214] | 61 | |
---|
[276] | 62 | <div id="breadcrumbs" class="largeFrame" style="width: 900px;"> |
---|
| 63 | <a href="#" onclick="checkBack('index.php');">Login</a> > |
---|
| 64 | <a href="#" onclick="checkBack('dashboardDataSelection.php');">Select data</a> > |
---|
| 65 | <a href="#" class="selected">Select graphtype</a> |
---|
| 66 | </div> |
---|
| 67 | |
---|
[242] | 68 | <div id="leftColumn"> |
---|
[214] | 69 | |
---|
[242] | 70 | <div class="largeFrame C" id="dbDataSelector"> |
---|
| 71 | <div class="content"> |
---|
[214] | 72 | |
---|
[242] | 73 | <div class="largeTitle">Selected data</div> |
---|
[276] | 74 | <div class="content" style="width: 296px; height: 500px; "> |
---|
| 75 | <select id="dbSelectedData" multiple class="dbDataList" size="15" style="width: 275px;" onchange="infoPanelTimeout(event);"> |
---|
[227] | 76 | |
---|
[276] | 77 | <?php |
---|
| 78 | $objCount = count($data->contents->titles); |
---|
[227] | 79 | |
---|
[276] | 80 | for ($i = 0; $i < $objCount; $i++) { |
---|
| 81 | echo "<option value='" . $data->contents->uids[$i] . "' name='" . $data->contents->types[$i] . "'>" . $data->contents->titles[$i] . "</option>"; |
---|
| 82 | } |
---|
| 83 | ?> |
---|
| 84 | </select> |
---|
[242] | 85 | </div> |
---|
[214] | 86 | |
---|
[242] | 87 | </div> |
---|
[214] | 88 | </div> |
---|
| 89 | </div> |
---|
| 90 | |
---|
[242] | 91 | <div id="rightColumn"> |
---|
| 92 | <div class="largeFrame Cv" style="width: 600px; height: 400px;"> |
---|
| 93 | <div class="largeTitle">Graph selection</div> |
---|
| 94 | <div class="topControls" id="graphTypeSelector" style="float: left; clear: left; width: 100%; margin: 0; border: 1px solid #000;"> |
---|
| 95 | <div id="btnSelectPieType" class="graphSelectionButton" onclick="changeGraphType('pie')">PIE CHART</div> |
---|
| 96 | <div id="btnSelectBarType" class="graphSelectionButton" onclick="changeGraphType('bar')">BAR CHART</div> |
---|
| 97 | <div id="btnSelectRadarType" class="graphSelectionButton" onclick="changeGraphType('radar')">RADAR CHART</div> |
---|
[276] | 98 | <div id="btnSelectRose" class="graphSelectionButton" onClick="changeGraphType('rose')">ROSE CHART</div> |
---|
| 99 | |
---|
[242] | 100 | </div> |
---|
| 101 | <div class="content" id="graphDisplay"> |
---|
[214] | 102 | |
---|
[242] | 103 | <canvas id="chart1" width="450" height="200" onclick="RGraph.showPNG(document.getElementById('radar1'));">[No canvas support] </canvas> |
---|
[276] | 104 | |
---|
[242] | 105 | <!-- Button to gotoDashboard?? --> |
---|
[227] | 106 | |
---|
[242] | 107 | </div> |
---|
[227] | 108 | |
---|
[242] | 109 | <div class="controls"> |
---|
| 110 | <input type="button" class="smallButton" value="Save to dashboard" onClick="addToDashboard()"></input> |
---|
| 111 | <input type="button" class="smallButton" value="Go to Dashboard" onClick="gotoDashboard()"></input> |
---|
[227] | 112 | |
---|
[276] | 113 | |
---|
[242] | 114 | </div> |
---|
[227] | 115 | |
---|
| 116 | </div> |
---|
[214] | 117 | </div> |
---|
| 118 | |
---|
| 119 | |
---|
[242] | 120 | <div class="largeFrame Cu" id="dbInfoPanel" style="width: 930px;"> |
---|
| 121 | <div class='largeTitle'>Info panel</div> |
---|
| 122 | <div class="content" id="dbInfoPanelContent" style="height: 100px;"> |
---|
[214] | 123 | |
---|
[242] | 124 | </div> |
---|
[227] | 125 | |
---|
| 126 | |
---|
[242] | 127 | </div> |
---|
[214] | 128 | </div> |
---|
| 129 | |
---|
| 130 | |
---|
[227] | 131 | |
---|
[242] | 132 | </body> |
---|
| 133 | </html> |
---|