diff --git a/etemplate/js/et2_widget_link.js b/etemplate/js/et2_widget_link.js index 16425f2991..30bef8c843 100644 --- a/etemplate/js/et2_widget_link.js +++ b/etemplate/js/et2_widget_link.js @@ -1748,7 +1748,18 @@ var et2_link_list = et2_link_string.extend( $j(document.createElement("td")) .appendTo(row) .addClass(columns[i]) - .click( function(){self.egw().open(_link_data, "", "view",null,_link_data.target ? _link_data.target : _link_data.app,_link_data.app);}) + .click( function(){ + // Check if the link entry is mime with media type, in order to open it in expose view + if (typeof _link_data.type != 'undefined' && _link_data.type.match(self.mime_regexp,'ig')) + { + var $vfs_img_node = jQuery(this).parent().find('.vfsMimeIcon'); + if ($vfs_img_node.length > 0) $vfs_img_node.click(); + } + else + { + self.egw().open(_link_data, "", "view",null,_link_data.target ? _link_data.target : _link_data.app,_link_data.app); + } + }) .text(_link_data[columns[i]] ? _link_data[columns[i]]+"" : ""); }