Advertisement
Guest User

Untitled

a guest
Aug 18th, 2017
62
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 4.08 KB | None | 0 0
  1. <div id="collecting" class="tab-pane fade in active">
  2.  
  3.             <div class="container">
  4.                 <ul class="nav nav-pills nav-justified">
  5.                     <li class="active"><a data-toggle="pill" href="#all">ВСЕ</a></li>
  6.                 </ul>
  7.  
  8.                 <!-- ВСЕ ПОСТАВЩИКИ -->
  9.                 <div class="tab-content">
  10.                     <div id="all" class="tab-pane fade in active">
  11.                         <div class="container">
  12.                             <ul class="nav nav-pills nav-justified">
  13.                                 <li class="active"><a data-toggle="pill" href="#all_collecting_today">На сегодня</a></li>
  14.                                 <li><a data-toggle="pill" href="#all_collecting_yesterday">На вчера</a></li>
  15.                                 <li><a data-toggle="pill" href="#all_collecting_tomorrow">На завтра</a></li>
  16.                             </ul>
  17.  
  18.                             <div class="tab-content">
  19.                                 <div id="all_collecting_today" class="tab-pane fade in active">
  20.                                     <table class="table table-bordered table-hover table-responsive">
  21.                                         <thead>
  22.                                         <tr>
  23.                                             <th>П/Н</th>
  24.                                             <th>Заказ</th>
  25.                                             <th>Статус</th>
  26.                                             <th>Забрал</th>
  27.                                         </tr>
  28.                                         </thead>
  29.                                         <tbody class="list">
  30.                                         {% for res in orders %}
  31.                                             {% if res.status_id == 10 %}
  32.                                                 {% for line in res.lines.all %}
  33.                                                 <tr>
  34.                                                     <td>{{ forloop.counter }}</td>
  35.                                                     <td>{{ line.product }}</td>
  36.                                                     <td>{{ line.product.get_driver_status_display }}</td>
  37.                                                     <td>
  38.                                                         <input id="{{ line.product.id }}" type="checkbox" class="main">
  39.                                                     </td>
  40.                                                 </tr>
  41.                                                 {% endfor %}
  42.                                             {% endif %}
  43.                                         {% endfor %}
  44.                                         </tbody>
  45.                                     </table>
  46.                                 </div>
  47.                                 <div id="all_collecting_yesterday" class="tab-pane fade">
  48.                                     <h3>Сбор на вчера</h3>
  49.                                 </div>
  50.                                 <div id="all_collecting_tomorrow" class="tab-pane fade">
  51.                                     <h3>Сбор на завтра</h3>
  52.                                 </div>
  53.                             </div>
  54.                         </div>
  55.                     </div>
  56.                 </div>
  57.             </div>
  58.         </div>
  59.  
  60.         <script>
  61.         $(function () {
  62.             $('.main').bootstrapToggle({
  63.                 on: 'Да',
  64.                 off: 'Нет'
  65.             });
  66.         });
  67.  
  68.         $(function () {
  69.             $('.main').change(function () {
  70.                 if($(".main").is(':checked')) {
  71. {#                    alert(this.id);#}
  72.                     $.ajax({
  73.                         'type': 'POST',
  74.                         'url': '/driver_workplace/',
  75.                         'data': 1,
  76.                         'success': function(data){
  77.                             alert(data);
  78.                         },
  79.                         'dataType': 'json'
  80.                     });
  81.                 }
  82.             })
  83.         });
  84.     </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement