likeastore/ngDialog

View on GitHub

Showing 9 of 13 total issues

Function $get has 612 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            function ($document, $templateCache, $compile, $q, $http, $rootScope, $timeout, $window, $controller, $injector) {
                var $elements = [];

                var privateMethods = {
                    onDocumentKeydown: function (event) {
Severity: Major
Found in js/ngDialog.js - About 3 days to fix

    File ngDialog.js has 724 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*
     * ngDialog - easy modals and popup windows
     * http://github.com/likeastore/ngDialog
     * (c) 2013-2015 MIT License, https://likeastore.com
     */
    Severity: Major
    Found in js/ngDialog.js - About 1 day to fix

      Function open has 214 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

                          open: function (opts) {
                              var dialogID = null;
                              opts = opts || {};
                              if (openOnePerName && opts.name) {
                                  dialogID = opts.name.toLowerCase().replace(/\s/g, '-') + '-dialog';
      Severity: Major
      Found in js/ngDialog.js - About 1 day to fix

        Function performCloseDialog has 57 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                            performCloseDialog: function ($dialog, value) {
                                var options = $dialog.data('$ngDialogOptions');
                                var id = $dialog.attr('id');
                                var scope = scopes[id];
                                privateMethods.deactivate($dialog);
        Severity: Major
        Found in js/ngDialog.js - About 2 hrs to fix

          Function exports has 45 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          module.exports = function (grunt) {
          
              grunt.initConfig({
                  pkg: grunt.file.readJSON('package.json'),
                  uglify: {
          Severity: Minor
          Found in Gruntfile.js - About 1 hr to fix

            Function exports has 33 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            module.exports = function(config) {
                config.set({
                    basePath: '',
                    frameworks: ['jasmine'],
                    files: [
            Severity: Minor
            Found in karma.conf.js - About 1 hr to fix

              Function $get has 10 arguments (exceeds 4 allowed). Consider refactoring.
              Open

                          function ($document, $templateCache, $compile, $q, $http, $rootScope, $timeout, $window, $controller, $injector) {
              Severity: Major
              Found in js/ngDialog.js - About 1 hr to fix

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

                                    handleTab: function($dialog, ev, backward) {
                                        var focusableElements = privateMethods.getFocusableElements($dialog);
                
                                        if (focusableElements.length === 0) {
                                            if (document.activeElement && document.activeElement.blur) {
                Severity: Minor
                Found in js/ngDialog.js - About 1 hr to fix

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

                                      openConfirm: function (opts) {
                                          var defer = $q.defer();
                                          var options = angular.copy(defaults);
                  
                                          opts = opts || {};
                  Severity: Minor
                  Found in js/ngDialog.js - About 1 hr to fix
                    Severity
                    Category
                    Status
                    Source
                    Language