fix labels on checkboxes to be clickable

This commit is contained in:
Oliver Gorwits
2017-12-24 13:03:46 +00:00
parent 2c2dc62cda
commit 2c77660f2f
2 changed files with 8 additions and 4 deletions

View File

@@ -131,8 +131,12 @@
}); });
$("input[name='mapshow']").change(function() { $("input[name='mapshow']").change(function() {
var newval = $("input[name='mapshow']:checked").val(); var newval = $("input[name='mapshow']:checked").val();
$('#nd_netmap-save').prop('disabled', if (newval == 'neighbors') {
((newval == 'neighbors') ? true : false)); $('#nd_netmap-save').prop('disabled', true).removeClass('btn-info');
}
else {
$('#nd_netmap-save').prop('disabled', false).addClass('btn-info');
}
}); });
$('#nd_netmap-zoomtodevice').on('click', function(event) { $('#nd_netmap-zoomtodevice').on('click', function(event) {
event.preventDefault(); event.preventDefault();

View File

@@ -14,7 +14,7 @@
<input type="checkbox" name="showips" id="nd_showips" <input type="checkbox" name="showips" id="nd_showips"
data-toggle="toggle" data-size="small" data-width="30" data-toggle="toggle" data-size="small" data-width="30"
data-on="Show" data-off=" " data-onstyle="success"> data-on="Show" data-off=" " data-onstyle="success">
&nbsp;Management IPs <span onclick="$('#nd_showips').bootstrapToggle('toggle')">&nbsp;Management IPs</span>
</label> </label>
</div> </div>
<div class="checkbox pull-left"> <div class="checkbox pull-left">
@@ -22,7 +22,7 @@
<input type="checkbox" name="showspeed" id="nd_showspeed" <input type="checkbox" name="showspeed" id="nd_showspeed"
data-toggle="toggle" data-size="small" data-width="30" data-toggle="toggle" data-size="small" data-width="30"
data-on="Show" data-off=" " data-onstyle="success"> data-on="Show" data-off=" " data-onstyle="success">
&nbsp;Link Speed <span onclick="$('#nd_showspeed').bootstrapToggle('toggle')">&nbsp;Link Speed</span>
</label> </label>
</div> </div>
</div> </div>