##// END OF EJS Templates
Task #716: Vista ABS, change_beam button is disabled if operation_mode is automatic, main abs view show current active beam...
Fiorella Quino -
r206:18de62ad8959
parent child
Show More
@@ -1,8 +1,11
1 {% extends "dev_conf.html" %}
1 {% extends "dev_conf.html" %}
2
2
3 {% load static %}
4 {% load bootstrap3 %}
5 {% load main_tags %}
6
3 {% block extra-menu-actions %}
7 {% block extra-menu-actions %}
4 <li><a href="{{ dev_conf.get_absolute_url_plot }}" target="_blank"><span class="glyphicon glyphicon-picture" aria-hidden="true"></span> View Patterns </a></li>
8 <li><a href="{{ dev_conf.get_absolute_url_plot }}" target="_blank"><span class="glyphicon glyphicon-picture" aria-hidden="true"></span> View Patterns </a></li>
5 <!--<li><a href="{{ dev_conf.get_absolute_url_write }}"><span class="glyphicon glyphicon-download" aria-hidden="true"></span> Write</a></li>-->
6 {% endblock %}
9 {% endblock %}
7
10
8 {% block extra-content %}
11 {% block extra-content %}
@@ -171,7 +174,7
171 <div class="container">
174 <div class="container">
172 <ul class="nav nav-pills">
175 <ul class="nav nav-pills">
173 {% for beam in beams %}
176 {% for beam in beams %}
174 <li >
177 <li {% if active_beam.id == beam.id %} class="active" {% endif %} >
175 <a data-toggle="pill" href="#menu{{forloop.counter}}">{{forloop.counter}}</a>
178 <a data-toggle="pill" href="#menu{{forloop.counter}}">{{forloop.counter}}</a>
176 </li>
179 </li>
177 {% endfor %}
180 {% endfor %}
@@ -510,28 +513,30
510 </div>
513 </div>
511
514
512
515
516 {% else %}
517 <p style="color:#b4bcc2; margin-left: 5%;"><i>No Beams...</i></p>
518 {% endif %}
519
520 {% endblock extra-content %}
513
521
514
522
523
524 {% block extra-js%}
515 <script>
525 <script>
516 $(document).ready(function() {
526 $(document).ready(function() {
517
527
518 {% for beam in beams %}
528 {% for beam in beams %}
519 $("#send_beam{{forloop.counter}}").click(function() {
520 document.location = "{% url 'url_send_beam' dev_conf.id beam.id %}";
521 });
522 {%endfor%}
523
524 });
525 </script>
526
527
529
530 {% if dev_conf.operation_mode == 1 %}
531 $("#send_beam{{forloop.counter}}").prop('disabled', true)
532 {% else %}
533 $("#send_beam{{forloop.counter}}").click(function() {
534 document.location = "{% url 'url_send_beam' dev_conf.id beam.id %}";
535 });
536 {% endif %}
528
537
538 {% endfor %}
529
539
530
540 });
531
541 </script>
532 {% else %}
533 <p style="color:#b4bcc2; margin-left: 5%;"><i>No Beams...</i></p>
534 {% endif %}
535
536
537 {% endblock %}
542 {% endblock %}
@@ -145,7 +145,10 def abs_conf(request, id_conf):
145 kwargs['connected_modules'] = str(conf.connected_modules())+'/64'
145 kwargs['connected_modules'] = str(conf.connected_modules())+'/64'
146
146
147 kwargs['dev_conf'] = conf
147 kwargs['dev_conf'] = conf
148 kwargs['dev_conf_keys'] = ['name',]
148 if conf.operation_mode == 0:
149 kwargs['dev_conf_keys'] = ['name', 'operation_mode']
150 else:
151 kwargs['dev_conf_keys'] = ['name', 'operation_mode', 'operation_value']
149
152
150 kwargs['title'] = 'ABS Configuration'
153 kwargs['title'] = 'ABS Configuration'
151 kwargs['suptitle'] = 'Details'
154 kwargs['suptitle'] = 'Details'
General Comments 0
You need to be logged in to leave comments. Login now