summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorzhangwenqing <[email protected]>2019-04-16 18:23:46 +0800
committerzhangwenqing <[email protected]>2019-04-16 18:23:46 +0800
commit7c36ec0abc876cd7e18fb6f208b11fcdcc252bb5 (patch)
treef29656e999a202c9cad6a28307c062a60fc31d64
parent80b590b6732fff2edce61e8d700153abf9ed192a (diff)
修正导入操作框错误提示信息及不显示bug.
-rw-r--r--src/main/resources/messages/message_en.properties3
-rw-r--r--src/main/resources/messages/message_ru.properties3
-rw-r--r--src/main/resources/messages/message_zh_CN.properties3
-rw-r--r--src/main/webapp/WEB-INF/include/excel/importModal.jsp5
-rw-r--r--src/main/webapp/static/pages/scripts/importExcel.js11
5 files changed, 18 insertions, 7 deletions
diff --git a/src/main/resources/messages/message_en.properties b/src/main/resources/messages/message_en.properties
index e14efc923..95790c319 100644
--- a/src/main/resources/messages/message_en.properties
+++ b/src/main/resources/messages/message_en.properties
@@ -1508,4 +1508,5 @@ admin_user_warn=Admin User Warn
interface_total=Interface Total
service_total=Service Total
unapproved_all=UnApprove all configurations!
-delete_all=Delete all configurations! \ No newline at end of file
+delete_all=Delete all configurations!
+none_file_tip=Please Choose File! \ No newline at end of file
diff --git a/src/main/resources/messages/message_ru.properties b/src/main/resources/messages/message_ru.properties
index 0da2cf990..04cfc4a9e 100644
--- a/src/main/resources/messages/message_ru.properties
+++ b/src/main/resources/messages/message_ru.properties
@@ -1511,4 +1511,5 @@ protection_list_manage=Protection List Manage
effective=Effective
admin_user_warn=Admin User Warn
interface_total=Interface Total
-service_total=Service Total \ No newline at end of file
+service_total=Service Total
+none_file_tip=Please Choose File! \ No newline at end of file
diff --git a/src/main/resources/messages/message_zh_CN.properties b/src/main/resources/messages/message_zh_CN.properties
index 9c4775f86..8f5e3fb59 100644
--- a/src/main/resources/messages/message_zh_CN.properties
+++ b/src/main/resources/messages/message_zh_CN.properties
@@ -1506,4 +1506,5 @@ admin_user_warn=\u7ba1\u7406\u5458\u7528\u6237\u9884\u8b66
interface_total=\u754c\u9762\u603b\u91cf
service_total=\u670d\u52a1\u603b\u91cf
unapproved_all=\u5ba1\u6838\u4E0D\u901a\u8fc7\u6240\u6709\u914d\u7f6e!
-delete_all=\u5220\u9664\u6240\u6709\u914d\u7f6e! \ No newline at end of file
+delete_all=\u5220\u9664\u6240\u6709\u914d\u7f6e!
+none_file_tip=\u8BF7\u9009\u62E9\u6587\u4EF6! \ No newline at end of file
diff --git a/src/main/webapp/WEB-INF/include/excel/importModal.jsp b/src/main/webapp/WEB-INF/include/excel/importModal.jsp
index a7f64e253..889dd2d42 100644
--- a/src/main/webapp/WEB-INF/include/excel/importModal.jsp
+++ b/src/main/webapp/WEB-INF/include/excel/importModal.jsp
@@ -4,7 +4,8 @@
<div class="modal fade" id="import_modal" tabindex="-1" role="dialog" aria-labelledby="mo" aria-hidden="true">
<form id="importForm1" action="${ctx}/ntc/iplist/import?importPath=${importPath}" method="post" enctype="multipart/form-data" class="form-horizontal"
onsubmit="loading('<spring:message code='loading'/>');">
- <input type="hidden" id="importTip" value="<spring:message code='import_tip_excel'/>">
+ <input type="hidden" id="noneFileTip" value="<spring:message code='none_file_tip'/>">
+ <input type="hidden" id="fileVersionErrorTip" value="<spring:message code='import_tip_excel'/>">
<div class="modal-dialog" role="document" style="width:700px;">
<div class="modal-content">
<div class="modal-header">
@@ -18,7 +19,7 @@
</div>
<div class="modal-body">
<div class="alert alert-error hide">
- <button class="close" data-dismiss="alert"></button>
+ <button type="button" class="close" onclick="javascript:closeTip()"></button>
<span></span>
</div>
diff --git a/src/main/webapp/static/pages/scripts/importExcel.js b/src/main/webapp/static/pages/scripts/importExcel.js
index 435018316..d2ee15e0b 100644
--- a/src/main/webapp/static/pages/scripts/importExcel.js
+++ b/src/main/webapp/static/pages/scripts/importExcel.js
@@ -161,17 +161,24 @@ var importCfg=function(){
}
if(fileName==""){
- $("span",$error).html($("#importTip").val());
+ $("span",$error).html($("#noneFileTip").val());
$error.removeClass("hide");
$error.addClass("show");
return false;
}else if(fileName.lastIndexOf("\.")==-1/*||fileName.substring(fileName.lastIndexOf("\.")+1).toLowerCase()!='xls'*/ ||fileName.substring(fileName.lastIndexOf("\.")+1).toLowerCase()!='xlsx'){
- $("span",$error).html($("#importTip").val());
+ $("span",$error).html($("#fileVersionErrorTip").val());
$error.removeClass("hide");
$error.addClass("show");
return false;
}
$("#import_modal").modal('hide');//导入文件隐藏
$("#importForm1").submit();
+}
+
+// 代替data-dismiss=""属性(关闭错误信息)
+var closeTip = function(){
+ var $error = $('.alert-error', $("#importForm1"));
+ $error.removeClass("show");
+ $error.addClass("hide");
} \ No newline at end of file