@@ -18,7 +18,7 | |||||
18 | {% bootstrap_form form layout='horizontal' size='medium' %} |
|
18 | {% bootstrap_form form layout='horizontal' size='medium' %} | |
19 | <div style="clear: both;"></div> |
|
19 | <div style="clear: both;"></div> | |
20 | <br> |
|
20 | <br> | |
21 |
<button type=" |
|
21 | <button id="button-1" type="button" class="btn btn-primary pull-right">{{button}}</button> | |
22 | <br> |
|
22 | <br> | |
23 | <br> |
|
23 | <br> | |
24 | </form> |
|
24 | </form> | |
@@ -37,10 +37,10 | |||||
37 | <span> |
|
37 | <span> | |
38 | </span> |
|
38 | </span> | |
39 | </a> |
|
39 | </a> | |
40 | <button type="button" class="btn btn-primary pull-right btn-xs" aria-label="Left Align" style="margin-left: 10px"> |
|
40 | <button id="play-{{ location.id }}" type="button" class="btn btn-primary pull-right btn-xs" aria-label="Left Align" style="margin-left: 10px"> | |
41 | <span class="glyphicon glyphicon-play" aria-hidden="true"></span> |
|
41 | <span class="glyphicon glyphicon-play" aria-hidden="true"></span> | |
42 | </button> |
|
42 | </button> | |
43 | <button type="button" class="btn btn-primary pull-right btn-xs" aria-label="Left Align" style="margin-left: 10px"> |
|
43 | <button id="stop-{{ location.id }}" type="button" class="btn btn-primary pull-right btn-xs" aria-label="Left Align" style="margin-left: 10px"> | |
44 | <span class="glyphicon glyphicon-stop" aria-hidden="true"></span> |
|
44 | <span class="glyphicon glyphicon-stop" aria-hidden="true"></span> | |
45 | </button> |
|
45 | </button> | |
46 |
|
46 | |||
@@ -51,23 +51,22 | |||||
51 | <div class="panel-body"> |
|
51 | <div class="panel-body"> | |
52 | <table class="table table-hover"> |
|
52 | <table class="table table-hover"> | |
53 | <tr> |
|
53 | <tr> | |
54 |
|
54 | <th>#</th> | ||
55 | {% for header in experiment_keys %} |
|
55 | {% for header in experiment_keys %} | |
56 | <th>{{ header|title }}</th> |
|
56 | <th>{{ header|title }}</th> | |
57 | {% endfor%} |
|
57 | {% endfor%} | |
58 | </tr> |
|
58 | </tr> | |
59 |
|
59 | |||
60 | {% for item in experiments %} |
|
60 | {% for item in experiments %} | |
61 | {% for exs in item %} |
|
61 | {% if location.name in item.location.name %} | |
62 | <tr class="clickable-row" data-href="{% url 'url_experiment' exs.id %}" > |
|
62 | ||
63 |
|
63 | <tr class="clickable-row" data-href="{% url 'url_experiment' item.id %}" > | ||
|
64 | <td>{{ forloop.counter }}</td> | |||
64 | {% for key in experiment_keys %} |
|
65 | {% for key in experiment_keys %} | |
65 | {% if location.name in exs.location.name %} |
|
66 | <td>{{ item|value:key }}</td> | |
66 | <td>{{ exs|value:key }}</td> |
|
|||
67 | {% endif %} |
|
|||
68 | {% endfor %} |
|
67 | {% endfor %} | |
69 | {% endfor %} |
|
|||
70 | </tr> |
|
68 | </tr> | |
|
69 | {% endif %} | |||
71 | {% endfor %} |
|
70 | {% endfor %} | |
72 | </table> |
|
71 | </table> | |
73 | </div> |
|
72 | </div> | |
@@ -82,11 +81,25 | |||||
82 |
|
81 | |||
83 | {% block extra-js%} |
|
82 | {% block extra-js%} | |
84 | <script type="text/javascript"> |
|
83 | <script type="text/javascript"> | |
85 |
|
84 | //for (i = 0; i < locations.length; i++) { | ||
86 | //$("#bt_add").click(function() { |
|
85 | // text += cars[i] + "<br>"; | |
87 | //alert("sometext"); |
|
86 | //} | |
88 | // document.location = "{% url 'url_operation' campaign.id %}"; |
|
87 | //------For PLAY Button------- | |
89 | //}); |
|
88 | {% for location in locations %} | |
|
89 | $("#play-{{ location.id }}").click(function() { | |||
|
90 | //alert("Play-{{location}}"); | |||
|
91 | var id_loc = {{location.id}} | |||
|
92 | //document.location = | |||
|
93 | }); | |||
|
94 | {% endfor %} | |||
|
95 | ||||
|
96 | //--------For STOP Button------- | |||
|
97 | {% for location in locations %} | |||
|
98 | $("#stop-{{ location.id }}").click(function() { | |||
|
99 | alert("Stop-{{location}}"); | |||
|
100 | // document.location = "{% url 'url_operation' campaign.id %}"; | |||
|
101 | }); | |||
|
102 | {% endfor %} | |||
90 |
|
|
103 | ||
91 | $(".clickable-row").click(function() { |
|
104 | $(".clickable-row").click(function() { | |
92 | document.location = $(this).data("href"); |
|
105 | document.location = $(this).data("href"); | |
@@ -100,6 +113,10 | |||||
100 | }); |
|
113 | }); | |
101 | }); |
|
114 | }); | |
102 |
|
115 | |||
|
116 | $("#button-1").click(function() { | |||
|
117 | document.location = "{% url 'url_operation_search' %}"; | |||
|
118 | }); | |||
|
119 | ||||
103 |
|
120 | |||
104 | </script> |
|
121 | </script> | |
105 | {% endblock %} No newline at end of file |
|
122 | {% endblock %} |
General Comments 0
You need to be logged in to leave comments.
Login now