dyjh hace 6 años
padre
commit
16f0646075
Se han modificado 1 ficheros con 7 adiciones y 2 borrados
  1. 7 2
      resources/views/admin/album/cat/index.blade.php

+ 7 - 2
resources/views/admin/album/cat/index.blade.php

xqd xqd
@@ -64,7 +64,7 @@
 											<a href="{{ U('Album/Cat/destroy',['id'=>$item->id])}}" onclick="return confirm('你确定执行删除操作?');" class="btn btn-sm btn-danger pull-right">删除</a>
 										@endif
 										@if(count($item->sonlist) > 0)
-											<a onclick="showHidden({{ $item->id }})" class="btn btn-sm btn-default pull-right">查看/隐藏</a>
+											<a id="a{{ $item->id }}" onclick="showHidden({{ $item->id }})" class="btn btn-sm btn-default pull-right">查看</a>
 										@endif
 									</div>
 								{{--@if(role('Album/Cat/view'))
@@ -119,7 +119,12 @@
 
 <script>
 	function showHidden(id){
-
+		var text = $("#a"+id).text();
+		if (text == '查看') {
+            $("#a"+id).text('隐藏');
+		} else {
+            $("#a"+id).text('查看');
+		}
 		$("#son"+id).slideToggle(2000);
 	}
 </script>