mirror of
https://github.com/YunoHost-Apps/hotspot_ynh.git
synced 2024-09-03 19:25:53 +02:00
31 lines
815 B
JavaScript
31 lines
815 B
JavaScript
$(document).ready(function() {
|
|
$('.btn-group').button();
|
|
$('[data-toggle="tooltip"]').tooltip();
|
|
|
|
$('.fileinput').click(function() {
|
|
var realinputid = '#' + $(this).attr('id').replace(/_chooser.*/, '');
|
|
$(realinputid).click();
|
|
});
|
|
|
|
$('input[type="file"]').change(function() {
|
|
var choosertxtid = '#' + $(this).attr('id') + '_choosertxt';
|
|
$(choosertxtid).val($(this).val());
|
|
});
|
|
|
|
$('.dropdown-menu li').click(function() {
|
|
var menu = $(this).parent();
|
|
var items = menu.children();
|
|
var button = menu.prev();
|
|
var input = button.prev();
|
|
|
|
items.removeClass('active');
|
|
$(this).addClass('active');
|
|
|
|
button.text($(this).text());
|
|
button.append(' <span class="caret"></span>');
|
|
|
|
input.attr('value', $(this).text());
|
|
});
|
|
|
|
$('.switch').bootstrapToggle();
|
|
});
|