debian-mirror-gitlab/app/assets/javascripts/commons/bootstrap.js
2023-06-20 00:43:36 +05:30

15 lines
337 B
JavaScript

import $ from 'jquery';
// bootstrap jQuery plugins
import 'bootstrap/js/dist/dropdown';
import 'bootstrap/js/dist/tab';
// custom jQuery functions
$.fn.extend({
disable() {
return $(this).prop('disabled', true).addClass('disabled');
},
enable() {
return $(this).prop('disabled', false).removeClass('disabled');
},
});