会话过期后顶部菜单点击后显示json的代码优化
This commit is contained in:
@@ -1,4 +1,4 @@
|
|||||||
/* Electron */ if(typeof module==='object'){window.module=module;module=undefined;}
|
if(typeof module==='object'){window.module=module;module=undefined;}/* Electron Support */
|
||||||
/*!
|
/*!
|
||||||
* jQuery JavaScript Library v1.12.4
|
* jQuery JavaScript Library v1.12.4
|
||||||
* http://jquery.com/
|
* http://jquery.com/
|
||||||
|
|||||||
File diff suppressed because one or more lines are too long
@@ -41,12 +41,14 @@
|
|||||||
}else{
|
}else{
|
||||||
js.ajaxSubmit('${ctx}/index/menuTree?parentCode=' + code
|
js.ajaxSubmit('${ctx}/index/menuTree?parentCode=' + code
|
||||||
+ '&t=' + new Date().getTime(), function(data){
|
+ '&t=' + new Date().getTime(), function(data){
|
||||||
|
if (data && data.indexOf('"result":"login"') == -1){
|
||||||
$("#leftMenu > ul").hide();
|
$("#leftMenu > ul").hide();
|
||||||
$("#leftMenu").append(data);
|
$("#leftMenu").append(data);
|
||||||
// 如果是初次加载,则选中上次打开的菜单
|
// 如果是初次加载,则选中上次打开的菜单
|
||||||
if($('.sidebar-menu').length == 1){
|
if($('.sidebar-menu').length == 1){
|
||||||
$(window).trigger("hashchange");
|
$(window).trigger("hashchange");
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}, 'html');
|
}, 'html');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -321,8 +321,9 @@ $("#testDataChildDataGrid").dataGrid({
|
|||||||
|
|
||||||
// 加载成功后执行事件
|
// 加载成功后执行事件
|
||||||
ajaxSuccess: function(data){
|
ajaxSuccess: function(data){
|
||||||
$('#jqgh_testDataChildDataGrid_rn').append('<a href="javascript:$(\'#testDataChildDataGridAddRowBtn'
|
$('#jqgh_testDataChildDataGrid_rn').append('<a href="javascript:" onclick="'
|
||||||
+ '\').click();"><i class="fa fa-plus"></i></a>');
|
+ '$(\'#testDataChildDataGridAddRowBtn\').click();">'
|
||||||
|
+ '<i class="fa fa-plus"></i></a>');
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
Reference in New Issue
Block a user