Add enable/disable feature

This commit is contained in:
Julien VAUBOURG
2015-03-18 21:34:26 +01:00
parent 447042893a
commit c1a4265a2c
9 changed files with 185 additions and 89 deletions

View File

@@ -20,6 +20,8 @@ $(document).ready(function() {
$('.btn-group').button();
$('[data-toggle="tooltip"]').tooltip();
$('.switch').bootstrapToggle();
$('.fileinput').click(function() {
if(!$(this).hasClass('btn-danger')) {
var realinputid = '#' + $(this).attr('id').replace(/_chooser.*/, '');
@@ -87,4 +89,12 @@ $(document).ready(function() {
$('#raw_openvpn_btnpanel').hide();
$('#raw_openvpn_panel').show('low');
});
$('#service_enabled').change(function() {
if($('#service_enabled').parent().hasClass('off')) {
$('.enabled').hide('slow');
} else {
$('.enabled').show('slow');
}
});
});