alertifyjs/alertify.js

View on GitHub

Showing 5 of 8 total issues

Function Alertify has 364 lines of code (exceeds 25 allowed). Consider refactoring.
Open

    function Alertify() {

        /**
         * Alertify private object
         * @type {Object}
Severity: Major
Found in src/js/alertify.js - About 1 day to fix

File alertify.js has 399 lines of code (exceeds 250 allowed). Consider refactoring.
Open

(function() {

    "use strict";

    var TRANSITION_FALLBACK_DURATION = 500;
Severity: Minor
Found in src/js/alertify.js - About 5 hrs to fix

Function setup has 86 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            setup: function(item) {

                var el = document.createElement("div");
                el.className = "alertify hide";
                el.innerHTML = this.build(item);
Severity: Major
Found in src/js/alertify.js - About 3 hrs to fix

Function setupHandlers has 46 lines of code (exceeds 25 allowed). Consider refactoring.
Open

                function setupHandlers(resolve) {
                    if ("function" !== typeof resolve) {
                        // promises are not available so resolve is a no-op
                        resolve = function () {};
                    }
Severity: Minor
Found in src/js/alertify.js - About 1 hr to fix

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

            theme: function(themeStr) {
                switch(themeStr.toLowerCase()) {
                case "bootstrap":
                    this.dialogs.buttons.ok = "<button class='ok btn btn-primary' tabindex='1'>{{ok}}</button>";
                    this.dialogs.buttons.cancel = "<button class='cancel btn btn-default' tabindex='2'>{{cancel}}</button>";
Severity: Minor
Found in src/js/alertify.js - About 1 hr to fix
Severity
Category
Status
Source
Language