mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-04-08 17:15:08 +02:00
parent
3e195501ac
commit
aa110ef9fe
public/js/icinga/components
@ -412,6 +412,7 @@ define(['jquery', 'logging', 'icinga/componentLoader', 'URIjs/URI', 'URIjs/URITe
|
||||
* (those starting with '#').
|
||||
*/
|
||||
$('body').on('click', '#icingamain, #icingadetail', function(ev) {
|
||||
|
||||
var targetEl = ev.target || ev.toElement || ev.relatedTarget;
|
||||
if (targetEl.tagName.toLowerCase() !== 'a') {
|
||||
return true;
|
||||
@ -420,10 +421,9 @@ define(['jquery', 'logging', 'icinga/componentLoader', 'URIjs/URI', 'URIjs/URITe
|
||||
if (Container.isExternalLink($(targetEl).attr('href'))) {
|
||||
return true;
|
||||
} else {
|
||||
var container = new Container($(targetEl));
|
||||
// detail links render to main by default;
|
||||
Icinga.replaceBodyFromUrl(
|
||||
container.updateContainerHref(URI($(targetEl).attr('href')).href())
|
||||
mainContainer.updateContainerHref(URI($(targetEl).attr('href')).href())
|
||||
);
|
||||
|
||||
ev.preventDefault();
|
||||
|
@ -147,10 +147,9 @@ function(Container, $, logger, URI) {
|
||||
* current container
|
||||
*/
|
||||
this.registerControls = function() {
|
||||
|
||||
controlForms.on('submit', function(evt) {
|
||||
var form = $(this);
|
||||
var container = (new Container(this));
|
||||
var form = $(this);
|
||||
var url = URI(container.getContainerHref());
|
||||
url.search(URI.parseQuery(form.serialize()));
|
||||
container.replaceDomFromUrl(url.href());
|
||||
@ -160,8 +159,14 @@ function(Container, $, logger, URI) {
|
||||
return false;
|
||||
|
||||
});
|
||||
$('.pagination li a', contentNode).on('click', function() {
|
||||
Container.hideDetail();
|
||||
$('.pagination li a', contentNode.parent()).on('click', function(ev) {
|
||||
var container = (new Container(this));
|
||||
Icinga.replaceBodyFromUrl(
|
||||
container.updateContainerHref($(this).attr('href'))
|
||||
);
|
||||
ev.preventDefault();
|
||||
ev.stopPropagation();
|
||||
return false;
|
||||
});
|
||||
};
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user