columnSet.jsp 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@ taglib prefix = "c" uri="http://java.sun.com/jsp/jstl/core" %>
  3. <form id="setUserForm" method="post">
  4. <table id="setUserDg" class="mytable" style="width:460px">
  5. <tr>
  6. <th width="40">显示</th>
  7. <th width="40">锁定</th>
  8. <th width="160">列名</th>
  9. <th width="60">列宽</th>
  10. <th width="60">上移</th>
  11. <th width="60">下移</th>
  12. </tr>
  13. <c:forEach var="list" items="${columnList}">
  14. <tr id="column_whzl_set_${list.field}" class="mySetTr" <c:if test="${list.id == 0}">style="background-color: #4EEE94;"</c:if>>
  15. <td><input type="checkbox" value="${list.field}_${list.title}_${list.formatter}" <c:if test="${list.show == 1}">checked="checked"</c:if> name="user_columns"></td>
  16. <td><input type="checkbox" value="${list.field}_${list.title}_${list.formatter}" <c:if test="${list.lock == 1}">checked="checked"</c:if> name="user_frozenColumns"></td>
  17. <td>${list.title}</td>
  18. <td>
  19. <input class="easyui-numberspinner" id="column_whzl_width_set_${list.field}" value="${list.width}" data-options="min:40,max:300,increment:10" style="width:60;">
  20. </td>
  21. <td>
  22. <a id="btn" href="javascript:move('0','${list.field}','${list.id}')" class="easyui-linkbutton" data-options="iconCls:'icon-up'"></a>
  23. </td>
  24. <td>
  25. <a id="btn" href="javascript:move('1','${list.field}','${list.id}')" class="easyui-linkbutton" data-options="iconCls:'icon-down'"></a>
  26. </td>
  27. </tr>
  28. </c:forEach>
  29. </table>
  30. </form>
  31. <script type="text/javascript">
  32. <!--
  33. function move(direction,field,id){
  34. if("0" == direction){
  35. $("#column_whzl_set_"+field).insertBefore($("#column_whzl_set_"+field).prev(".mySetTr"));
  36. }else{
  37. $("#column_whzl_set_"+field).next(".mySetTr").insertBefore($("#column_whzl_set_"+field));
  38. }
  39. }
  40. //-->
  41. </script>