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:
parent
73ed141a5e
commit
c67ef17e86
|
@ -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;
|
||||
Icinga.replaceBodyFromUrl(
|
||||
mainContainer.updateContainerHref(URI($(targetEl).attr('href')).href())
|
||||
);
|
||||
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();
|
||||
|
@ -512,4 +517,4 @@ define(['jquery', 'logging', 'icinga/componentLoader', 'URIjs/URI', 'URIjs/URITe
|
|||
};
|
||||
|
||||
return Container;
|
||||
});
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue