1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
- <%@include file="/commons/include/html_doctype.html" %>
- <html>
- <head>
- <title>导入条件脚本</title>
- <%@include file="/commons/include/form.jsp" %>
- <script type="text/javascript">
- window.name="win";
-
-
- /*KILLDIALOG*/
- var dialog = frameElement.dialog; //调用页面的dialog对象(ligerui对象)
- $(function(){
- valid(showResponse);
-
- $("#btnSave").click(function(){
- var path = $('#xmlFile').val();
- var extNaem = path.substring(path.length-3, path.length);
- if(extNaem!='xml'){
- $.ligerDialog.warn("请选择 *.xml文件进行导入!");
- }else{
- $.ligerDialog.waitting('正在导入中,请稍候...');
- $("#importForm").submit();
- }
- });
- });
-
- function showResponse(responseText){
- var obj=new com.hotent.form.ResultMessage(responseText);
- if(obj.isSuccess()){//成功
- $.ligerDialog.closeWaitting();
- var message = obj.getMessage();
- if(message){
- message =message.replaceAll("###","\'").replaceAll("!!!","<font ").replaceAll("%%%","</font>").replaceAll(">",">").replaceAll("<","<");
- }
- $.ligerDialog.tipDialog('提示信息',"导入结果如下:",message,null,function(){
- //window.returnValue="/";
- dialog.get('sucCall')("/");
- dialog.close();
- });
- }else{//失败
- $.ligerDialog.closeWaitting();
- $.ligerDialog.err("提示信息","条件脚本导入失败!",obj.getMessage());
- }
- }
-
- function valid(showResponse){
- var options={success:showResponse};
- __valid=$("#importForm").validate({
- rules: {},
- messages: {},
- submitHandler:function(form){
- $(form).ajaxSubmit(options);
- },
- success: function(label) {}
- });
- }
-
- </script>
- </head>
- <body>
- <div class="panel-top">
- <div class="tbar-title">
- <span class="tbar-label">条件脚本导入</span>
- </div>
- <div class="panel-toolbar">
- <div class="toolBar">
- <div class="group"><a class="link save" id="btnSave"><span></span>导入</a></div>
- <div class="l-bar-separator"></div>
- <div class="group"><a class="link del" onclick="javasrcipt:frameElement.dialog.close()"><span></span>关闭</a></div>
- </div>
- </div>
- </div>
- <div class="panel-body">
- <form id="importForm" name="importForm" method="post" target="win" action="importXml.ht" enctype="multipart/form-data">
- <div class="row">
-
- <table id="tableid" class="table-detail" cellpadding="0" cellspacing="0" border="0">
- <tr>
- <th width="22%">选择文件:</th>
- <td width="78%"><input type="file" size="40" name="xmlFile" id="xmlFile"/></td>
- </tr>
- </table>
-
- </div>
- </form>
- </div><!-- end of panel-body -->
- </body>
- </html>
|