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