Advertisement
Guest User

Untitled

a guest
May 25th, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.75 KB | None | 0 0
  1. {% extends "layout/base_layout.html" %}
  2. {% block class %}body-manager{% endblock %}
  3. {% block wrapper %}
  4. <div id="my-content" class="main-holder pad-holder span12 top10" style="padding-right:12px;">
  5. <div class="row-fluid clearfix">
  6. <div class="row-fluid blc mIdent">
  7. <div class="span3">
  8. <div class="iholder fbcolor">
  9. <i class="icon-film"></i>
  10. </div>
  11. </div>
  12. <div class="span8">
  13. <h1>Media manager</h1>
  14. Media shared by {{ current_user.username }}<p>{{ videos|length }} entries.
  15. <p>
  16. </div>
  17. </div>
  18.  
  19. <form class="form-horizontal styled" action=""
  20. enctype="multipart/form-data" method="post">
  21.  
  22. <div class="cleafix full"></div>
  23. <fieldset>
  24. <div class="table-overflow top10">
  25. <table class="table table-bordered table-checks">
  26. <thead>
  27. <tr>
  28. <th><input type="checkbox" name="checkRows" class="check-all" id="checkAll"/></th>
  29. <th colspan="2">Video</th>
  30. <th>Duration</th>
  31. <th>Likes</th>
  32. <th>Views</th>
  33. <th width="110px">
  34. <button class="btn btn-danger" type="submit">Unpublish</button>
  35. </th>
  36. </tr>
  37. </thead>
  38. <tbody>
  39. {% for item in videos %}
  40. <tr>
  41. <td><input type="checkbox" name="checkRow[]" value="{{ item.id }}" class="chk"/></td>
  42. <td width="100"><a class="tipS" target="_blank"
  43. href="{{url_base}}/watch?={{ item.token }}"
  44. title="View"><img
  45. {% if item.thumb|starswith %}
  46. src={{ item.thumb }}
  47. {% else %}
  48. src="{{ url_for('static', filename=item.thumb ) }}"
  49. {% endif %}
  50. style="width:100px; height:50px;"></a></td>
  51. <td><a class="tipS" target="_blank" href="{{url_base}}/watch?={{ item.token }}"
  52. title="{{ item.title }}"><strong>{{ item.title }}</strong></a></td>
  53. <td>{{ item.duration|timedelta }}</td>
  54. <td>{{ item.liked }}</td>
  55. <td>{{ item.views }}</td>
  56. <td>
  57. <div class="btn-group">
  58. <a class="btn btn-danger tipS"
  59. href="http://localhost/me&sk=videos&p=1&delete-video=10"
  60. title="Unpublish"><i
  61. class="icon-trash" style=""></i></a>
  62. <a class="btn btn-info tipS" href="http://localhost/me&sk=edit-video&vid=10"
  63. title="Edit"><i class="icon-edit" style=""></i></a>
  64. </div>
  65. </td>
  66. </tr>
  67. {% endfor %}
  68. </tbody>
  69. </table>
  70. </div>
  71. </fieldset>
  72. </form>
  73. </div>
  74. </div>
  75. {% endblock %}
  76. {% block script %}
  77. <script type="text/javascript" src="{{ url_for('static', filename='js/jquery-1.11.1.min.js') }}"></script>
  78. <script type="text/javascript" src="{{ url_for('static', filename='js/jquery.validate.min.js') }}"></script>
  79. <script>
  80. $("#checkAll").change(function(){
  81. $('.chk').prop('checked',this.checked);
  82. });
  83.  
  84. $(".chk").change(function () {
  85. if ($(".chk:checked").length == $(".chk").length) {
  86. $('#checkAll').prop('checked','checked');
  87. }else{
  88. $('#checkAll').prop('checked',false);
  89. }
  90. });
  91. </script>
  92. {% endblock %}
  93.  
  94. <script type="text/javascript" src="{{ url_for('static', filename='js/eh.js') }}"></script>
  95.  
  96. $("#checkAll").change(function(){
  97. ...
  98.  
  99. $(document).on('change', '#checkAll', function()
  100. ...
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement