mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-23 15:18:58 +01:00
fix to work correctly with actions containing only a string/caption, using action.execute() to get automatic confirmation from action system and defaulting to default actions (not all actions) if last action is dragged off
This commit is contained in:
parent
06ffa47c25
commit
ee50a6b9bb
@ -106,7 +106,7 @@ var et2_toolbar = et2_DOMWidget.extend(
|
|||||||
if (pref && !jQuery.isArray(pref)) this.preference = pref;
|
if (pref && !jQuery.isArray(pref)) this.preference = pref;
|
||||||
|
|
||||||
//Set the default actions for the first time
|
//Set the default actions for the first time
|
||||||
if (typeof pref === 'undefined')
|
if (typeof pref === 'undefined' || jQuery.isEmptyObject(pref))
|
||||||
{
|
{
|
||||||
for (var name in actions)
|
for (var name in actions)
|
||||||
{
|
{
|
||||||
@ -158,6 +158,7 @@ var et2_toolbar = et2_DOMWidget.extend(
|
|||||||
for(var name in actions)
|
for(var name in actions)
|
||||||
{
|
{
|
||||||
var action = actions[name];
|
var action = actions[name];
|
||||||
|
if (typeof action == 'string') action = {id: name, caption: action};
|
||||||
|
|
||||||
// Add in divider
|
// Add in divider
|
||||||
if(last_group_id != action.group)
|
if(last_group_id != action.group)
|
||||||
@ -399,7 +400,7 @@ var et2_toolbar = et2_DOMWidget.extend(
|
|||||||
if(action)
|
if(action)
|
||||||
{
|
{
|
||||||
action.data.event = e;
|
action.data.event = e;
|
||||||
action.onExecute.exec(action);
|
action.execute([]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user