Hello,
hideItem/showItem in menu doesn't work properly.
In case there are two identical menus, where item ids aren't unique, hideItem/showItem only works for one menu.
I think, the problem is with this code:
$(_482).show();
$(_482).hide();
it should find the item id within the menu ( e.g. menu.find(_482).hide() )
Currently, it searched the item id on the whole page, instead within the menu.
Code:
var m = $(this).datagrid('getPanel').find('#actions-btn').menubutton('options').menu; // get the menu object
var item = m.menu('findItem', function(item){
if (item.id == 'resend'){
if (data.row.status == "Scheduled")
{
m.menu('hideItem', $('#'+item.id)[0]);
}
else
{
m.menu('showItem', $('#'+item.id)[0]);
}
} else {
if (data.row.status == "Scheduled")
{
m.menu('showItem', $('#'+item.id)[0]);
}
else
{
m.menu('hideItem', $('#'+item.id)[0]);
}
}
});