inderpartap/Bunk-O-Meter

View on GitHub
static/assets/js/bootstrap-select.js

Summary

Maintainability
C
1 day
Test Coverage

File bootstrap-select.js has 334 lines of code (exceeds 250 allowed). Consider refactoring.
Open

!function($) {
    var Selectpicker = function(element, options, e) {
        if (e ) {
            e.stopPropagation();
            e.preventDefault();
Severity: Minor
Found in static/assets/js/bootstrap-select.js - About 4 hrs to fix

    Function init has 81 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            init: function (e) {
                var _this = this;
                this.$element.hide();
                this.multiple = this.$element.prop('multiple');
    
    
    Severity: Major
    Found in static/assets/js/bootstrap-select.js - About 3 hrs to fix

      Function createLi has 49 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              createLi: function() {
      
                  var _this = this;
                  var _li = [];
                  var _liA = [];
      Severity: Minor
      Found in static/assets/js/bootstrap-select.js - About 1 hr to fix

        Function clickListener has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                clickListener: function() {
                    var _this = this;
                    
                    $('body').on('touchstart.dropdown', '.dropdown-menu', function (e) { e.stopPropagation(); });
                    
        Severity: Minor
        Found in static/assets/js/bootstrap-select.js - About 1 hr to fix

          Function render has 29 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                   render:function() {
                      var _this = this;
          
                      //Set width of select
                       if (this.options.width == 'auto') {
          Severity: Minor
          Found in static/assets/js/bootstrap-select.js - About 1 hr to fix

            Function selectpicker has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                $.fn.selectpicker = function(option, event) {
                   //get the args of the outer function..
                   var args = arguments;
                   var value;
                   var chain = this.each(function () {
            Severity: Minor
            Found in static/assets/js/bootstrap-select.js - About 1 hr to fix

              There are no issues that match your filters.

              Category
              Status