forked from extern/egroupware
Fix link list broken by r49319.
This commit is contained in:
parent
2a4d7c382b
commit
4ed5c57364
@ -1576,41 +1576,43 @@ var et2_link_list = et2_link_string.extend(
|
|||||||
{
|
{
|
||||||
list = _value;
|
list = _value;
|
||||||
}
|
}
|
||||||
|
if(list.length > 0)
|
||||||
for(var id in list)
|
|
||||||
{
|
{
|
||||||
var link = list[id];
|
for(var id in list)
|
||||||
if(link.app)
|
|
||||||
{
|
{
|
||||||
// Temp IDs can cause problems since the ID includes the file name or :
|
var link = list[id];
|
||||||
if(link.link_id && typeof link.link_id != 'number')
|
if(link.app)
|
||||||
{
|
{
|
||||||
link.dom_id = 'temp_'+egw.uid();
|
// Temp IDs can cause problems since the ID includes the file name or :
|
||||||
}
|
if(link.link_id && typeof link.link_id != 'number')
|
||||||
// Icon should be in registry
|
|
||||||
if(typeof link.icon == 'undefined')
|
|
||||||
{
|
|
||||||
link.icon = egw.link_get_registry(link.app,'icon');
|
|
||||||
// No icon, try by mime type - different place for un-saved entries
|
|
||||||
if(link.icon == false && link.id.type)
|
|
||||||
{
|
{
|
||||||
// Triggers icon by mime type, not thumbnail or app
|
link.dom_id = 'temp_'+egw.uid();
|
||||||
link.type = link.id.type;
|
|
||||||
link.icon = true;
|
|
||||||
}
|
}
|
||||||
|
// Icon should be in registry
|
||||||
|
if(typeof link.icon == 'undefined')
|
||||||
|
{
|
||||||
|
link.icon = egw.link_get_registry(link.app,'icon');
|
||||||
|
// No icon, try by mime type - different place for un-saved entries
|
||||||
|
if(link.icon == false && link.id.type)
|
||||||
|
{
|
||||||
|
// Triggers icon by mime type, not thumbnail or app
|
||||||
|
link.type = link.id.type;
|
||||||
|
link.icon = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// Special handling for file - if not existing, we can't ask for title
|
||||||
|
if(link.app == 'file' && typeof link.title == 'undefined')
|
||||||
|
{
|
||||||
|
link.title = link.id.name || '';
|
||||||
|
}
|
||||||
|
this._add_link(link);
|
||||||
}
|
}
|
||||||
// Special handling for file - if not existing, we can't ask for title
|
|
||||||
if(link.app == 'file' && typeof link.title == 'undefined')
|
|
||||||
{
|
|
||||||
link.title = link.id.name || '';
|
|
||||||
}
|
|
||||||
this._add_link(link);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
else
|
||||||
else
|
{
|
||||||
{
|
this._super.apply(this,arguments);
|
||||||
this._super.apply(this,arguments);
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user