导入提示国际化

This commit is contained in:
wangxin
2018-10-22 20:19:06 +08:00
parent 12720ad2a8
commit 03b63b1709
4 changed files with 7 additions and 5 deletions

View File

@@ -1274,3 +1274,4 @@ ipv6_range=IPv6 Range
ipv6_subnet=IPv6/Subnet Mask ipv6_subnet=IPv6/Subnet Mask
example=For Example example=For Example
letter_cancel_info=Cancel Letter Info letter_cancel_info=Cancel Letter Info
import_tip_excel=Please choose a valid Excel file with which it's subfix is .xls or .xlsx to import.

View File

@@ -1269,3 +1269,4 @@ ipv6_range=IPv6 Range
ipv6_subnet=IPv6/Subnet mask ipv6_subnet=IPv6/Subnet mask
example=\u4F8B\u5982 example=\u4F8B\u5982
letter_cancel_info=\u53D6\u6D88\u5BA1\u6838\u6765\u51FD letter_cancel_info=\u53D6\u6D88\u5BA1\u6838\u6765\u51FD
import_tip_excel=\u8BF7\u9009\u62E9\u6587\u4EF6\u7ED3\u5C3E\u4E3A.xls\u6216\u8005.xlsx\u7684\u6709\u6548Excel\u6587\u4EF6\u5BFC\u5165

View File

@@ -4,7 +4,7 @@
<div class="modal fade" id="import_modal" tabindex="-1" role="dialog" aria-labelledby="mo" aria-hidden="true"> <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" <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'/>');"> onsubmit="loading('<spring:message code='loading'/>');">
<input type="hidden" id="importTip" value="<spring:message code='import_tip_excel'/>">
<div class="modal-dialog" role="document" style="width:700px;"> <div class="modal-dialog" role="document" style="width:700px;">
<div class="modal-content"> <div class="modal-content">
<div class="modal-header"> <div class="modal-header">

View File

@@ -130,13 +130,13 @@ var importCfg=function(){
} }
if(fileName==""){ if(fileName==""){
$("span",$error).html("请选择xls或者xlsx格式文件进行导入..."); $("span",$error).html($("#importTip").val());
$error.removeClass("hide"); $error.removeClass("hide");
$error.addClass("show"); $error.addClass("show");
return false; return false;
}else if(fileName.lastIndexOf("\.")==-1||fileName.substring(fileName.lastIndexOf("\.")+1).toLowerCase()!='xls' &&fileName.substring(fileName.lastIndexOf("\.")+1).toLowerCase()!='xlsx'){ }else if(fileName.lastIndexOf("\.")==-1||fileName.substring(fileName.lastIndexOf("\.")+1).toLowerCase()!='xls' &&fileName.substring(fileName.lastIndexOf("\.")+1).toLowerCase()!='xlsx'){
$("span",$error).html("导入的文件后缀必须为xls或者xlsx..."); $("span",$error).html($("#importTip").val());
$error.removeClass("hide"); $error.removeClass("hide");
$error.addClass("show"); $error.addClass("show");
return false; return false;