159049f2809846cb9a9697394a63ab7de2d19fa6.svn-base 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215
  1. <%@ page language="java" pageEncoding="UTF-8"%>
  2. <%@ page language="java"
  3. import="java.util.ArrayList,
  4. com.sysmodel.listmodel.xmlmodel.impl.FormListImpl,
  5. com.sysmodel.listmodel.xmlmodel.impl.QueryFieldImpl"%>
  6. <%
  7. String listid = request.getParameter("listid") == null ? "" : request.getParameter("listid");
  8. FormListImpl FormList = null;
  9. ArrayList QueryFields =null;
  10. if(session.getAttribute("FormList"+listid) == null){
  11. return;
  12. } else {
  13. FormList = (FormListImpl)session.getAttribute("FormList"+listid);
  14. QueryFields = FormList.getQueryFields();
  15. }
  16. %>
  17. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  18. <html>
  19. <head>
  20. <title>查询字段排序页面</title>
  21. <meta http-equiv="pragma" content="no-cache">
  22. <meta http-equiv="cache-control" content="no-cache">
  23. <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
  24. <meta http-equiv="expires" content="0">
  25. <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
  26. <meta http-equiv="description" content="This is my page">
  27. <link rel="stylesheet" href="../../../styles/style.css" type="text/css"></link>
  28. <link rel="stylesheet" href="../../../styles/css.css" type="text/css"></link>
  29. <script type="text/javascript">
  30. function remove(flag){
  31. var sort = document.getElementById("sort");
  32. if(sort.selectedIndex !=-1){
  33. for(var selIndex=0; selIndex < sort.options.length; selIndex ++){
  34. if(sort.options[selIndex].selected){
  35. var value = sort.options[selIndex].value;
  36. var text = sort.options[selIndex].text;
  37. if (flag == '1'){
  38. if(selIndex != 0){
  39. var value1 = sort.options[selIndex-1].value;
  40. var text1 = sort.options[selIndex-1].text;
  41. sort.options[selIndex].value = value1;
  42. sort.options[selIndex].text = text1;
  43. sort.options[selIndex-1].value = value;
  44. sort.options[selIndex-1].text = text;
  45. sort.selectedIndex = sort.selectedIndex - 1;
  46. }
  47. }else if (flag == '0') {
  48. var max = sort.options.length - 1;
  49. if(selIndex != max){
  50. var value2 = sort.options[selIndex+1].value;
  51. var text2 = sort.options[selIndex+1].text;
  52. sort.options[selIndex].value = value2;
  53. sort.options[selIndex].text = text2;
  54. sort.options[selIndex+1].value = value;
  55. sort.options[selIndex+1].text = text;
  56. sort.selectedIndex = sort.selectedIndex + 1;
  57. return;
  58. }
  59. }
  60. }
  61. }
  62. }
  63. }
  64. function getAllOptions(){
  65. var sort = document.getElementById("sort");
  66. var url = "";
  67. for(var selIndex = 0; selIndex < sort.options.length; selIndex ++){
  68. url = url + selIndex + "=" + sort.options[selIndex].value + "&";
  69. }
  70. url = url + "listid=<%=listid%>";
  71. document.location.href = "SerchOutSortExc.jsp?" + url;
  72. }
  73. </script>
  74. <script type="text/javascript" src="../../../scripts/dojo/dojo/dojo.js" djConfig="isDebug: false, parseOnLoad: true"></script>
  75. <script type="text/javascript">
  76. dojo.require("dijit.form.Form");
  77. dojo.require("dijit.form.ValidationTextBox");
  78. dojo.require("dijit.form.ComboBox");
  79. dojo.require("dijit.form.FilteringSelect");
  80. dojo.require("dijit.form.NumberSpinner");
  81. dojo.require("dijit.form.Button");
  82. dojo.require("dijit.Tooltip");
  83. </script>
  84. <style type="text/css">
  85. @import "../../../scripts/dojo/dojo/resources/dojo.css";
  86. @import "../../../scripts/dojo/dijit/themes/tundra/tundra.css";
  87. @import "../../../scripts/dojo/dijit/themes/tundra/tundra_rtl.css";
  88. @import "../../../scripts/dojo/dijit/tests/css/dijitTests.css";
  89. .formQuestion {
  90. background-color:#d0e3f5;
  91. padding:0.3em;
  92. font-weight:900;
  93. font-family:Verdana, Arial, sans-serif;
  94. font-size:0.8em;
  95. color:#5a5a5a;
  96. }
  97. .formAnswer {
  98. background-color:#f5eede;
  99. padding:0.3em;
  100. margin-bottom:1em;
  101. width: 100%;
  102. }
  103. .pageSubContentTitle {
  104. color:#8e8e8e;
  105. font-size:1em;
  106. font-family:Verdana, Arial, sans-serif;
  107. margin-bottom:0.75em;
  108. }
  109. .small INPUT {
  110. width: 2.5em;
  111. }
  112. .medium INPUT {
  113. width: 10em;
  114. }
  115. .long INPUT {
  116. width: 20em;
  117. }
  118. .firstLabel {
  119. display: inline-block;
  120. display: -moz-inline-box;
  121. width: 10em;
  122. min-width: 10em;
  123. }
  124. .secondLabel {
  125. width: auto;
  126. margin-left: 5em;
  127. margin-right: 1em;
  128. }
  129. fieldset label {
  130. margin-right: 1em;
  131. }
  132. .noticeMessage {
  133. display: block;
  134. float: right;
  135. font-weight: normal;
  136. font-family:Arial, Verdana, sans-serif;
  137. color:#663;
  138. font-size:0.9em;
  139. }
  140. </style>
  141. </head>
  142. <body class="tundra">
  143. <form name="form1" method="post" action="">
  144. <div id="hiddenDiv" />
  145. </div>
  146. <div id=total>
  147. <div class="whiteborder">
  148. <div class="titback">
  149. <div class="floatleft"><img src="../../../images/index/arrow1.gif" alt="1" width="20" height="24" /></div>
  150. <div class="dropshadow">查询字段排序</div>
  151. <div class="clear"></div>
  152. </div>
  153. <div class="report">
  154. <table align="center" id="SortTable512_1" width="100%" cellpadding="1" cellspacing="1" class="ltab2">
  155. <tr>
  156. <td width="60%"><table align="center" width="100%" border="0" cellpadding="1" cellspacing="1" class="ltab2" >
  157. <tr class="TableBgColorAsh">
  158. <td width="40%" align="center">
  159. <select id="sort" name="dataName" size="15" style="width:80%" ondblclick="" class="SelectBgcolor">
  160. <%
  161. for(int i = 0 ; i < QueryFields.size(); i ++){
  162. QueryFieldImpl QueryFieldImpl = (QueryFieldImpl)QueryFields.get(i);
  163. String Labels = QueryFieldImpl.getLabel();
  164. %>
  165. <option value="<%=Labels %>" ><%=Labels %></option>
  166. <%}%>
  167. </select></td>
  168. <td width="20%" align="center">
  169. <button id="top" dojoType="dijit.form.Button" onClick='console.log("clicked simple"),remove("1")' type="button" iconClass="plusIcon">
  170. </button>
  171. <br>
  172. <br>
  173. <button id="down" dojoType="dijit.form.Button" onClick='console.log("clicked simple"),remove("0")' type="button" iconClass="plusIcon">
  174. </button>
  175. </td>
  176. </tr>
  177. </table></td>
  178. </tr>
  179. </table>
  180. </div>
  181. <div class="btmbox">
  182. <button id="save" dojoType="dijit.form.Button" onClick='console.log("clicked simple"),getAllOptions();'iconClass="plusIcon">
  183. 提交
  184. </button>&nbsp;&nbsp;
  185. <span dojoType="dijit.Tooltip" connectId="save">提交按钮</span>&nbsp;&nbsp;
  186. <button id="re" dojoType="dijit.form.Button" onClick="document.form1.reset()"iconClass="plusIcon">
  187. 重置
  188. </button>
  189. <span dojoType="dijit.Tooltip" connectId="re">重置按钮</span>&nbsp;&nbsp;
  190. <button id="clo" dojoType="dijit.form.Button" onClick='console.log("clicked simple"),window.close();' iconClass="plusIcon">
  191. 关闭
  192. </button>
  193. <span dojoType="dijit.Tooltip" connectId="clo">关闭按钮</span>&nbsp;&nbsp;
  194. </div>
  195. </div>
  196. </div>
  197. </form>
  198. </body>
  199. </html>