Index: umc/app.js =================================================================== --- umc/app.js (Revision 68252) +++ umc/app.js (Arbeitskopie) @@ -287,16 +287,6 @@ } } } - - // if item is link wrap it inside an a element - if (item.is_link) { - var a_element = domConstruct.create('a', { - href: item.url || '/', - target: '_blank' - }); - domConstruct.place(div, a_element); - div = a_element; - } return div; }, @@ -1474,9 +1464,7 @@ label: _('Open module'), isDefaultAction: true, callback: lang.hitch(this, function(id, item) { - if (!item.is_link) { - this.openModule(item); - } + this.openModule(item); //this._tabContainer.transition(id, item); }) }, { Index: umc/widgets/GalleryPane.js =================================================================== --- umc/widgets/GalleryPane.js (Revision 68251) +++ umc/widgets/GalleryPane.js (Arbeitskopie) @@ -181,6 +181,11 @@ menuItem.set('disabled', disabled); menuItem.set('label', label); menuItem.set('iconClass', iconClass); + if (item.is_link && action.name === 'open'){ + domStyle.set(menuItem.domNode, "display", "none"); + } else { + domStyle.set(menuItem.domNode, "display", ""); + } }, this); domClass.add(node, 'umcGalleryItemActive'); @@ -415,14 +420,17 @@ var div = put(wrapperDiv, lang.replace('div.umcGalleryItem', item)); var description = this.getItemDescription(item); var iconClass = this.getIconClass(item); + if (this._contextMenu) { + put(div, 'div.umcGalleryContextIcon'); + } + if (item.is_link) { + div = put(div, lang.replace('a[href="{link}"][target="_blank"]', {link: item.url})); + } if (iconClass) { put(div, 'div.umcGalleryIcon.' + iconClass); } put(div, 'div.umcGalleryName', this.getItemName(item)); put(div, 'div.umcGalleryDescription', description); - if (this._contextMenu) { - put(div, 'div.umcGalleryContextIcon'); - } // create status icon var statusIconClass = this.getStatusIconClass(item);