修正导入操作框错误提示信息及不显示bug.
This commit is contained in:
@@ -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!
|
||||
delete_all=Delete all configurations!
|
||||
none_file_tip=Please Choose File!
|
||||
@@ -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
|
||||
service_total=Service Total
|
||||
none_file_tip=Please Choose File!
|
||||
@@ -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!
|
||||
delete_all=\u5220\u9664\u6240\u6709\u914d\u7f6e!
|
||||
none_file_tip=\u8BF7\u9009\u62E9\u6587\u4EF6!
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
Reference in New Issue
Block a user