人人商城

switch.html 1.2KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. {template 'common/header-gw'}
  2. {template 'extension/service-tabs'}
  3. <style>
  4. .table td span{display:inline-block;}
  5. .table td input{margin-bottom:0;}
  6. </style>
  7. <script type="text/javascript">
  8. $(function(){
  9. $('div.make-switch').on('switch-change', function (e, data) {
  10. var rids = [];
  11. $('div.make-switch :checkbox:checked').each(function(){
  12. rids.push($(this).val());
  13. });
  14. $.post(location.href, {'rids': rids.toString()}, function(dat){
  15. });
  16. });
  17. });
  18. </script>
  19. <h5 class="page-header">常用服务接入</h5>
  20. <form action="" method="post">
  21. <div class="main">
  22. <div style="padding:15px;">
  23. <table class="table table-hover">
  24. <thead class="navbar-inner">
  25. <tr>
  26. <th style="width:200px;">服务名称</th>
  27. <th style="min-width:260px;">功能说明</th>
  28. <th style="width:60px;">状态</th>
  29. </tr>
  30. </thead>
  31. <tbody>
  32. {loop $ds $row}
  33. <tr>
  34. <td>{$row['title']}</td>
  35. <td>{$row['description']}</td>
  36. <td>
  37. <div class="make-switch" data-on-label="启用" data-off-label="停用">
  38. <input type="checkbox" value="{$row['rid']}"{$row['switch']} />
  39. </div>
  40. </td>
  41. </tr>
  42. {/loop}
  43. </tbody>
  44. </table>
  45. </div>
  46. </div>
  47. </form>
  48. {template 'common/footer-gw'}