123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215 |
- <%@ page language="java" pageEncoding="UTF-8"%>
- <%@ page language="java"
- import="java.util.ArrayList,
- com.sysmodel.listmodel.xmlmodel.impl.FormListImpl,
- com.sysmodel.listmodel.xmlmodel.impl.QueryFieldImpl"%>
- <%
- String listid = request.getParameter("listid") == null ? "" : request.getParameter("listid");
- FormListImpl FormList = null;
- ArrayList QueryFields =null;
-
- if(session.getAttribute("FormList"+listid) == null){
- return;
- } else {
- FormList = (FormListImpl)session.getAttribute("FormList"+listid);
- QueryFields = FormList.getQueryFields();
- }
- %>
- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
- <html>
- <head>
- <title>查询字段排序页面</title>
- <meta http-equiv="pragma" content="no-cache">
- <meta http-equiv="cache-control" content="no-cache">
- <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
- <meta http-equiv="expires" content="0">
- <meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
- <meta http-equiv="description" content="This is my page">
- <link rel="stylesheet" href="../../../styles/style.css" type="text/css"></link>
- <link rel="stylesheet" href="../../../styles/css.css" type="text/css"></link>
- <script type="text/javascript">
- function remove(flag){
- var sort = document.getElementById("sort");
- if(sort.selectedIndex !=-1){
- for(var selIndex=0; selIndex < sort.options.length; selIndex ++){
- if(sort.options[selIndex].selected){
- var value = sort.options[selIndex].value;
- var text = sort.options[selIndex].text;
- if (flag == '1'){
- if(selIndex != 0){
- var value1 = sort.options[selIndex-1].value;
- var text1 = sort.options[selIndex-1].text;
- sort.options[selIndex].value = value1;
- sort.options[selIndex].text = text1;
- sort.options[selIndex-1].value = value;
- sort.options[selIndex-1].text = text;
- sort.selectedIndex = sort.selectedIndex - 1;
- }
- }else if (flag == '0') {
- var max = sort.options.length - 1;
- if(selIndex != max){
- var value2 = sort.options[selIndex+1].value;
- var text2 = sort.options[selIndex+1].text;
- sort.options[selIndex].value = value2;
- sort.options[selIndex].text = text2;
- sort.options[selIndex+1].value = value;
- sort.options[selIndex+1].text = text;
- sort.selectedIndex = sort.selectedIndex + 1;
- return;
- }
- }
- }
- }
- }
- }
-
- function getAllOptions(){
- var sort = document.getElementById("sort");
- var url = "";
- for(var selIndex = 0; selIndex < sort.options.length; selIndex ++){
- url = url + selIndex + "=" + sort.options[selIndex].value + "&";
- }
- url = url + "listid=<%=listid%>";
- document.location.href = "SerchOutSortExc.jsp?" + url;
- }
- </script>
- <script type="text/javascript" src="../../../scripts/dojo/dojo/dojo.js" djConfig="isDebug: false, parseOnLoad: true"></script>
- <script type="text/javascript">
- dojo.require("dijit.form.Form");
- dojo.require("dijit.form.ValidationTextBox");
- dojo.require("dijit.form.ComboBox");
- dojo.require("dijit.form.FilteringSelect");
-
-
- dojo.require("dijit.form.NumberSpinner");
-
-
-
- dojo.require("dijit.form.Button");
- dojo.require("dijit.Tooltip");
-
- </script>
- <style type="text/css">
- @import "../../../scripts/dojo/dojo/resources/dojo.css";
- @import "../../../scripts/dojo/dijit/themes/tundra/tundra.css";
- @import "../../../scripts/dojo/dijit/themes/tundra/tundra_rtl.css";
- @import "../../../scripts/dojo/dijit/tests/css/dijitTests.css";
- .formQuestion {
- background-color:#d0e3f5;
- padding:0.3em;
- font-weight:900;
- font-family:Verdana, Arial, sans-serif;
- font-size:0.8em;
- color:#5a5a5a;
- }
- .formAnswer {
- background-color:#f5eede;
- padding:0.3em;
- margin-bottom:1em;
- width: 100%;
- }
- .pageSubContentTitle {
- color:#8e8e8e;
- font-size:1em;
- font-family:Verdana, Arial, sans-serif;
- margin-bottom:0.75em;
- }
- .small INPUT {
- width: 2.5em;
- }
- .medium INPUT {
- width: 10em;
- }
- .long INPUT {
- width: 20em;
- }
- .firstLabel {
- display: inline-block;
- display: -moz-inline-box;
- width: 10em;
- min-width: 10em;
- }
- .secondLabel {
- width: auto;
- margin-left: 5em;
- margin-right: 1em;
- }
- fieldset label {
- margin-right: 1em;
- }
- .noticeMessage {
- display: block;
- float: right;
- font-weight: normal;
- font-family:Arial, Verdana, sans-serif;
- color:#663;
- font-size:0.9em;
- }
- </style>
- </head>
-
- <body class="tundra">
- <form name="form1" method="post" action="">
- <div id="hiddenDiv" />
- </div>
- <div id=total>
- <div class="whiteborder">
- <div class="titback">
- <div class="floatleft"><img src="../../../images/index/arrow1.gif" alt="1" width="20" height="24" /></div>
- <div class="dropshadow">查询字段排序</div>
- <div class="clear"></div>
- </div>
- <div class="report">
- <table align="center" id="SortTable512_1" width="100%" cellpadding="1" cellspacing="1" class="ltab2">
- <tr>
- <td width="60%"><table align="center" width="100%" border="0" cellpadding="1" cellspacing="1" class="ltab2" >
- <tr class="TableBgColorAsh">
- <td width="40%" align="center">
- <select id="sort" name="dataName" size="15" style="width:80%" ondblclick="" class="SelectBgcolor">
- <%
- for(int i = 0 ; i < QueryFields.size(); i ++){
- QueryFieldImpl QueryFieldImpl = (QueryFieldImpl)QueryFields.get(i);
- String Labels = QueryFieldImpl.getLabel();
- %>
- <option value="<%=Labels %>" ><%=Labels %></option>
- <%}%>
- </select></td>
- <td width="20%" align="center">
- <button id="top" dojoType="dijit.form.Button" onClick='console.log("clicked simple"),remove("1")' type="button" iconClass="plusIcon">
- ︽
- </button>
- <br>
- <br>
- <button id="down" dojoType="dijit.form.Button" onClick='console.log("clicked simple"),remove("0")' type="button" iconClass="plusIcon">
- ︾
- </button>
- </td>
- </tr>
- </table></td>
-
- </tr>
- </table>
- </div>
- <div class="btmbox">
- <button id="save" dojoType="dijit.form.Button" onClick='console.log("clicked simple"),getAllOptions();'iconClass="plusIcon">
- 提交
- </button>
- <span dojoType="dijit.Tooltip" connectId="save">提交按钮</span>
-
- <button id="re" dojoType="dijit.form.Button" onClick="document.form1.reset()"iconClass="plusIcon">
- 重置
- </button>
- <span dojoType="dijit.Tooltip" connectId="re">重置按钮</span>
-
- <button id="clo" dojoType="dijit.form.Button" onClick='console.log("clicked simple"),window.close();' iconClass="plusIcon">
- 关闭
- </button>
- <span dojoType="dijit.Tooltip" connectId="clo">关闭按钮</span>
- </div>
- </div>
- </div>
- </form>
- </body>
- </html>
|