|
Lines 1-96
Link Here
|
| 1 |
<div id="makechart" style="display:none;"> |
1 |
<div class="modal" id="chartModal" tabindex="-1" role="dialog" aria-labelledby="chartModalLabel"> |
| 2 |
[% supposed_x = header_row.shift.cell %] |
2 |
<div class="modal-dialog modal-wide" role="document"> |
| 3 |
|
3 |
<div class="modal-content"> |
| 4 |
<fieldset> |
4 |
<div class="modal-header"> |
| 5 |
<legend>Draw a chart</legend> |
5 |
<button type="button" class="closebtn" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span></button> |
| 6 |
<ol> |
6 |
<h4 class="modal-title" id="chartModalLabel">Chart settings</h4> |
| 7 |
<li> |
|
|
| 8 |
<label for="chart-type">Chart type</label> |
| 9 |
<select name="chart-type" id="chart-type"> |
| 10 |
<option value="pie">Pie</option> |
| 11 |
<option value="bar">Bar</option> |
| 12 |
<option value="line">Line</option> |
| 13 |
</select> |
| 14 |
|
| 15 |
<div id="chart-column-horizontal"> |
| 16 |
<label for="horizontal">Horizontal bar:</label> |
| 17 |
<input id="horizontal" name="column-horizontal" type="checkbox"> |
| 18 |
</div> |
| 19 |
</li> |
| 20 |
|
| 21 |
<li> |
| 22 |
<label for="x_element">x column:</label> |
| 23 |
<select id="x_element" name="x"> |
| 24 |
<option value="[% supposed_x | html %]" selected>[% supposed_x | html %]</option> |
| 25 |
[% FOREACH header IN header_row %] |
| 26 |
<option value="[% header.cell | html %]">[% header.cell | html %]</option> |
| 27 |
[% END %] |
| 28 |
</select> |
| 29 |
</li> |
| 30 |
|
| 31 |
<div> |
| 32 |
<label for="include-all">Include all rows (ignore pagination)</label> |
| 33 |
<input id="include-all" name="chart-include-all" type="checkbox"> |
| 34 |
</div> |
7 |
</div> |
|
|
8 |
<div class="modal-body" id="makechart"> |
| 9 |
[% supposed_x = header_row.shift.cell %] |
| 10 |
<fieldset class="rows"> |
| 11 |
<ol> |
| 12 |
<li> |
| 13 |
<label for="chart-type">Chart type: </label> |
| 14 |
<select name="chart-type" id="chart-type"> |
| 15 |
<option value="pie">Pie</option> |
| 16 |
<option value="bar">Bar</option> |
| 17 |
<option value="line">Line</option> |
| 18 |
</select> |
| 19 |
</li> |
| 35 |
|
20 |
|
|
|
21 |
<li id="chart-column-horizontal"> |
| 22 |
<label for="horizontal">Horizontal bar:</label> |
| 23 |
<input id="horizontal" name="column-horizontal" type="checkbox" /> |
| 24 |
</li> |
| 36 |
|
25 |
|
| 37 |
<label for="exclude-last">Exclude last line (Rollup)</label> |
26 |
<li> |
| 38 |
<input id="exclude-last" name="chart-exclude-last" type="checkbox"> |
27 |
<label for="x_element">x column:</label> |
| 39 |
|
28 |
<select id="x_element" name="x"> |
| 40 |
[% column = 1 %] |
|
|
| 41 |
<li> |
| 42 |
[% FOREACH header IN header_row %] |
| 43 |
<fieldset class="chart-column-conf" id="column_[% column | html %]" style="display: inline !important;"> |
| 44 |
<legend> |
| 45 |
Column [% column | html %] |
| 46 |
<a class="chart-column-delete" href="#" data-column="[% column | html %]"> |
| 47 |
<img src="[% interface | html %]/[% theme | html %]/img/x.png" alt="Delete" /> |
| 48 |
</a> |
| 49 |
</legend> |
| 50 |
<div> |
| 51 |
<label for="y_[% column | html %]" >y:</label> |
| 52 |
<select id="y_[% column | html %]" name="y"> |
| 53 |
<option value="[% supposed_x | html %]" selected>[% supposed_x | html %]</option> |
29 |
<option value="[% supposed_x | html %]" selected>[% supposed_x | html %]</option> |
| 54 |
[% FOREACH h IN header_row %] |
30 |
[% FOREACH header IN header_row %] |
| 55 |
[% IF header.cell == h.cell %] |
31 |
<option value="[% header.cell | html %]">[% header.cell | html %]</option> |
| 56 |
<option value="[% h.cell | html %]" selected>[% h.cell | html %]</option> |
|
|
| 57 |
[% ELSE %] |
| 58 |
<option value="[% h.cell | html %]">[% h.cell | html %]</option> |
| 59 |
[% END %] |
| 60 |
[% END %] |
| 61 |
</select> |
| 62 |
</div> |
| 63 |
|
| 64 |
<div class="chart-column-group"> |
| 65 |
[% i = 1 %] |
| 66 |
<label for="group_[% column | html %]">Group:</label> |
| 67 |
<select id="group_[% column | html %]" name="group"> |
| 68 |
[% FOREACH h IN header_row %] |
| 69 |
[% IF i == column %] |
| 70 |
<option value="[% i | html %]" selected>[% i | html %]</option> |
| 71 |
[% ELSE %] |
| 72 |
<option value="[% i | html %]">[% i | html %]</option> |
| 73 |
[% END %] |
| 74 |
[% i = i + 1 %] |
| 75 |
[% END %] |
32 |
[% END %] |
| 76 |
</select> |
33 |
</select> |
| 77 |
</div> |
34 |
</li> |
|
|
35 |
|
| 36 |
<li> |
| 37 |
<label for="include-all">Include all rows (ignore pagination):</label> |
| 38 |
<input id="include-all" name="chart-include-all" type="checkbox" /> |
| 39 |
</li> |
| 78 |
|
40 |
|
| 79 |
<div class="chart-column-line"> |
41 |
<li> |
| 80 |
<label for="line_[% column | html %]">line:</label> |
42 |
<label for="exclude-last">Exclude last line (Rollup): </label> |
| 81 |
<input class="column-line" id="column-line" name="[% header.cell | html %]" type="checkbox"> |
43 |
<input id="exclude-last" name="chart-exclude-last" type="checkbox" /> |
| 82 |
</div> |
44 |
</li> |
| 83 |
</fieldset> |
45 |
[% column = 1 %] |
| 84 |
[% column = column + 1 %] |
46 |
<li class="column_config_row"> |
| 85 |
[% END %] |
47 |
[% FOREACH header IN header_row %] |
| 86 |
</li> |
48 |
<fieldset class="chart-column-conf" id="column_[% column | html %]"> |
|
|
49 |
<legend> |
| 50 |
Column [% column | html %] |
| 51 |
<a class="chart-column-delete" href="#" data-column="[% column | html %]"> |
| 52 |
<i class="fa fa-remove error"></i> |
| 53 |
</a> |
| 54 |
</legend> |
| 55 |
<div> |
| 56 |
<label for="y_[% column | html %]" >y:</label> |
| 57 |
<select id="y_[% column | html %]" name="y"> |
| 58 |
<option value="[% supposed_x | html %]" selected>[% supposed_x | html %]</option> |
| 59 |
[% FOREACH h IN header_row %] |
| 60 |
[% IF header.cell == h.cell %] |
| 61 |
<option value="[% h.cell | html %]" selected>[% h.cell | html %]</option> |
| 62 |
[% ELSE %] |
| 63 |
<option value="[% h.cell | html %]">[% h.cell | html %]</option> |
| 64 |
[% END %] |
| 65 |
[% END %] |
| 66 |
</select> |
| 67 |
</div> |
| 87 |
|
68 |
|
| 88 |
<li> |
69 |
<div class="chart-column-group"> |
|
|
70 |
[% i = 1 %] |
| 71 |
<label for="group_[% column | html %]">Group:</label> |
| 72 |
<select id="group_[% column | html %]" name="group"> |
| 73 |
[% FOREACH h IN header_row %] |
| 74 |
[% IF i == column %] |
| 75 |
<option value="[% i | html %]" selected>[% i | html %]</option> |
| 76 |
[% ELSE %] |
| 77 |
<option value="[% i | html %]">[% i | html %]</option> |
| 78 |
[% END %] |
| 79 |
[% i = i + 1 %] |
| 80 |
[% END %] |
| 81 |
</select> |
| 82 |
</div> |
| 83 |
|
| 84 |
<div class="chart-column-line"> |
| 85 |
<label for="line_[% column | html %]">Line:</label> |
| 86 |
<input class="column-line" id="line_[% column | html %]" name="[% header.cell | html %]" type="checkbox" /> |
| 87 |
</div> |
| 88 |
</fieldset> |
| 89 |
[% column = column + 1 %] |
| 90 |
[% END %] |
| 91 |
</li> |
| 92 |
</ol> |
| 93 |
</fieldset> |
| 94 |
|
| 95 |
[% item = { cell = supposed_x } %] |
| 96 |
[% header_row.unshift(item) | html %] |
| 97 |
</div> |
| 98 |
<div class="modal-footer"> |
| 89 |
<button id="draw-chart" class="btn btn-default">Draw</button> |
99 |
<button id="draw-chart" class="btn btn-default">Draw</button> |
| 90 |
</li> |
100 |
<button type="button" class="btn btn-default" data-dismiss="modal">Close</button> |
| 91 |
</ol> |
101 |
</div> |
| 92 |
</fieldset> |
102 |
</div> |
| 93 |
[% item = { cell = supposed_x } %] |
103 |
</div> |
| 94 |
[% header_row.unshift(item) | html %] |
|
|
| 95 |
<div id="chart"></div> |
| 96 |
</div> |
104 |
</div> |