devworkstecnology/webadmin

View on GitHub

Showing 202 of 202 total issues

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

  Collapse.prototype.show = function () {
    if (this.transitioning || this.$element.hasClass('in')) return

    var startEvent = $.Event('show.bs.collapse')
    this.$element.trigger(startEvent)
Severity: Minor
Found in vendor/assets/javascripts/bootstrap.js - About 1 hr to fix

    Function show has 31 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 vendor/assets/javascripts/bootstrap.js - About 1 hr to fix

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                             if(k === 'second' && that.options.secondStep > 1 && that.options.roundTime) {
                                v = getNearest(that['$'+k], v);
                             }                       
      Severity: Major
      Found in vendor/assets/javascripts/combodate/combodate.js and 1 other location - About 1 hr to fix
      vendor/assets/javascripts/combodate/combodate.js on lines 363..365

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 59.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                              if (options.defaultTime) {
                                  time = _xdsoft_datetime.strtotime(options.defaultTime);
                                  ct.setHours(time.getHours());
                                  ct.setMinutes(time.getMinutes());
                              }
      Severity: Major
      Found in vendor/assets/javascripts/jquery.datetimepicker.js and 1 other location - About 1 hr to fix
      vendor/assets/javascripts/jquery.datetimepicker.js on lines 1211..1215

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 59.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                             if(k === 'minute' && that.options.minuteStep > 1 && that.options.roundTime) {
                                v = getNearest(that['$'+k], v);
                             }
      Severity: Major
      Found in vendor/assets/javascripts/combodate/combodate.js and 1 other location - About 1 hr to fix
      vendor/assets/javascripts/combodate/combodate.js on lines 367..369

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 59.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

      Similar blocks of code found in 2 locations. Consider refactoring.
      Open

                          if (!norecursion && options.defaultTime) {
                              time = _this.strtotime(options.defaultTime);
                              d.setHours(time.getHours());
                              d.setMinutes(time.getMinutes());
                          }
      Severity: Major
      Found in vendor/assets/javascripts/jquery.datetimepicker.js and 1 other location - About 1 hr to fix
      vendor/assets/javascripts/jquery.datetimepicker.js on lines 1913..1917

      Duplicated Code

      Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

      Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

      When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

      Tuning

      This issue has a mass of 59.

      We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

      The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

      If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

      See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

      Refactorings

      Further Reading

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

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

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

                                line_time = function line_time(h, m) {
                                    var now = _xdsoft_datetime.now(), optionDateTime, current_time;
                                    now.setHours(h);
                                    h = parseInt(now.getHours(), 10);
                                    now.setMinutes(m);
        Severity: Minor
        Found in vendor/assets/javascripts/jquery.datetimepicker.js - About 1 hr to fix

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

              var Spinner = function (element, options) {
                  this.$element = $(element);
                  this.options = $.extend({}, $.fn.spinner.defaults, options);
                  this.$input = this.$element.find('.spinner-input');
                  this.$element.on('keyup', this.$input, $.proxy(this.change, this));
          Severity: Minor
          Found in vendor/assets/javascripts/fuelux/fuelux.js - About 1 hr to fix

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

                this.init = function() {
                  var percent, scaleBy;
                  _this.options = $.extend({}, $.easyPieChart.defaultOptions, options);
                  percent = parseInt(_this.$el.data('percent'), 10);
                  _this.percentage = 0;

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

                Affix.prototype.checkPosition = function () {
                  if (!this.$element.is(':visible')) return
              
                  var scrollHeight = $(document).height()
                  var scrollTop    = this.$window.scrollTop()
              Severity: Minor
              Found in vendor/assets/javascripts/bootstrap.js - About 1 hr to fix

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

                        selectItem: function (el) {
                            var $el = $(el);
                            var $all = this.$element.find('.tree-selected');
                            var data = [];
                
                Severity: Minor
                Found in vendor/assets/javascripts/fuelux/fuelux.js - About 1 hr to fix

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

                          setState: function () {
                              var canMovePrev = (this.currentStep > 1);
                              var firstStep = (this.currentStep === 1);
                              var lastStep = (this.currentStep === this.numSteps);
                  
                  Severity: Minor
                  Found in vendor/assets/javascripts/fuelux/fuelux.js - About 1 hr to fix

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                                        if (options.onSelectDate &&    $.isFunction(options.onSelectDate)) {
                                            options.onSelectDate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
                                        }
                    Severity: Major
                    Found in vendor/assets/javascripts/jquery.datetimepicker.js and 1 other location - About 1 hr to fix
                    vendor/assets/javascripts/jquery.datetimepicker.js on lines 1749..1751

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 57.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Similar blocks of code found in 2 locations. Consider refactoring.
                    Open

                                        if (options.onSelectTime && $.isFunction(options.onSelectTime)) {
                                            options.onSelectTime.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'), xdevent);
                                        }
                    Severity: Major
                    Found in vendor/assets/javascripts/jquery.datetimepicker.js and 1 other location - About 1 hr to fix
                    vendor/assets/javascripts/jquery.datetimepicker.js on lines 1713..1715

                    Duplicated Code

                    Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                    Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                    When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                    Tuning

                    This issue has a mass of 57.

                    We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                    The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                    If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                    See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                    Refactorings

                    Further Reading

                    Function renderData has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            renderData: function () {
                                var self = this;
                    
                                this.$tbody.html(this.placeholderRowHTML(this.options.loadingHTML));
                    
                    Severity: Minor
                    Found in vendor/assets/javascripts/fuelux/fuelux.js - About 1 hr to fix

                      Function activate has 27 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.hasClass('fade')
                      Severity: Minor
                      Found in vendor/assets/javascripts/bootstrap.js - About 1 hr to fix

                        Similar blocks of code found in 4 locations. Consider refactoring.
                        Open

                                            if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
                                                options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
                                            }
                        Severity: Major
                        Found in vendor/assets/javascripts/jquery.datetimepicker.js and 3 other locations - About 1 hr to fix
                        vendor/assets/javascripts/jquery.datetimepicker.js on lines 1262..1264
                        vendor/assets/javascripts/jquery.datetimepicker.js on lines 1292..1294
                        vendor/assets/javascripts/jquery.datetimepicker.js on lines 1806..1808

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 56.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 4 locations. Consider refactoring.
                        Open

                                            if (options.onGenerate && $.isFunction(options.onGenerate)) {
                                                options.onGenerate.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
                                            }
                        Severity: Major
                        Found in vendor/assets/javascripts/jquery.datetimepicker.js and 3 other locations - About 1 hr to fix
                        vendor/assets/javascripts/jquery.datetimepicker.js on lines 866..868
                        vendor/assets/javascripts/jquery.datetimepicker.js on lines 1262..1264
                        vendor/assets/javascripts/jquery.datetimepicker.js on lines 1292..1294

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 56.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Similar blocks of code found in 4 locations. Consider refactoring.
                        Open

                                            if (options.onChangeMonth && $.isFunction(options.onChangeMonth)) {
                                                options.onChangeMonth.call(datetimepicker, _xdsoft_datetime.currentTime, datetimepicker.data('input'));
                                            }
                        Severity: Major
                        Found in vendor/assets/javascripts/jquery.datetimepicker.js and 3 other locations - About 1 hr to fix
                        vendor/assets/javascripts/jquery.datetimepicker.js on lines 866..868
                        vendor/assets/javascripts/jquery.datetimepicker.js on lines 1262..1264
                        vendor/assets/javascripts/jquery.datetimepicker.js on lines 1806..1808

                        Duplicated Code

                        Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

                        Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

                        When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

                        Tuning

                        This issue has a mass of 56.

                        We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

                        The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

                        If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

                        See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

                        Refactorings

                        Further Reading

                        Severity
                        Category
                        Status
                        Source
                        Language