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