aimer1124/JianshuSpider

View on GitHub

Showing 62 of 155 total issues

Function initSearch has 54 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    BootstrapTable.prototype.initSearch = function () {
        var that = this;

        if (this.options.sidePagination !== 'server') {
            if (this.options.customSearch !== $.noop) {
Severity: Major
Found in public/js/bootstrap-table.js - About 2 hrs to fix

    Function show has 54 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

      Tooltip.prototype.show = function () {
        var e = $.Event('show.bs.' + this.type)
    
        if (this.hasContent() && this.enabled) {
          this.$element.trigger(e)
    Severity: Major
    Found in public/js/bootstrap.js - About 2 hrs to fix

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

          render: function (updateLi) {
            var that = this,
                notDisabled;
      
            //Update the LI to match the SELECT
      Severity: Major
      Found in public/js/bootstrap-select.js - About 2 hrs to fix

        Function getCollections has 50 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        function getCollections() {
            var now = moment().format('x');
            var collectionsList = [];
            for (var i = 0; i <= 50; i++){
                collectionsList.push({
        Severity: Minor
        Found in util/syncData.js - About 2 hrs to fix

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

                  var getSize = function () {
                    var minHeight,
                        hasClass = function (className, include) {
                          return function (element) {
                              if (include) {
          Severity: Minor
          Found in public/js/bootstrap-select.js - About 1 hr to fix

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

                createDropdown: function () {
                  // Options
                  // If we are multiple or showTick option is set, then add the show-tick class
                  var showTick = (this.multiple || this.options.showTick) ? ' show-tick' : '',
                      inputGroup = this.$element.parent().hasClass('input-group') ? ' input-group-btn' : '',
            Severity: Minor
            Found in public/js/bootstrap-select.js - About 1 hr to fix

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

                Carousel.prototype.slide = function (type, next) {
                  var $active   = this.$element.find('.item.active')
                  var $next     = next || this.getItemForDirection(type, $active)
                  var isCycling = this.interval
                  var direction = type == 'next' ? 'left' : 'right'
              Severity: Minor
              Found in public/js/bootstrap.js - About 1 hr to fix

                Function resetFooter has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    BootstrapTable.prototype.resetFooter = function () {
                        var that = this,
                            data = that.getData(),
                            html = [];
                
                
                Severity: Minor
                Found in public/js/bootstrap-table.js - About 1 hr to fix

                  Function selectPosition has 41 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                      selectPosition: function () {
                        this.$bsContainer = $('<div class="bs-container" />');
                  
                        var that = this,
                            $container = $(this.options.container),
                  Severity: Minor
                  Found in public/js/bootstrap-select.js - About 1 hr to fix

                    Function activate has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      Tab.prototype.activate = function (element, container, callback) {
                        var $active    = container.find('> .active')
                        var transition = callback
                          && $.support.transition
                          && (($active.length && $active.hasClass('fade')) || !!container.find('> .fade').length)
                    Severity: Minor
                    Found in public/js/bootstrap.js - About 1 hr to fix

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

                          BootstrapTable.prototype.initContainer = function () {
                              this.$container = $([
                                  '<div class="bootstrap-table">',
                                  '<div class="fixed-table-toolbar"></div>',
                                  this.options.paginationVAlign === 'top' || this.options.paginationVAlign === 'both' ?
                      Severity: Minor
                      Found in public/js/bootstrap-table.js - About 1 hr to fix

                        Function show has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          Collapse.prototype.show = function () {
                            if (this.transitioning || this.$element.hasClass('in')) return
                        
                            var activesData
                            var actives = this.$parent && this.$parent.find('> .panel').children('.in, .collapsing')
                        Severity: Minor
                        Found in public/js/bootstrap.js - About 1 hr to fix

                          Function fetchCollectionUrl has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              var fetchCollectionUrl = function (collectionUrl, callback) {
                                  var delay = parseInt((Math.random() * 10000000) % 2000, 10);
                                  conCurrencyCount++;
                          
                                  getURL.getPageContent(collectionUrl.url, function (err, res) {
                          Severity: Minor
                          Found in util/syncData.js - About 1 hr to fix

                            Function resetView has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                BootstrapTable.prototype.resetView = function (params) {
                                    var padding = 0;
                            
                                    if (params && params.height) {
                                        this.options.height = params.height;
                            Severity: Minor
                            Found in public/js/bootstrap-table.js - About 1 hr to fix

                              Function Plugin has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                function Plugin(option, event) {
                                  // get the args of the outer function..
                                  var args = arguments;
                                  // The arguments of the function are explicitly re-defined from the argument list, because the shift causes them
                                  // to get lost/corrupted in android 2.3 and IE9 #715 #775
                              Severity: Minor
                              Found in public/js/bootstrap-select.js - About 1 hr to fix

                                Function objectKeys has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    var objectKeys = function () {
                                        // From https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/keys
                                        if (!Object.keys) {
                                            Object.keys = (function() {
                                                var hasOwnProperty = Object.prototype.hasOwnProperty,
                                Severity: Minor
                                Found in public/js/bootstrap-table.js - About 1 hr to fix

                                  Function show has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                    Modal.prototype.show = function (_relatedTarget) {
                                      var that = this
                                      var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
                                  
                                      this.$element.trigger(e)
                                  Severity: Minor
                                  Found in public/js/bootstrap.js - About 1 hr to fix

                                    Function backdrop has 34 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                      Modal.prototype.backdrop = function (callback) {
                                        var that = this
                                        var animate = this.$element.hasClass('fade') ? 'fade' : ''
                                    
                                        if (this.isShown && this.options.backdrop) {
                                    Severity: Minor
                                    Found in public/js/bootstrap.js - About 1 hr to fix

                                      Function data has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                                  this.data = s ? $.grep(this.data, function (item, i) {
                                                      for (var j = 0; j < that.header.fields.length; j++) {
                                      
                                                          if (!that.header.searchables[j]) {
                                                              continue;
                                      Severity: Minor
                                      Found in public/js/bootstrap-table.js - About 1 hr to fix

                                        Function expandAllRows has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            BootstrapTable.prototype.expandAllRows = function (isSubTable) {
                                                if (isSubTable) {
                                                    var $tr = this.$body.find(sprintf('> tr[data-index="%s"]', 0)),
                                                        that = this,
                                                        detailIcon = null,
                                        Severity: Minor
                                        Found in public/js/bootstrap-table.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language