debian-mirror-gitlab/app/assets/javascripts/commons/bootstrap.js
2021-04-17 20:07:23 +05:30

19 lines
477 B
JavaScript

import $ from 'jquery';
// bootstrap jQuery plugins
import 'bootstrap/js/dist/alert';
import 'bootstrap/js/dist/button';
import 'bootstrap/js/dist/collapse';
import 'bootstrap/js/dist/modal';
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');
},
});