mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-25 14:19:58 +09:00
sub tree recheck when delete
git-svn-id: http://xe-core.googlecode.com/svn/branches/maserati@12155 201d5d3c-b55e-5fd7-737f-ddc643e51545
This commit is contained in:
parent
7feb415855
commit
4e45e37789
1 changed files with 34 additions and 15 deletions
|
|
@ -3020,6 +3020,38 @@ jQuery(function($){
|
|||
});
|
||||
});
|
||||
|
||||
function doDelete(sMenuSrl, bForce, sSelectOnload){
|
||||
var params = {
|
||||
menu_item_srl : sMenuSrl,
|
||||
is_force : bForce ? 'Y' : 'N'
|
||||
};
|
||||
|
||||
$.exec_json("menu.procMenuAdminDeleteItem", params, function(htData){
|
||||
if(htData.error === -1001){
|
||||
confirmDialog({
|
||||
sTitle : xe.lang.confirm_menu_delete,
|
||||
|
||||
sText : 'Delete sub trees?',
|
||||
|
||||
fnOnOK : function(){
|
||||
doDelete(sMenuSrl, true, sSelectOnload);
|
||||
}
|
||||
});
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if(htData.error !== 0){
|
||||
alert(htData.message);
|
||||
return;
|
||||
}
|
||||
|
||||
// select the parent of the menu being deleted
|
||||
$._xeAdminVar.sSelectOnload = sSelectOnload;
|
||||
loadSiteMap();
|
||||
});
|
||||
}
|
||||
|
||||
$('._deleteMenu').click(function(){
|
||||
confirmDialog({
|
||||
sTitle : xe.lang.confirm_menu_delete,
|
||||
|
|
@ -3032,21 +3064,8 @@ jQuery(function($){
|
|||
var sSelectedMenuSrl = $._xeAdminVar.sSelectedMenuSrl;
|
||||
|
||||
var sParentSrl = htNodeInfo[sSelectedMenuSrl].parent_srl;
|
||||
|
||||
var params = {};
|
||||
params['menu_item_srl'] = sSelectedMenuSrl;
|
||||
|
||||
$.exec_json("menu.procMenuAdminDeleteItem", params, function(htData){
|
||||
//console.log(htData);
|
||||
if(htData.error !== 0){
|
||||
alert(htData.message);
|
||||
return;
|
||||
}
|
||||
|
||||
// select the parent of the menu being deleted
|
||||
$._xeAdminVar.sSelectOnload = sParentSrl;
|
||||
loadSiteMap();
|
||||
});
|
||||
|
||||
doDelete(sSelectedMenuSrl, false, sParentSrl);
|
||||
},
|
||||
|
||||
fnOnShow : function(){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue