street_notifyDetail_list.html 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128
  1. <!DOCTYPE HTML>
  2. <html xmlns:th="http://www.thymeleaf.org"
  3. xmlns:layout="http://www.ultraq.net.nz/thymeleaf/layout"
  4. layout:decorate="~{admin/common/common}">
  5. <head>
  6. <title>添加幻灯片</title>
  7. </head>
  8. <body layout:fragment="content">
  9. <style>
  10. .permission-list2 > dt{
  11. display:block!important;
  12. width:50%!important;
  13. background-color: #efefef!important;
  14. padding: 5px 10px!important;
  15. float:none!important;
  16. }
  17. </style>
  18. <article class="page-container">
  19. <form class="form form-horizontal" id="form-notify-add">
  20. <div id="tab-system" class="HuiTab">
  21. <div class="tabBar cl">
  22. <span>递推园区</span>
  23. </div>
  24. <div class="tabCon">
  25. <table id="streetTb" class="table table-border table-bordered table-bg table-hover">
  26. <thead>
  27. <tr class="text-c">
  28. <th>园区名称</th>
  29. <th>阅读情况</th>
  30. </tr>
  31. </thead>
  32. <tbody class="pushStreetsList" >
  33. <tr class="text-c" th:each="build,iterStat:${buildDetail}"
  34. th:object="${build}">
  35. <td><span name="push_name" th:text="*{push_name}"></span></td>
  36. <td class="td-status">
  37. <span class="label radius" th:unless="*{is_read}">未读</span>
  38. <span class="label radius label-success" th:if="*{is_read}">已读</span>
  39. </td>
  40. </tr>
  41. </tbody>
  42. </table>
  43. <div th:replace="admin/common/page :: page"></div>
  44. </div>
  45. </div>
  46. <div class="row cl">
  47. <div class="col-xs-8 col-sm-9 col-xs-offset-4 col-sm-offset-2">
  48. <button class="btn btn-primary radius" type="submit" onClick="savePush();"><i class="Hui-iconfont">&#xe632;</i> 保存</button>
  49. <button onClick="removeIframe();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
  50. </div>
  51. </div>
  52. </form>
  53. </article>
  54. <script type="text/javascript" th:src="@{/js/government/notify/notify_addPush.js}"></script>
  55. <script th:inline="javascript">
  56. !function($) {
  57. $.fn.Huitab = function(options){
  58. var defaults = {
  59. tabBar:'.tabBar span',
  60. tabCon:".tabCon",
  61. className:"current",
  62. tabEvent:"click",
  63. index:0,
  64. }
  65. var options = $.extend(defaults, options);
  66. this.each(function(){
  67. var that = $(this);
  68. that.find(options.tabBar).removeClass(options.className);
  69. that.find(options.tabBar).eq(options.index).addClass(options.className);
  70. that.find(options.tabCon).hide();
  71. that.find(options.tabCon).eq(options.index).show();
  72. that.find(options.tabBar).on(options.tabEvent,function(){
  73. that.find(options.tabBar).removeClass(options.className);
  74. $(this).addClass(options.className);
  75. var index = that.find(options.tabBar).index(this);
  76. that.find(options.tabCon).hide();
  77. that.find(options.tabCon).eq(index).show();
  78. });
  79. });
  80. }
  81. } (window.jQuery);
  82. $(function () {
  83. $("#tab-system").Huitab();
  84. $(".permission-list dt input:checkbox").click(function(){
  85. $(this).closest("dl").find("dd input:checkbox").prop("checked",$(this).prop("checked"));
  86. });
  87. $(".permission-list2 dd input:checkbox").click(function(){
  88. var l =$(this).parent().parent().find("input:checked").length;
  89. var l2=$(this).parents(".permission-list").find(".permission-list2 dd").find("input:checked").length;
  90. if($(this).prop("checked")){
  91. $(this).closest("dl").find("dt input:checkbox").prop("checked",true);
  92. $(this).parents(".permission-list").find("dt").first().find("input:checkbox").prop("checked",true);
  93. }
  94. else{
  95. if(l==0){
  96. $(this).closest("dl").find("dt input:checkbox").prop("checked",false);
  97. }
  98. if(l2==0){
  99. $(this).parents(".permission-list").find("dt").first().find("input:checkbox").prop("checked",false);
  100. }
  101. }
  102. });
  103. });
  104. /**
  105. * 取消
  106. */
  107. function removeIframe() {
  108. var index = parent.layer.getFrameIndex(window.name);
  109. parent.layer.close(index);
  110. }
  111. </script>
  112. </body>
  113. </html>