mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-06-26 04:41:41 +02:00
fix can not access property type of null, stalling context menu on tree
This commit is contained in:
parent
6272b57088
commit
8abbf0d20e
@ -611,7 +611,7 @@ function egwPopupActionImplementation()
|
|||||||
var clipboard = {
|
var clipboard = {
|
||||||
type:[],
|
type:[],
|
||||||
selected:[]
|
selected:[]
|
||||||
}
|
};
|
||||||
|
|
||||||
// When pasting we need to know the type of drag
|
// When pasting we need to know the type of drag
|
||||||
for(var k in drag)
|
for(var k in drag)
|
||||||
@ -625,7 +625,7 @@ function egwPopupActionImplementation()
|
|||||||
// Hopefully that's enough for the action handlers
|
// Hopefully that's enough for the action handlers
|
||||||
for(var k in selected)
|
for(var k in selected)
|
||||||
{
|
{
|
||||||
if(selected[k].id) clipboard.selected.push({id:selected[k].id, data:selected[k].data})
|
if(selected[k].id) clipboard.selected.push({id:selected[k].id, data:selected[k].data});
|
||||||
}
|
}
|
||||||
|
|
||||||
// Save it in session
|
// Save it in session
|
||||||
@ -655,7 +655,10 @@ function egwPopupActionImplementation()
|
|||||||
drop[action.id].actionObj.execute(clipboard.selected,selected[0]);
|
drop[action.id].actionObj.execute(clipboard.selected,selected[0]);
|
||||||
};
|
};
|
||||||
|
|
||||||
var clipboard = JSON.parse(egw.getSessionItem('phpgwapi', 'egw_clipboard'));
|
var clipboard = JSON.parse(egw.getSessionItem('phpgwapi', 'egw_clipboard')) || {
|
||||||
|
type:[],
|
||||||
|
selected:[]
|
||||||
|
};
|
||||||
|
|
||||||
// Don't re-add if action already exists
|
// Don't re-add if action already exists
|
||||||
if(paste_action == null)
|
if(paste_action == null)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user