@@ -41,18 +41,20 | |||||
41 | <div class="panel panel-default"> |
|
41 | <div class="panel panel-default"> | |
42 | <div class="panel-heading" role="tab" id="headingTwo"> |
|
42 | <div class="panel-heading" role="tab" id="headingTwo"> | |
43 | <h4 class="panel-title"> |
|
43 | <h4 class="panel-title"> | |
|
44 | ||||
44 | <a class="collapsed" role="button" data-toggle="collapse" href="#collapseTwo-{{ location.id }}" aria-expanded="false" aria-controls="collapseTwo"> |
|
45 | <a class="collapsed" role="button" data-toggle="collapse" href="#collapseTwo-{{ location.id }}" aria-expanded="false" aria-controls="collapseTwo"> | |
45 | {{location.name}}: Experiment List |
|
46 | {{location.name}}: Experiment List | |
46 | <span> |
|
47 | <span> | |
47 | </span> |
|
48 | </span> | |
48 | </a> |
|
49 | </a> | |
49 | <button id="play-{{ location.id }}" type="button" class="btn btn-primary pull-right btn-xs" aria-label="Left Align" style="margin-left: 10px"> |
|
50 | ||
|
51 | <button type="button" name="bt_play" class="btn btn-primary pull-right btn-xs" data-url="{% url 'url_radar_play' campaign.id location.id %}" style="margin-left: 10px"> | |||
50 | <span class="glyphicon glyphicon-play" aria-hidden="true"></span> |
|
52 | <span class="glyphicon glyphicon-play" aria-hidden="true"></span> | |
51 | </button> |
|
53 | </button> | |
52 | <button id="stop-{{ location.id }}" type="button" class="btn btn-primary pull-right btn-xs" aria-label="Left Align" style="margin-left: 10px"> |
|
54 | <button type="button" name="bt_stop" class="btn btn-primary pull-right btn-xs" data-url="{% url 'url_radar_stop' campaign.id location.id %}" aria-label="Left Align" style="margin-left: 10px"> | |
53 | <span class="glyphicon glyphicon-stop" aria-hidden="true"></span> |
|
55 | <span class="glyphicon glyphicon-stop" aria-hidden="true"></span> | |
54 | </button> |
|
56 | </button> | |
55 |
|
|
57 | ||
56 | </h4> |
|
58 | </h4> | |
57 | </div> |
|
59 | </div> | |
58 |
|
60 | |||
@@ -72,7 +74,11 | |||||
72 | <tr class="clickable-row" data-href="{% url 'url_experiment' item.id %}" > |
|
74 | <tr class="clickable-row" data-href="{% url 'url_experiment' item.id %}" > | |
73 | <td>{{ forloop.counter }}</td> |
|
75 | <td>{{ forloop.counter }}</td> | |
74 | {% for key in experiment_keys %} |
|
76 | {% for key in experiment_keys %} | |
75 |
|
|
77 | {% if 'status' in key %} | |
|
78 | <td class="text-{{item.status_color}}">{{ item|value:key }}</td> | |||
|
79 | {% else %} | |||
|
80 | <td>{{ item|value:key }}</td> | |||
|
81 | {% endif %} | |||
76 | {% endfor %} |
|
82 | {% endfor %} | |
77 | </tr> |
|
83 | </tr> | |
78 | {% endif %} |
|
84 | {% endif %} | |
@@ -92,25 +98,18 | |||||
92 |
|
98 | |||
93 | {% block extra-js%} |
|
99 | {% block extra-js%} | |
94 | <script type="text/javascript"> |
|
100 | <script type="text/javascript"> | |
95 | //for (i = 0; i < locations.length; i++) { |
|
101 | ||
96 | // text += cars[i] + "<br>"; |
|
102 | //--------For PLAY Button------- | |
97 | //} |
|
103 | $("#accordion").on("click", "button[name=bt_play]", function(){ | |
98 | //------For PLAY Button------- |
|
104 | //alert($(this).data('url')); | |
99 | {% for location in locations %} |
|
105 | document.location = $(this).data('url'); | |
100 | $("#play-{{ location.id }}").click(function() { |
|
106 | }); | |
101 | //alert("Play-{{location}}"); |
|
107 | ||
102 | var id_loc = {{location.id}} |
|
108 | //--------For STOP Button------- | |
103 | //document.location = |
|
109 | $("#accordion").on("click", "button[name=bt_stop]", function(){ | |
104 | }); |
|
110 | //alert($(this).data('url')); | |
105 | {% endfor %} |
|
111 | document.location = $(this).data('url'); | |
106 |
|
112 | }); | ||
107 | //--------For STOP Button------- |
|
|||
108 | {% for location in locations %} |
|
|||
109 | $("#stop-{{ location.id }}").click(function() { |
|
|||
110 | alert("Stop-{{location}}"); |
|
|||
111 | // document.location = "{% url 'url_operation' campaign.id %}"; |
|
|||
112 | }); |
|
|||
113 | {% endfor %} |
|
|||
114 |
|
113 | |||
115 | $(".clickable-row").click(function() { |
|
114 | $(".clickable-row").click(function() { | |
116 | document.location = $(this).data("href"); |
|
115 | document.location = $(this).data("href"); |
General Comments 0
You need to be logged in to leave comments.
Login now