js/link target: Replace detail container from url when the a tag's data-icinga-target attribute is set to 'detail'

refs #4823
This commit is contained in:
Eric Lippmann 2013-10-10 11:29:35 +02:00
parent 73ed141a5e
commit c67ef17e86
1 changed files with 10 additions and 5 deletions

View File

@ -488,10 +488,15 @@ define(['jquery', 'logging', 'icinga/componentLoader', 'URIjs/URI', 'URIjs/URITe
if (Container.isExternalLink($(targetEl).attr('href'))) {
return true;
} else {
// detail links render to main by default;
if ($(targetEl).attr('data-icinga-target') === 'detail') {
Icinga.replaceBodyFromUrl(
detailContainer.updateContainerHref(URI($(targetEl).attr('href')).href())
);
} else {
Icinga.replaceBodyFromUrl(
mainContainer.updateContainerHref(URI($(targetEl).attr('href')).href())
);
}
ev.preventDefault();
ev.stopPropagation();