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