mirror of
https://github.com/EGroupware/egroupware.git
synced 2025-01-03 20:49:08 +01:00
If selected egwActionObject(s) contain data, use that over global data store.
This commit is contained in:
parent
2461660920
commit
9f9f5184fc
@ -157,10 +157,10 @@ function egwDragActionImplementation()
|
|||||||
// Set file data
|
// Set file data
|
||||||
for(var i = 0; i < selected.length; i++)
|
for(var i = 0; i < selected.length; i++)
|
||||||
{
|
{
|
||||||
var data = egw.dataGetUIDdata(selected[i].id);
|
var data = selected[i].data || egw.dataGetUIDdata(selected[i].id).data || {};
|
||||||
if(data && data.data.mime && data.data.download_url)
|
if(data && data.mime && data.download_url)
|
||||||
{
|
{
|
||||||
var url = data.data.download_url;
|
var url = data.download_url;
|
||||||
|
|
||||||
// NEED an absolute URL
|
// NEED an absolute URL
|
||||||
if (url[0] == '/') url = egw.link(url);
|
if (url[0] == '/') url = egw.link(url);
|
||||||
@ -170,7 +170,7 @@ function egwDragActionImplementation()
|
|||||||
// Unfortunately, dragging files is currently only supported by Chrome
|
// Unfortunately, dragging files is currently only supported by Chrome
|
||||||
if(navigator && navigator.userAgent.indexOf('Chrome'))
|
if(navigator && navigator.userAgent.indexOf('Chrome'))
|
||||||
{
|
{
|
||||||
event.dataTransfer.setData("DownloadURL", data.data.mime+':'+data.data.name+':'+url);
|
event.dataTransfer.setData("DownloadURL", data.mime+':'+data.name+':'+url);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user