edgewall/trac

View on GitHub
trac/htdocs/js/auto_preview.js

Summary

Maintainability
B
5 hrs
Test Coverage

Function autoSubmit has 70 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  $.fn.autoSubmit = function(args, update, busy) {
    if (this.length == 0 || auto_preview_timeout <= 0)
      return this;
    if (this[0].nodeName == 'FORM') {
      var form = this;
Severity: Major
Found in trac/htdocs/js/auto_preview.js - About 2 hrs to fix

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

      $.fn.autoPreview = function(href, args, update) {
        if (auto_preview_timeout <= 0)
          return this;
        var timeout = auto_preview_timeout * 1000;
        return this.each(function() {
    Severity: Minor
    Found in trac/htdocs/js/auto_preview.js - About 1 hr to fix

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

          function request() {
            if (!updating) {
              var new_values = form.serializeArray();
              if (values_changed(new_values)) {
                values = new_values;
      Severity: Minor
      Found in trac/htdocs/js/auto_preview.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status