Merge pull request #1813 from CachetHQ/dashboard-component-status-bug

Fixes toggling of component status box
This commit is contained in:
Graham Campbell
2016-05-24 15:12:47 +01:00

View File

@@ -120,12 +120,12 @@ $(function() {
var $option = $(this).find('option:selected');
var $componentStatus = $('#component-status');
if ($option.val() !== '') {
if (parseInt($option.val(), 10) !== 0) {
if ($componentStatus.hasClass('hidden')) {
$componentStatus.removeClass('hidden');
} else {
$componentStatus.addClass('hidden');
}
} else {
$componentStatus.addClass('hidden');
}
});