mirror of
https://github.com/Icinga/icingaweb2.git
synced 2025-07-29 00:34:03 +02:00
Cleanup and conform to coding guidelines
This commit is contained in:
parent
96e3845f46
commit
a7a93803ee
@ -4,7 +4,6 @@
|
|||||||
* Icinga.History
|
* Icinga.History
|
||||||
*
|
*
|
||||||
* This is where we care about the browser History API
|
* This is where we care about the browser History API
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
(function (Icinga, $) {
|
(function (Icinga, $) {
|
||||||
|
|
||||||
@ -89,7 +88,6 @@
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// TODO: update navigation
|
|
||||||
// Did we find any URL? Then push it!
|
// Did we find any URL? Then push it!
|
||||||
if (url !== '') {
|
if (url !== '') {
|
||||||
this.push(url);
|
this.push(url);
|
||||||
|
@ -480,8 +480,7 @@
|
|||||||
* @param value {String} The value to set, can be '1', '0' and 'unchanged'
|
* @param value {String} The value to set, can be '1', '0' and 'unchanged'
|
||||||
* @param $checkbox {jQuery} The checkbox
|
* @param $checkbox {jQuery} The checkbox
|
||||||
*/
|
*/
|
||||||
setTriState: function(value, $checkbox)
|
setTriState: function(value, $checkbox) {
|
||||||
{
|
|
||||||
switch (value) {
|
switch (value) {
|
||||||
case ('1'):
|
case ('1'):
|
||||||
$checkbox.prop('checked', true).prop('indeterminate', false);
|
$checkbox.prop('checked', true).prop('indeterminate', false);
|
||||||
|
@ -76,20 +76,19 @@
|
|||||||
* @param {selector} element The element to check
|
* @param {selector} element The element to check
|
||||||
* @returns {Boolean}
|
* @returns {Boolean}
|
||||||
*/
|
*/
|
||||||
isVisible: function(element)
|
isVisible: function(element) {
|
||||||
{
|
var $element = $(element);
|
||||||
var $element = $(element);
|
if (!$element.length) {
|
||||||
if (!$element.length) {
|
return false;
|
||||||
return false;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
var docViewTop = $(window).scrollTop();
|
var docViewTop = $(window).scrollTop();
|
||||||
var docViewBottom = docViewTop + $(window).height();
|
var docViewBottom = docViewTop + $(window).height();
|
||||||
var elemTop = $element.offset().top;
|
var elemTop = $element.offset().top;
|
||||||
var elemBottom = elemTop + $element.height();
|
var elemBottom = elemTop + $element.height();
|
||||||
|
|
||||||
return ((elemBottom >= docViewTop) && (elemTop <= docViewBottom) &&
|
return ((elemBottom >= docViewTop) && (elemTop <= docViewBottom) &&
|
||||||
(elemBottom <= docViewBottom) && (elemTop >= docViewTop));
|
(elemBottom <= docViewBottom) && (elemTop >= docViewTop));
|
||||||
},
|
},
|
||||||
|
|
||||||
getUrlHelper: function () {
|
getUrlHelper: function () {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user