|
|
|
@ -14,7 +14,7 @@
|
|
|
|
|
activateMobile();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$(window).on('action:ajaxify.end', function(ev, data) {
|
|
|
|
|
$(window).on('action:ajaxify.contentLoaded', function(ev, data) {
|
|
|
|
|
var url = data.url;
|
|
|
|
|
|
|
|
|
|
selectMenuItem(data.url);
|
|
|
|
@ -23,6 +23,8 @@
|
|
|
|
|
setupCheckboxes();
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$(window).on('action:admin.settingsLoaded', setupCheckboxes);
|
|
|
|
|
|
|
|
|
|
$('[component="logout"]').on('click', app.logout);
|
|
|
|
|
|
|
|
|
|
$(window).resize(setupHeaderMenu);
|
|
|
|
@ -175,31 +177,32 @@
|
|
|
|
|
return $('[type=checkbox]').show();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
$('[type=checkbox]').change(function() {
|
|
|
|
|
var checked = $(this).is(':checked');
|
|
|
|
|
|
|
|
|
|
$(this).siblings('[class*=fa-]').toggleClass('fa-toggle-off', !checked)
|
|
|
|
|
.toggleClass('fa-toggle-on', checked);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('[type=checkbox]').each(function() {
|
|
|
|
|
var checkbox = $(this),
|
|
|
|
|
checked = checkbox.is(':checked');
|
|
|
|
|
|
|
|
|
|
if (checkbox.attr('data-toggle-added')) {
|
|
|
|
|
return;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
checkbox.hide();
|
|
|
|
|
|
|
|
|
|
if (checked) {
|
|
|
|
|
checkbox.after('<i class="fa fa-toggle-on"></i>');
|
|
|
|
|
}
|
|
|
|
|
else {
|
|
|
|
|
checkbox.after('<i class="fa fa-toggle-off"></i>');
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$('[type=checkbox]').change(function() {
|
|
|
|
|
var checked = $(this).is(':checked');
|
|
|
|
|
|
|
|
|
|
$(this).siblings('[class*=fa-]').toggleClass('fa-toggle-off', !checked)
|
|
|
|
|
.toggleClass('fa-toggle-on', checked);
|
|
|
|
|
checkbox.attr('data-toggle-added', true);
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
$.propHooks.checked = {
|
|
|
|
|
set: function(elem, value, name) {
|
|
|
|
|
$(elem).trigger("change");
|
|
|
|
|
}
|
|
|
|
|
};
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}());
|