newscoop/JS-Scoopwriter

View on GitHub

Showing 98 of 221 total issues

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

        function (relatedArticle, index) {
            var self = this,
                defered = $q.defer(),
                linkHeader = [];

Severity: Minor
Found in app/scripts/services/Article.js - About 1 hr to fix

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

            Article.prototype.saveSwitches = function (switchNames) {
                var deferred = $q.defer(),
                    postData = {
                        article: {fields: {}}
                    },
    Severity: Minor
    Found in app/scripts/services/Article.js - About 1 hr to fix

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

        Modal.prototype.backdrop = function (callback) {
          var that    = this
          var animate = this.$element.hasClass('fade') ? 'fade' : ''
      
          if (this.isShown && this.options.backdrop) {
      Severity: Minor
      Found in app/scripts/bootstrap.min.js - About 1 hr to fix

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

                self.confirmUnassignSlideshow = function (slideshow) {
                    var modal,
                        title,
                        text;
        
        
        Severity: Minor
        Found in app/scripts/controllers/pane-slideshows.js - About 1 hr to fix

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

                  function setContainerEventHandlers($container, scope) {
                      $container.on('dragover', function (e) {
                          e.originalEvent.preventDefault();  // allow drop
                          e.originalEvent.dataTransfer.dropEffect = 'move';
                      });
          Severity: Minor
          Found in app/scripts/directives/drag-sort.js - About 1 hr to fix

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

                    function snippetCommentsToDivs(text) {
                        // the extra backslash (\) is because of Javascript being picky
                        var snippetRex  = '<--';     // exact match
                        snippetRex     += '\\s';      // single whitespace
                        snippetRex     += 'Snippet';  // exact match
            Severity: Minor
            Found in app/scripts/services/Article.js - About 1 hr to fix

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

                          link: function postLink(scope, element, attrs) {
                              var isDisabled = (
                                  Aloha.queryCommandSupported('formatBlock') &&
                                  Aloha.queryCommandEnabled('formatBlock')
                              );
              Severity: Minor
              Found in app/scripts/directives/sf-aloha-format-style.js - About 1 hr to fix

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

                        NcImage.addAllToArticle = function (articleId, articleLang, images) {
                            var deferred = $q.defer(),
                                linkHeader = [];
                
                            images.forEach(function (item) {
                Severity: Minor
                Found in app/scripts/services/NcImage.js - About 1 hr to fix

                  Function confirmUnassignTopic has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          $scope.confirmUnassignTopic = function (topic) {
                              var modal,
                                  title,
                                  text;
                  
                  
                  Severity: Minor
                  Found in app/scripts/controllers/pane-topics.js - About 1 hr to fix

                    Function confirmRemoveSnippet has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            $scope.confirmRemoveSnippet = function (snippet) {
                                var modal,
                                    title,
                                    text;
                    
                    
                    Severity: Minor
                    Found in app/scripts/controllers/pane-snippets.js - About 1 hr to fix

                      Function getAllByArticle has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              Snippet.getAllByArticle = function (number, language) {
                                  var deferredGet = $q.defer(),
                                      reqParams,
                                      snippets = [];
                      
                      
                      Severity: Minor
                      Found in app/scripts/services/Snippet.js - About 1 hr to fix

                        Function show has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          Modal.prototype.show = function (_relatedTarget) {
                            var that = this
                            var e    = $.Event('show.bs.modal', { relatedTarget: _relatedTarget })
                        
                            this.$element.trigger(e)
                        Severity: Minor
                        Found in app/scripts/bootstrap.min.js - About 1 hr to fix

                          Function createFromApiData has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  self.createFromApiData = function (data) {
                                      var template = new SnippetTemplate();
                          
                                      ['id', 'name', 'enabled', 'favourite'].forEach(function (attr) {
                                          template[attr] = data[attr];
                          Severity: Minor
                          Found in app/scripts/services/SnippetTemplate.js - About 1 hr to fix

                            Function getAllByArticle has 29 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    NcImage.getAllByArticle = function (articleId, language) {
                                        var deferredGet = $q.defer(),
                                            requestOptions,
                                            images = [];
                            
                            
                            Severity: Minor
                            Found in app/scripts/services/NcImage.js - About 1 hr to fix

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

                                      self.load = function (page) {
                                          var deferred = $q.defer(),
                                              sortingPart,
                                              url;
                              
                              
                              Severity: Minor
                              Found in app/scripts/services/comments.js - About 1 hr to fix

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

                                        Topic.prototype.removeFromArticle = function(number, language) {
                                            var topic = this,
                                                deferred = $q.defer(),
                                                linkHeader;
                                
                                
                                Severity: Minor
                                Found in app/scripts/services/Topic.js - About 1 hr to fix

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

                                          Slideshow.prototype.removeFromArticle = function(number, language) {
                                              var slideshow = this,
                                                  deferred = $q.defer(),
                                                  linkHeader;
                                  
                                  
                                  Severity: Minor
                                  Found in app/scripts/services/Slideshow.js - About 1 hr to fix

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

                                            Article.prototype.removeRelatedArticle = function(relatedArticle) {
                                                var deferred = $q.defer(),
                                                    self = this,
                                                    linkHeader;
                                    
                                    
                                    Severity: Minor
                                    Found in app/scripts/services/Article.js - About 1 hr to fix

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

                                              Article.prototype.addRelatedArticle = function (relatedArticle) {
                                                  var deferred = $q.defer(),
                                                      self = this,
                                                      linkHeader = [];
                                      
                                      
                                      Severity: Minor
                                      Found in app/scripts/services/Article.js - About 1 hr to fix

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

                                                    link: function postLink(scope, $element, attrs) {
                                                        var baseOffsetY = 125,  // base offset (without from height)
                                                            initialOffsetY,    // initial offset at pane load
                                                            firstAdjustment = true,
                                                            $formBox,
                                        Severity: Minor
                                        Found in app/scripts/directives/auto-list-offset.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language