mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 07:53:39 +01:00
Home: Remove drag & drop support of favorites due to conflicts with interact.js for resizing
This commit is contained in:
parent
9eecc9218f
commit
cc1d79dd74
@ -98,38 +98,6 @@ export class HomeApp extends EgwApp
|
|||||||
|
|
||||||
this.portlet_container = this.et2.getWidgetById("portlets");
|
this.portlet_container = this.et2.getWidgetById("portlets");
|
||||||
|
|
||||||
// Accept drops of favorites, which aren't part of action system
|
|
||||||
this.sortable = new Sortable(this.et2.getDOMNode().parentNode, {
|
|
||||||
chosenClass: 'drop-hover',
|
|
||||||
accept: function(draggable)
|
|
||||||
{
|
|
||||||
// Check for direct support for that application
|
|
||||||
if(draggable[0].dataset && draggable[0].dataset.appname)
|
|
||||||
{
|
|
||||||
return egw_getActionManager('home', false, 1).getActionById('drop_' + draggable[0].dataset.appname + '_favorite_portlet') != null;
|
|
||||||
}
|
|
||||||
return false;
|
|
||||||
},
|
|
||||||
onAdd: function(event, ui)
|
|
||||||
{
|
|
||||||
debugger;
|
|
||||||
// Favorite dropped on home - fake an action and divert to normal handler
|
|
||||||
let action = {
|
|
||||||
data: {
|
|
||||||
class: 'add_home_favorite_portlet'
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Check for direct support for that application
|
|
||||||
if(ui.helper.context.dataset && ui.helper.context.dataset.appname)
|
|
||||||
{
|
|
||||||
action = egw_getActionManager('home', false, 1).getActionById('drop_' + ui.helper.context.dataset.appname + '_favorite_portlet') || {}
|
|
||||||
}
|
|
||||||
action.ui = ui;
|
|
||||||
app.home.add_from_drop(action, [{data: ui.helper.context.dataset}])
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
this._do_ordering()
|
this._do_ordering()
|
||||||
}
|
}
|
||||||
else if(et2.uniqueId)
|
else if(et2.uniqueId)
|
||||||
|
Loading…
Reference in New Issue
Block a user