gagoar/SrBuj

View on GitHub

Showing 6 of 8 total issues

File SrBuj.js has 252 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function ($, undefined) {
    /**
     * Better Unobtrusive  javascript request for Jquery
     * https://github.com/gagoar/SrBuj
     *
Severity: Minor
Found in lib/assets/javascripts/SrBuj.js - About 2 hrs to fix

    Function success has 42 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            success: function (e, data, status, xhr, user_options) {
              if ( xhr ){
                var notify = {};
                for ( var attr in $.SrBuj.notifyHeaders )
                  if ( $.SrBuj.notifyHeaders.hasOwnProperty(attr) ) {
    Severity: Minor
    Found in lib/assets/javascripts/SrBuj.js - About 1 hr to fix

      Function link has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                link: function (user_options){
                  /* This function will create a link with options, trigger it and remove the link afterwards
                   * user_options must be a hash (Obj) with key: value without the data word
                   * if the hash contain more keys, these will be integrated too as data-key form. Example:
                   * { target: 'modal', error: 'modal', modal: true, href: '/admin/request'}
      Severity: Minor
      Found in lib/assets/javascripts/SrBuj.js - About 1 hr to fix

        Function getOptions has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                getOptions: function (el, user_options) {
                    user_options = user_options || {};
                    var options = {},
                        $el = $(user_options.el || el).present(),
                        el_options = {
        Severity: Minor
        Found in lib/assets/javascripts/SrBuj.js - About 1 hr to fix

          Function success has 5 arguments (exceeds 4 allowed). Consider refactoring.
          Open

                  success: function (e, data, status, xhr, user_options) {
          Severity: Minor
          Found in lib/assets/javascripts/SrBuj.js - About 35 mins to fix

            Function fail has 5 arguments (exceeds 4 allowed). Consider refactoring.
            Open

                    fail: function (e, data, status, error_code, user_options) {
            Severity: Minor
            Found in lib/assets/javascripts/SrBuj.js - About 35 mins to fix
              Severity
              Category
              Status
              Source
              Language