$(function () {
//usuwanie administatora
    $('#deleteAdmin').change(function () {
        if (this.checked) {
            $('#AdminDeleteInput').removeAttr('disabled');
        } else {
            $('#AdminDeleteInput').attr('disabled', 'disabled');
        }
    });
});

$(function () {
    "use strict";
    if($('.tooltipster-top').length>0){
        $('.tooltipster-top').tooltipster({
            position: "top"
        });
    }
});

$(function () {
    "use strict";
    if($('#AdminTable').length>0) {
        $('#AdminTable').dataTable({
            info: false,
            dom: '<f<t><"bottom"ilp>><"clear">',
            language: {
                url: language,
            }
        });
        $('.searchAdmin').on('keyup', function () {
            var table = $(this).attr('data-table');
            $('#' + table).DataTable().search(this.value).draw();
        });
    }
});