resourcesImport.jsp 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475
  1. <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
  2. <%@include file="/commons/include/html_doctype.html" %>
  3. <html>
  4. <head>
  5. <title>系统分类导入</title>
  6. <%@include file="/commons/include/form.jsp" %>
  7. <%-- <link href="${ctx}/styles/ligerUI/ligerui-all.css" rel="stylesheet" type="text/css" /> --%>
  8. <f:link href="Aqua/css/ligerui-all.css"></f:link>
  9. <script type="text/javascript">
  10. var dialog=frameElement.dialog;
  11. var obj=dialog.get("obj");
  12. $(function(){
  13. var option={success:showResponse};
  14. $("#importForm").ajaxForm(option);
  15. if(obj!=null){
  16. $("#systemId").val(obj.systemId);
  17. $("#resId").val(obj.resId);
  18. }
  19. $("#btnSave").click(function(){
  20. var path = $('#xmlFile').val();
  21. var extName = path.substring(path.length-3, path.length);
  22. if(extName!='xml'){
  23. $.ligerDialog.warn("请选择 *.xml文件进行导入!");
  24. }else{
  25. $("#importForm").submit();
  26. }
  27. });
  28. });
  29. function showResponse(responseText){
  30. var obj=new com.hotent.form.ResultMessage(responseText);
  31. if(obj.isSuccess()){//成功
  32. $.ligerDialog.success(obj.getMessage(),'提示信息',function(){
  33. dialog.close();
  34. });
  35. }else{//失败
  36. $.ligerDialog.err('出错信息',"系统资源导入失败",obj.getMessage());
  37. }
  38. }
  39. </script>
  40. </head>
  41. <body>
  42. <div class="panel">
  43. <div class="panel-top">
  44. <div class="tbar-title">
  45. <span class="tbar-label">系统资源导入</span>
  46. </div>
  47. <div class="panel-toolbar">
  48. <div class="toolBar">
  49. <div class="group"><a class="link save" id="btnSave"><span></span>导入</a></div>
  50. <div class="l-bar-separator"></div>
  51. <div class="group"><a class="link del" onclick="javasrcipt:dialog.close()"><span></span>关闭</a></div>
  52. </div>
  53. </div>
  54. </div>
  55. <div class="panel-body">
  56. <form id="importForm" name="importForm" method="post" target="win" action="importXml.ht" enctype="multipart/form-data">
  57. <div class="row">
  58. <table id="tableid" class="table-detail" cellpadding="0" cellspacing="0" border="0">
  59. <tr>
  60. <th width="22%">选择文件:</th>
  61. <td width="78%"><input type="file" size="40" name="xmlFile" id="xmlFile"/></td>
  62. </tr>
  63. </table>
  64. </div>
  65. <input type="hidden" name="systemId" id="systemId" value=""/>
  66. <input type="hidden" name="resId" id="resId" value=""/>
  67. </form>
  68. </div><!-- end of panel-body -->
  69. </div>
  70. </body>
  71. </html>