tuomas2/serviceform

View on GitHub
serviceform/serviceform/static/jquery.are-you-sure.js

Summary

Maintainability
C
1 day
Test Coverage

Function areYouSure has 144 lines of code (exceeds 25 allowed). Consider refactoring.
Open

  $.fn.areYouSure = function(options) {
      
    var settings = $.extend(
      {
        'message' : 'You have unsaved changes!',
Severity: Major
Found in serviceform/serviceform/static/jquery.are-you-sure.js - About 5 hrs to fix

    Function getValue has 32 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        var getValue = function($field) {
          if ($field.hasClass('ays-ignore')
              || $field.hasClass('aysIgnore')
              || $field.attr('data-ays-ignore')
              || $field.attr('name') === undefined) {
    Severity: Minor
    Found in serviceform/serviceform/static/jquery.are-you-sure.js - About 1 hr to fix

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

          var checkForm = function(evt) {
      
            var isFieldDirty = function($field) {
              var origValue = $field.data('ays-orig');
              if (undefined === origValue) {
      Severity: Minor
      Found in serviceform/serviceform/static/jquery.are-you-sure.js - About 1 hr to fix

        There are no issues that match your filters.

        Category
        Status