summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/commons/bootstrap.js
blob: c11b7d5f3400c5c31244828c26bda9a787e69952 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import $ from 'jquery';

// bootstrap jQuery plugins
import 'bootstrap-sass/assets/javascripts/bootstrap/affix';
import 'bootstrap-sass/assets/javascripts/bootstrap/alert';
import 'bootstrap-sass/assets/javascripts/bootstrap/button';
import 'bootstrap-sass/assets/javascripts/bootstrap/dropdown';
import 'bootstrap-sass/assets/javascripts/bootstrap/modal';
import 'bootstrap-sass/assets/javascripts/bootstrap/tab';
import 'bootstrap-sass/assets/javascripts/bootstrap/transition';
import 'bootstrap-sass/assets/javascripts/bootstrap/tooltip';
import 'bootstrap-sass/assets/javascripts/bootstrap/popover';

// custom jQuery functions
$.fn.extend({
  disable() { return $(this).attr('disabled', 'disabled').addClass('disabled'); },
  enable() { return $(this).removeAttr('disabled').removeClass('disabled'); },
});