tier.jsp 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639
  1. <%@ page pageEncoding="UTF-8"%>
  2. <%@ page contentType="text/html; charset=UTF-8" language="java" %>
  3. <%@ page language="java"
  4. import="java.util.*,
  5. com.sysmodel.listmodel.xmlmodel.impl.FormListImpl,
  6. com.sysmodel.datamodel.xmlmodel.ModelFactory,
  7. com.sysmodel.datamodel.xmlmodel.impl.MdpClassImpl,
  8. com.sysmodel.datamodel.xmlmodel.able.SysModel,
  9. com.sysmodel.listmodel.xmlmodel.impl.ListFieldImpl,
  10. com.sysmodel.datamodel.xmlmodel.impl.MdpAttributeImpl"%>
  11. <%
  12. String listid = request.getParameter("listid") == null ? "" : request.getParameter("listid");
  13. String dataName = request.getParameter("dataName") == null ? "" : request.getParameter("dataName");
  14. String classid = request.getParameter("classid") == null ? "" : request.getParameter("classid");
  15. String action = "add";
  16. String popup = "0";
  17. String showType = request.getParameter("showType") == null ? "" : request.getParameter("showType");
  18. String label = request.getParameter("label") == null ? "" : request.getParameter("label");
  19. FormListImpl FormList = null;
  20. ArrayList tableList = null;
  21. String width = "";
  22. String url = "";
  23. String target = "";
  24. String image = "";
  25. String showTxt = "";
  26. String formWidth = "";
  27. String formHeight = "";
  28. String remark = "";
  29. int n = 0;
  30. int m = 0;
  31. String imageid = "";
  32. if(session.getAttribute("FormList"+listid) == null){
  33. return;
  34. } else {
  35. FormList = (FormListImpl)session.getAttribute("FormList"+listid);
  36. tableList = FormList.getQueryTables();
  37. ArrayList listFields = FormList.getQueryList().getlistFields();
  38. for (int i = 0 ; i < listFields.size() ; i++) {
  39. ListFieldImpl listFieldImpl = (ListFieldImpl)listFields.get(i);
  40. String oLabel = listFieldImpl.getLabel()==null?"":listFieldImpl.getLabel();
  41. if (listFieldImpl.getDataName().equals(dataName) && oLabel.equals(label)){
  42. width = listFieldImpl.getWidth() == null ? "" : listFieldImpl.getWidth();
  43. if(width.indexOf("%") != -1){
  44. StringBuffer rWidth = new StringBuffer(width);
  45. rWidth.reverse();
  46. rWidth.deleteCharAt(0);
  47. rWidth.reverse();
  48. width = rWidth.toString();
  49. }
  50. url = listFieldImpl.getUrl() == null ? "" :listFieldImpl.getUrl();
  51. target = listFieldImpl.getTarget() == null ? "" :listFieldImpl.getTarget();
  52. image = listFieldImpl.getImage() == null ? "" :listFieldImpl.getImage();
  53. showTxt = listFieldImpl.getShowTxt() == null ? "" :listFieldImpl.getShowTxt();
  54. formWidth = listFieldImpl.getFormWith() == null ? "" :listFieldImpl.getFormWith();
  55. formHeight = listFieldImpl.getFormHeight() == null ? "" :listFieldImpl.getFormHeight();
  56. remark = listFieldImpl.getRemark() == null ? "" :listFieldImpl.getRemark();
  57. if (showType.equals("0")){
  58. if(!dataName.equals("")){
  59. action = "edit";
  60. }
  61. }else if (showType.equals("1")) {
  62. if(!image.equals("")){
  63. action = "edit";
  64. }
  65. } if (showType.equals("2")) {
  66. if(!showTxt.equals("")){
  67. action = "edit";
  68. }
  69. }
  70. if(!image.equals("")){
  71. n = image.lastIndexOf(".");
  72. m = image.lastIndexOf("/");
  73. imageid = image.substring(m+1,n);
  74. }
  75. }
  76. }
  77. }
  78. if (!formWidth.equals("") || !formHeight.equals("")){
  79. popup = "1";
  80. }
  81. %>
  82. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  83. <HTML>
  84. <HEAD>
  85. <TITLE>列属性信息配置页面</TITLE>
  86. <META http-equiv="Content-Type" content="text/html; charset=GB2312">
  87. <link rel="stylesheet" href="../../../styles/css.css" type="text/css"></link>
  88. <link rel="stylesheet" href="../../../styles/style.css" type="text/css"></link>
  89. <script type="text/javascript" src="../../../scripts/creatselect.js"></script>
  90. <META HTTP-EQUIV="Pragma" CONTENT="no-cache">
  91. <META HTTP-EQUIV="Cache-Control" CONTENT="no-cache">
  92. <META HTTP-EQUIV="Expires" CONTENT="0">
  93. <style type="text/css">
  94. ol li { margin:8px}
  95. #con { font-size:12px; width:100%; margin:0 auto}
  96. #tags { height:23px; width:99%; margin:0; padding:0; margin-left:10px}
  97. #tags li { float:left; margin-right:1px; background:url(images/tagleft.gif) no-repeat left bottom; height:23px; list-style-type:none}
  98. #tags li a { text-decoration:none; float:left; background:url(images/tagright.gif) no-repeat right bottom; height:23px; padding:0px 10px; line-height:23px; color:#999}
  99. #tags li.emptyTag { width:4px; background:none}
  100. #tags li.selectTag { background-position: left top; position:relative; height:25px; margin-bottom:-2px}
  101. #tags li.selectTag a { background-position: right top; color:#000; height:25px; line-height:25px;}
  102. #tagContent { padding:1px; background-color:#fff; border:1px solid #aecbd4;}
  103. .tagContent { background:url(images/bg.gif) repeat-x; height:350px; padding:10px; color:#474747; width:576px; display:none}
  104. #tagContent div.selectTag{ display:block}
  105. </style>
  106. <script type="text/javascript" src="../../../scripts/dojo/dojo/dojo.js" djConfig="isDebug: false, parseOnLoad: true"></script>
  107. <script type="text/javascript">
  108. dojo.require("dijit.form.ValidationTextBox");
  109. dojo.require("dijit.form.FilteringSelect");
  110. dojo.require("dijit.form.NumberSpinner");
  111. dojo.require("dijit.form.Button");
  112. // make dojo.toJson() print dates correctly (this feels a bit dirty)
  113. Date.prototype.json = function(){ return dojo.date.stamp.toISOString(this, {selector: 'date'});};
  114. </script>
  115. <style type="text/css">
  116. @import "../../../scripts/dojo/dojo/resources/dojo.css";
  117. @import "../../../scripts/dojo/dijit/themes/tundra/tundra.css";
  118. @import "../../../scripts/dojo/dijit/tests/css/dijitTests.css";
  119. </style>
  120. <script type="text/javascript">
  121. function showPopUp(str){
  122. var showpopup = document.getElementById("showpopup");
  123. if(str == '1'){
  124. showpopup.style.display = "";
  125. document.myform.formHeight.value = "<%=formHeight%>";
  126. document.myform.formWidth.value = "<%=formWidth%>";
  127. }else{
  128. document.myform.formHeight.value = "";
  129. document.myform.formWidth.value = "";
  130. showpopup.style.display = "none";
  131. }
  132. }
  133. function showParticular(str){
  134. var table = document.getElementById("tableDiv");
  135. var text = document.getElementById("textDiv");
  136. var image = document.getElementById("imageDiv");
  137. if(str == '0'){
  138. table.style.display = "";
  139. text.style.display = "none";
  140. image.style.display = "none";
  141. }else if(str == '2'){
  142. text.style.display = "";
  143. image.style.display = "none";
  144. table.style.display = "none";
  145. }else if(str == '1'){
  146. image.style.display = "";
  147. text.style.display = "none";
  148. table.style.display = "none";
  149. }
  150. }
  151. function checkinput(){
  152. document.forms[0].submit();
  153. }
  154. function selectShowType(){
  155. var showType = document.all.showType;
  156. var str ;
  157. for (i=0;i<showType.length;i++){
  158.  if(showType[i].checked) str = showType[i].value;
  159. }
  160. if (str == "1"){
  161. var img = document.getElementById("<%=imageid%>");
  162. selectme(img);
  163. }
  164. showParticular(str);
  165. }
  166. function check(){
  167. var showType = document.all.showType;
  168. var str ;
  169. var strP=/^\d+(\.\d+)?$/;
  170. var flag = false;
  171. for (i=0;i<showType.length;i++){
  172. if(showType[i].checked){
  173. flag = true;
  174. str = showType[i].value;
  175. }
  176. }
  177. if (!flag){
  178. alert("请您选择类型!");
  179. document.myform.showType.focus();
  180. return false;
  181. }else if(flag){
  182. if(str == "0"){
  183. if(document.myform.classid.value == 0 || document.myform.classid.value == ""){
  184. alert("请您选择数据表!");
  185. document.myform.showType.focus();
  186. return false;
  187. }else if(document.myform.dataName.value == 0 || document.myform.dataName.value == ""){
  188. alert("请您选择字段!");
  189. document.myform.dataName.focus();
  190. return false;
  191. }else if(document.myform.label1.value == 0 || document.myform.label1.value == ""){
  192. alert("请您录入标题!");
  193. document.myform.label1.focus();
  194. return false;
  195. }
  196. }else if(str == "1"){
  197. if(document.myform.image.value == "/nwyj/admin/images/tool/nothing.gif"){
  198. alert("请您选择图片!");
  199. document.myform.image.focus();
  200. return false;
  201. }else if(document.myform.label3.value == 0 || document.myform.label3.value == ""){
  202. alert("请您录入标题!");
  203. document.myform.label3.focus();
  204. return false;
  205. }
  206. }else if(str == "2"){
  207. if(document.myform.showTxt.value == 0 || document.myform.showTxt.value == ""){
  208. alert("请您录入文本名!");
  209. document.myform.showTxt.focus();
  210. return false;
  211. }else if(document.myform.label2.value == 0 || document.myform.label2.value == ""){
  212. alert("请您录入标题!");
  213. document.myform.label2.focus();
  214. return false;
  215. }
  216. }
  217. }
  218. if(document.myform.width.value != "") {
  219. if(!strP.test(document.myform.width.value)){
  220. alert("列宽为数字格式!");
  221. document.myform.width.focus();
  222. return false;
  223. }
  224. }
  225. if(document.myform.formWidth.value != "") {
  226. if(!strP.test(document.myform.formWidth.value)){
  227. alert("页面宽为数字格式!");
  228. document.myform.width.focus();
  229. return false;
  230. }
  231. }
  232. if(document.myform.formHeight.value != "") {
  233. if(!strP.test(document.myform.formHeight.value)){
  234. alert("页面高为数字格式!");
  235. document.myform.width.focus();
  236. return false;
  237. }
  238. }
  239. document.forms[0].submit();
  240. }
  241. function getTable_Dojo(obj,selectName,gettype){
  242. if(obj.getValue()=="")return;
  243. var strA = "";
  244. createXMLHttpRequest();
  245. axo = new ActiveXObject("Microsoft.XMLDOM");
  246. XMLHttpReq.open("POST","getAttributeXml.jsp?classid="+obj.getValue()+"&gettype="+gettype,false);
  247. XMLHttpReq.setRequestHeader("Content-Length",strA.length);
  248. XMLHttpReq.setRequestHeader("Content-type","application/x-www-form-urlencoded");
  249. XMLHttpReq.send(strA);
  250. axo.loadXML(XMLHttpReq.responseText);
  251. n1 = axo.selectNodes("/root/name");
  252. n2 = axo.selectNodes("/root/description");
  253. BuildSel(unescape(XMLHttpReq.responseText),selectName, n1, n2);
  254. }
  255. </script>
  256. </HEAD>
  257. <body class="tundra" onLoad="showParticular('<%=showType %>');showPopUp(<%=popup %>);">
  258. <%
  259. int imgWidth=64;
  260. int imgHeight=64;
  261. int selecteSize = 3;
  262. String selectedPic = "nothing";
  263. if(!imageid.equals("")){
  264. selectedPic = imageid;
  265. }
  266. %>
  267. <form name="myform" action="tierExc.jsp" method="post">
  268. <input type="hidden" name="listid" value="<%=listid %>">
  269. <input type="hidden" name="action" value="<%=action %>">
  270. <input type="hidden" name="oDataName" value="<%=dataName %>">
  271. <input type="hidden" name="oLabel" value="<%=label %>">
  272. <div id=total>
  273. <div class="whiteborder">
  274. <div class="titback">
  275. <div class="floatleft"><img src="../../../images/index/arrow1.gif" width="20" height="24"/></div>
  276. <div class="dropshadow">列属性信息配置</div>
  277. <div class="clear"></div>
  278. </div>
  279. <div class="report">
  280. <div id="con">
  281. <div id="tagContent" width="100%" height="100%">
  282. <div id="tagContent0" class="tagContent selectTag">
  283. <table align="left" id="SortTable512_1" width="100%" cellpadding="1" cellspacing="1" class="ltab2">
  284. <tr>
  285. <td width="15%" align="right">类型&nbsp;&nbsp;</td>
  286. <td width="85%" align="left">
  287. <input type="radio" name="showType" value="0" onclick="showParticular('0');" <%if(showType.equals("0"))out.print("checked") ;%>>表数据
  288. <input type="radio" name="showType" value="2" onclick="showParticular('2');" <%if(showType.equals("2"))out.print("checked") ;%>>文本
  289. <input type="radio" name="showType" value="1" onclick="showParticular('1');" <%if(showType.equals("1"))out.print("checked") ;%>>图片&nbsp;<font color="red">*</font>
  290. </td>
  291. </tr>
  292. <tr>
  293. <td align="left" colspan="2" width="100%">
  294. <div id="tableDiv" align="left" width="100%" align="right" style="display:none">
  295. <table align="center" frame="box" rules="none" style="border: 1; solid:#FF0000" width="90%" cellpadding="1" cellspacing="1" class="ltab2">
  296. <tr>
  297. <td width="20%" align="right">数据表&nbsp;&nbsp;</td>
  298. <td width="80%" align="left">
  299. <select dojoType="dijit.form.FilteringSelect" onChange="getTable_Dojo(this, document.all.dataName,'all')" required="false" name="classid" id="classid" autocomplete="true">
  300. <option value="0">-请选择-</option>
  301. <%
  302. for(int i = 0 ; i < tableList.size(); i ++){
  303. int iclassid = Integer.parseInt((String)tableList.get(i));
  304. SysModel sysmodel = ModelFactory.getSysmodel();
  305. MdpClassImpl MdpClass = (MdpClassImpl)sysmodel.getMdpClassByClassID(iclassid);
  306. %>
  307. <option value="<%=iclassid %>" <%if(classid.equals((String)tableList.get(i)))out.print("selected"); %>><%=MdpClass.getDescription()%></option>
  308. <%}%>
  309. </select>&nbsp;<font color="red">*</font>
  310. </td>
  311. </tr>
  312. <tr>
  313. <td align="right">字段&nbsp;&nbsp;</td>
  314. <td align="left">
  315. <select name="dataName">
  316. <option value=""></option>
  317. <%
  318. if(!dataName.equals("") && (!classid.equals("0"))){
  319. SysModel sysmodel = ModelFactory.getSysmodel();
  320. MdpClassImpl MdpClass = (MdpClassImpl)sysmodel.getMdpClassByClassID(Integer.parseInt(classid));
  321. ArrayList list = (ArrayList)MdpClass.getAllMdpAttributes();
  322. for(int i = 0 ; i < list.size(); i ++){
  323. MdpAttributeImpl MdpAttribute = (MdpAttributeImpl) list.get(i);
  324. %>
  325. <option value="<%=MdpAttribute.getName() %>" <%if(dataName.equals(MdpAttribute.getName()))out.print("selected") ;%>><%=MdpAttribute.getDescription()%></option>
  326. <%}}%>
  327. </select>&nbsp;<font color="red">*</font>
  328. </td>
  329. </tr>
  330. <tr>
  331. <td align="right">列标题&nbsp;&nbsp;</td>
  332. <td align="left" clospan="3">
  333. <input type="text" value="<%=label %>"
  334. id="label1" name="label1" class="medium"
  335. dojoType="dijit.form.ValidationTextBox"
  336. required="true"
  337. ucfirst="true"
  338. invalidMessage="">
  339. &nbsp;<font color="red">*</font>
  340. </td>
  341. </tr>
  342. </table>
  343. </div>
  344. </td>
  345. </tr>
  346. <tr>
  347. <td align="left" colspan="2" width="100%">
  348. <div id="textDiv" style="display:none">
  349. <table align="center" frame="box" rules="none" style="border: 1; solid:#FF0000" width="90%" cellpadding="1" cellspacing="1" class="ltab2">
  350. <tr>
  351. <td width="15%" align="right">文本名&nbsp;&nbsp;</td>
  352. <td width="85%" align="left" clospan="3">
  353. <input type="text" value="<%=showTxt %>"
  354. id="showTxt" name="showTxt" class="medium"
  355. dojoType="dijit.form.ValidationTextBox"
  356. required="true"
  357. ucfirst="true"
  358. invalidMessage="">
  359. &nbsp;<font color="red">*</font>
  360. </td>
  361. </tr>
  362. <tr>
  363. <td align="right">列标题&nbsp;&nbsp;</td>
  364. <td align="left" clospan="3">
  365. <input type="text" value="<%=label %>"
  366. id="label2" name="label2" class="medium"
  367. dojoType="dijit.form.ValidationTextBox"
  368. required="true"
  369. ucfirst="true"
  370. invalidMessage="">
  371. &nbsp;<font color="red">*</font></td>
  372. </tr>
  373. </table>
  374. </div>
  375. </td>
  376. </tr>
  377. <tr>
  378. <td align="left" colspan="2" width="100%">
  379. <div id="imageDiv" style="display:none">
  380. <table align="center" frame="box" rules="none" style="border: 1; solid:#FF0000" width="90%" cellpadding="1" cellspacing="1" class="ltab2">
  381. <tr>
  382. <td width="15%" align="right">图片&nbsp;&nbsp;</td>
  383. <td width="85%" align="left" clospan="3">
  384. <SPAN onMouseOver="isin=true" onMouseOut="isin=false">
  385. <table width="1" onClick="showlist(this)" border="0" cellspacing="0">
  386. <tr>
  387. <td><img name="imgselected" border='1' src="../../../images/tool/<%=selectedPic %>.gif" WIDTH='64' HEIGHT='64'></td>
  388. <td valign=top><img src="../../../images/button/menu.gif">&nbsp;<font color="red">*</font></td>
  389. </tr>
  390. </table>
  391. <DIV onscroll="scrollud()" id="imgBox" style="z-index:2000 ;position:absolute; left=-800;top=0; background-color:#FFFFFF; border: 1px; solid #000000;overflow-x:hidden;overflow-y:scroll;width:84px; height:<%=(imgHeight * selecteSize) %>px">
  392. <img listID="nothing" id="nothing" src="../../../images/tool/nothing.gif" width="64" height="64" onclick='selectme(this)' onload='if(init)init()'></img><BR>
  393. <img listID="checkbox" id="checkbox" src="../../../images/tool/checkbox.gif" width="64" height="64" onclick='selectme(this)' onload='if(init)init()'></img><BR>
  394. <img listID="date" id="date" src="../../../images/tool/date.gif" width="64" height="64" onclick='selectme(this)' onload='if(init)init()'></img><BR>
  395. <img listID="radio" id="radio" src="../../../images/tool/radio.gif" width="64" height="64" onclick='selectme(this)' onload='if(init)init()'></img><BR>
  396. <img listID="select" id="select" src="../../../images/tool/select.gif" width="64" height="64" onclick='selectme(this)' onload='if(init)init()'></img><BR>
  397. <img listID="text"id="text" src="../../../images/tool/text.gif" width="64" height="64" onclick='selectme(this)' onload='if(init)init()'></img><BR>
  398. <img listID="table_del" id="table_del" src="../../../images/tool/table_del.gif" width="64" height="64" onclick='selectme(this)' onload='if(init)init()'></img><BR>
  399. </DIV>
  400. </SPAN>
  401. <input name="image" type="text" id="myface" size="50" value="<%=image %>">
  402. </td>
  403. </tr>
  404. <tr>
  405. <td align="right">列标题&nbsp;&nbsp;</td>
  406. <td align="left" clospan="3">
  407. <input type="text" value="<%=label %>"
  408. id="label3" name="label3" class="medium"
  409. dojoType="dijit.form.ValidationTextBox"
  410. required="true"
  411. ucfirst="true"
  412. invalidMessage="">
  413. &nbsp;<font color="red">*</font></td>
  414. </tr>
  415. </table>
  416. </div>
  417. </td>
  418. </tr>
  419. <tr>
  420. <td align="right">列宽&nbsp;&nbsp;</td>
  421. <td align="left">
  422. <input dojotype="dijit.form.NumberSpinner"
  423. id="width" name="width"
  424. value="<%=width %>"
  425. required="false"
  426. constraints="{min: 0, max:100, places:0}"
  427. size=10
  428. invalidMessage="配置编号必须录入数字!(ex: 23)">
  429. %</td>
  430. </tr>
  431. <tr>
  432. <td align="right">链接&nbsp;&nbsp;</td>
  433. <td align="left">
  434. <input type="text" value="<%=url %>"
  435. id="url" name="url" class="medium"
  436. dojoType="dijit.form.ValidationTextBox"
  437. required="false"
  438. ucfirst="true"
  439. invalidMessage="">
  440. </td>
  441. </tr>
  442. <tr>
  443. <td align="right">target&nbsp;&nbsp;</td>
  444. <td align="left">
  445. <input type="text" value="<%=target %>"
  446. id="target" name="target" class="medium"
  447. dojoType="dijit.form.ValidationTextBox"
  448. required="false"
  449. ucfirst="true"
  450. invalidMessage="">
  451. </td>
  452. </tr>
  453. <tr>
  454. <td align="right">是否弹出</td>
  455. <td align="left" >
  456. <input type="radio" name="popup" value="1" onclick="showPopUp('1')" <%if(popup.equals("1"))out.print("checked"); %>>是
  457. <input type="radio" name="popup" value="0" onclick="showPopUp('0')" <%if(popup.equals("0"))out.print("checked"); %>>否
  458. </td>
  459. </tr>
  460. <tr>
  461. <td align="left" colspan="2" width="100%">
  462. <div width="100%" id="showpopup" style="display:none">
  463. <table align="center" id="SortTable512_1" frame="box" rules="none" style="border: 1; solid:#FF0000" width="90%" cellpadding="1" cellspacing="1" class="ltab2">
  464. <tr>
  465. <td width="15%" align="right">页面宽&nbsp;&nbsp;</td>
  466. <td width="85%" align="left">
  467. <input type="text" value="<%=formWidth %>"
  468. id="formWidth" name="formWidth" class="medium"
  469. dojoType="dijit.form.ValidationTextBox"
  470. required="false"
  471. ucfirst="true"
  472. invalidMessage="">
  473. %</td>
  474. </tr>
  475. <tr>
  476. <td align="right">页面高&nbsp;&nbsp;</td>
  477. <td align="left">
  478. <input type="text" value="<%=formHeight %>"
  479. id="formHeight" name="formHeight" class="medium"
  480. dojoType="dijit.form.ValidationTextBox"
  481. required="false"
  482. ucfirst="true"
  483. invalidMessage="">
  484. %</td>
  485. </tr>
  486. </table>
  487. </div>
  488. </td>
  489. </tr>
  490. </table>
  491. </div>
  492. </div>
  493. </div>
  494. </div>
  495. <div class="btmbox">
  496. <button id="save" dojoType="dijit.form.Button" onClick='check();' type="button" iconClass="plusIcon">
  497. 保存
  498. </button>
  499. <span dojoType="dijit.Tooltip" connectId="save">保存按钮</span>&nbsp;&nbsp;
  500. <button id="reset" dojoType="dijit.form.Button" onClick='document.form1.reset();' type="button" iconClass="plusIcon">
  501. 重置
  502. </button>
  503. <span dojoType="dijit.Tooltip" connectId="save">重置按钮</span>&nbsp;&nbsp;
  504. <button id="close" dojoType="dijit.form.Button" onClick='window.close();' type="button" iconClass="plusIcon">
  505. 关闭
  506. </button>
  507. <span dojoType="dijit.Tooltip" connectId="save">关闭按钮</span>&nbsp;&nbsp;
  508. </div>
  509. </div>
  510. </div>
  511. </form>
  512. <script language="JavaScript">
  513. var imgSrc ="/nwyj/admin/images/tool/数字序号.gif";
  514. var imgWidth=<%=imgWidth%>;
  515. var imgHeight=<%=imgHeight%>;
  516. function showlist(obj){
  517. if(imgBox.style.pixelLeft!=-800){imgBox.style.pixelLeft=-800; return;}
  518. var mytop=obj.offsetTop;
  519. var myleft=obj.offsetLeft;
  520. while(obj=obj.offsetParent){
  521. myleft+=obj.offsetLeft;
  522. mytop+=obj.offsetTop;
  523. }
  524. imgBox.style.left=myleft;
  525. imgBox.style.top=mytop+imgHeight+2;
  526. }
  527. var isin=false;
  528. function selectme(obj){
  529. if(!isin||obj){imgBox.style.pixelLeft=-800;}
  530. if(obj){
  531. myform.image.value=imgSrc.replace("数字序号",obj.listID);
  532. document.images["imgselected"].src=imgSrc.replace("数字序号",obj.listID);
  533. }
  534. }
  535. var mytime=setTimeout("",0);
  536. var pre_X=0;
  537. function scrollud(){
  538. var current_X=imgBox.scrollTop;
  539. if(current_X>pre_X && imgBox.scrollTop< Math.ceil(imgBox.scrollTop/imgHeight)*imgHeight){
  540. clearTimeout(mytime);
  541. mytime=setTimeout("imgBox.scrollTop=Math.round(imgBox.scrollTop+1);",1);
  542. }
  543. else if(current_X<pre_X && imgBox.scrollTop> Math.floor(imgBox.scrollTop/imgHeight)*imgHeight){
  544. clearTimeout(mytime);
  545. mytime=setTimeout("imgBox.scrollTop=Math.round(imgBox.scrollTop-1);",1);
  546. }
  547. pre_X=current_X;
  548. }
  549. function init(){
  550. myform.image.value=imgSrc.replace("数字序号","<%=selectedPic%>");
  551. }
  552. myActivation="selectme(null)";
  553. if(document.body.onclick){
  554. eval(document.body.onclick.toString().replace('anonymous()','bodyclick()'));
  555. document.body.onclick=new Function("bodyclick();"+myActivation);
  556. }
  557. else
  558. document.body.onclick=new Function(myActivation);
  559. //-->
  560. function selectTag(showContent,selfObj){
  561. var tag = document.getElementById("tags").getElementsByTagName("li");
  562. var taglength = tag.length;
  563. for(i=0; i<taglength; i++){
  564. tag[i].className = "";
  565. }
  566. selfObj.parentNode.className = "selectTag";
  567. for(i=0; j=document.getElementById("tagContent"+i); i++){
  568. j.style.display = "none";
  569. }
  570. document.getElementById(showContent).style.display = "block";
  571. }
  572. </script>
  573. </BODY>
  574. </HTML>