Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <div id="collecting" class="tab-pane fade in active">
- <div class="container">
- <ul class="nav nav-pills nav-justified">
- <li class="active"><a data-toggle="pill" href="#all">ВСЕ</a></li>
- </ul>
- <!-- ВСЕ ПОСТАВЩИКИ -->
- <div class="tab-content">
- <div id="all" class="tab-pane fade in active">
- <div class="container">
- <ul class="nav nav-pills nav-justified">
- <li class="active"><a data-toggle="pill" href="#all_collecting_today">На сегодня</a></li>
- <li><a data-toggle="pill" href="#all_collecting_yesterday">На вчера</a></li>
- <li><a data-toggle="pill" href="#all_collecting_tomorrow">На завтра</a></li>
- </ul>
- <div class="tab-content">
- <div id="all_collecting_today" class="tab-pane fade in active">
- <table class="table table-bordered table-hover table-responsive">
- <thead>
- <tr>
- <th>П/Н</th>
- <th>Заказ</th>
- <th>Статус</th>
- <th>Забрал</th>
- </tr>
- </thead>
- <tbody class="list">
- {% for res in orders %}
- {% if res.status_id == 10 %}
- {% for line in res.lines.all %}
- <tr>
- <td>{{ forloop.counter }}</td>
- <td>{{ line.product }}</td>
- <td>{{ line.product.get_driver_status_display }}</td>
- <td>
- <input id="{{ line.product.id }}" type="checkbox" class="main">
- </td>
- </tr>
- {% endfor %}
- {% endif %}
- {% endfor %}
- </tbody>
- </table>
- </div>
- <div id="all_collecting_yesterday" class="tab-pane fade">
- <h3>Сбор на вчера</h3>
- </div>
- <div id="all_collecting_tomorrow" class="tab-pane fade">
- <h3>Сбор на завтра</h3>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <script>
- $(function () {
- $('.main').bootstrapToggle({
- on: 'Да',
- off: 'Нет'
- });
- });
- $(function () {
- $('.main').change(function () {
- if($(".main").is(':checked')) {
- {# alert(this.id);#}
- $.ajax({
- 'type': 'POST',
- 'url': '/driver_workplace/',
- 'data': 1,
- 'success': function(data){
- alert(data);
- },
- 'dataType': 'json'
- });
- }
- })
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement