修复选择位置窗口点击确定后无法关闭问题

Signed-off-by: 小胡 <3203164629@qq.com>
This commit is contained in:
小胡
2024-06-20 00:47:35 +00:00
committed by Gitee
Unverified
parent fdfe743d41
commit 6e7699e8ca

View File

@@ -286,26 +286,26 @@ function canclecreate(obj, node) {
$(obj).closest('.layer').remove();
inst.delete_node(node);
}
function submitdata(){
var fid = $('#'+ctrlid).val();
if(!fid){
// showDialog(__lang.please_select_dir);
showmessage(__lang.please_select_dir,"danger",2000,1);
function submitdata() {
var fid = $('#' + ctrlid).val();
if (!fid) {
//showDialog(__lang.please_select_dir);
showmessage(__lang.please_select_dir, "danger", 2000, 1);
return false;
}else{
$.post(MOD_URL+'&op=positionlist&do=geffolderinfo',{'fid':fid},function(data){
try{if(typeof parent.showWindow_callback == 'function') parent.showWindow_callback(fid,data);}catch(e){}
if(parent.$callback){
try{ parent.$callback(fid,data);}catch(e){}
}else{
try{ opened.$callback(fid,data);}catch(e){}
}
hide_window();
},'json')
}
return false;
}else{
$.post(MOD_URL+'&op=positionlist&do=geffolderinfo',{'fid':fid},function(data){
try{if(typeof parent.showWindow_callback == 'function') parent.showWindow_callback(fid,data);}catch(e){}
if(parent.$callback){
try{ parent.$callback(fid,data);}catch(e){}
}else{
try{ opened.$callback(fid,data);}catch(e){}
}
hide_window();
},'json')
}
return false;
}
function hide_window(){
if(opened){
window.close();