JS/CSS: Get IE8 working

Just a bunch of JS and CSS improvements / fixes

refs #6417
This commit is contained in:
Thomas Gelf 2014-06-05 15:03:59 +00:00
parent 176588c87d
commit 6d321d67cd
6 changed files with 14 additions and 12 deletions

View File

@ -53,7 +53,7 @@ $isIframe = isset($_GET['_render']) && $_GET['_render'] === 'iframe';
<script type="text/javascript" src="<?= $this->href($jsfile) ?>"></script>
<script type="text/javascript">
var icinga = new Icinga({
baseUrl: '<?= $this->href('/') ?>',
baseUrl: '<?= $this->href('/') ?>'
});
</script>
</body>

View File

@ -76,7 +76,7 @@
}
}
},
};
Icinga.availableModules.monitoring = Monitoring;

View File

@ -213,6 +213,7 @@
border: none;
width: 100%;
border-radius: 0;
line-height: 2.5em;
height: 2.5em;
display: block;
outline: none;

View File

@ -51,8 +51,8 @@
}
});
var moduleName;
if (moduleName = el.data('icingaModule')) {
var moduleName = el.data('icingaModule');
if (moduleName) {
if (icinga.hasModule(moduleName)) {
var module = icinga.module(moduleName);
// NOT YET, the applyOnloadDings: module.applyEventHandlers(mod);
@ -99,7 +99,7 @@
$( window ).on('beforeunload', { self: this }, this.onUnload);
// We catch scroll events in our containers
$('.container').on('scroll', this.icinga.events.onContainerScroll);
$('.container').on('scroll', { self: this }, this.icinga.events.onContainerScroll);
// We want to catch each link click
$(document).on('click', 'a', { self: this }, this.linkClicked);
@ -259,6 +259,7 @@
},
clickTriState: function (event) {
var self = event.data.self;
var $tristate = $(this);
var triState = parseInt($tristate.data('icinga-tristate'), 10);
@ -348,7 +349,7 @@
// combined with target="_blank" or target="_self"
// window.open is used as return true; didn't work reliable
if (linkTarget === '_blank' || linkTarget === '_self') {
window.open(href, linkTarget);
window.open($node.attr('href'), linkTarget);
return true;
}
return false;
@ -543,7 +544,7 @@
} else if (targetId === '_main') {
targetId = 'col1';
$target = $('#' + targetId);
icinga.ui.layout1col();
self.icinga.ui.layout1col();
} else {
$target = $('#' + targetId);
}
@ -552,7 +553,7 @@
// Hardcoded layout switch unless columns are dynamic
if ($target.attr('id') === 'col2') {
icinga.ui.layout2col();
this.icinga.ui.layout2col();
}
return $target;

View File

@ -215,7 +215,7 @@
layout1col: function () {
if (! $('#layout').hasClass('twocols')) { return; }
var $col2 = $('#col2');
icinga.logger.debug('Switching to single col');
this.icinga.logger.debug('Switching to single col');
$('#layout').removeClass('twocols');
$col2.removeData('icingaUrl');
$col2.removeData('icingaRefresh');
@ -228,7 +228,7 @@
layout2col: function () {
if ($('#layout').hasClass('twocols')) { return; }
icinga.logger.debug('Switching to double col');
this.icinga.logger.debug('Switching to double col');
$('#layout').addClass('twocols');
this.fixControls();
},

View File

@ -73,8 +73,8 @@
var elemTop = $element.offset().top;
var elemBottom = elemTop + $element.height();
return ((elemBottom >= docViewTop) && (elemTop <= docViewBottom)
&& (elemBottom <= docViewBottom) && (elemTop >= docViewTop));
return ((elemBottom >= docViewTop) && (elemTop <= docViewBottom) &&
(elemBottom <= docViewBottom) && (elemTop >= docViewTop));
},
getUrlHelper: function () {