导入提示国际化

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

@@ -4,7 +4,7 @@
<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'/>">
<div class="modal-dialog" role="document" style="width:700px;">
<div class="modal-content">
<div class="modal-header">

View File

@@ -130,13 +130,13 @@ var importCfg=function(){
}
if(fileName==""){
$("span",$error).html("请选择xls或者xlsx格式文件进行导入...");
$("span",$error).html($("#importTip").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("导入的文件后缀必须为xls或者xlsx...");
$("span",$error).html($("#importTip").val());
$error.removeClass("hide");
$error.addClass("show");
return false;