debian-mirror-gitlab/app/assets/javascripts/commons/bootstrap.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

20 lines
477 B
JavaScript
Raw Normal View History

2017-08-17 22:00:37 +05:30
import $ from 'jquery';
// bootstrap jQuery plugins
2021-02-22 17:27:13 +05:30
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';
2017-08-17 22:00:37 +05:30
// custom jQuery functions
$.fn.extend({
2018-12-13 13:39:08 +05:30
disable() {
2021-03-08 18:12:59 +05:30
return $(this).prop('disabled', true).addClass('disabled');
2018-12-13 13:39:08 +05:30
},
enable() {
2021-03-08 18:12:59 +05:30
return $(this).prop('disabled', false).removeClass('disabled');
2018-12-13 13:39:08 +05:30
},
2017-08-17 22:00:37 +05:30
});