studpad/studpad

View on GitHub

Showing 118 of 280 total issues

File selectize_fixed.js has 2386 lines of code (exceeds 250 allowed). Consider refactoring.
Open

/**
 * sifter.js
 * Copyright (c) 2013 Brian Reavis & contributors
 *
 * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
Severity: Major
Found in app/assets/javascripts/selectize_fixed.js - About 6 days to fix

    File bootstrap.js has 1587 lines of code (exceeds 250 allowed). Consider refactoring.
    Open

    /*!
     * Bootstrap v3.3.6 (http://getbootstrap.com)
     * Copyright 2011-2015 Twitter, Inc.
     * Licensed under the MIT license
     */
    Severity: Major
    Found in app/assets/javascripts/bootstrap.js - About 4 days to fix

      Function main has 230 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      function main(){
          $('#hat-search').autocomplete({
            serviceUrl: '/tags',
            paramName: 'term',
            deferRequestBy: 200,
      Severity: Major
      Found in app/assets/javascripts/my_scripts.js - About 1 day to fix

        Function query has 211 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

          jQuery.query = new function() {
            var is = function(o, t) {
              return o != undefined && o !== null && (!!t ? o.constructor == t : true);
            };
            var parse = function(path) {
        Severity: Major
        Found in app/assets/javascripts/jquery.query-object.js - About 1 day to fix

          Function render has 177 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

            render: function() {
              var main_part;
              files = this.props.post.files.map(function (f, index) {
                return (
                  <ModalContentFile
          Severity: Major
          Found in app/assets/javascripts/components/post_modal_content.js.jsx - About 7 hrs to fix

            Function render has 142 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

              render(){
                post = this.props.post;
                var image, link_rendered;
                switch (this.props.post.type) {
                  case PostTypes.link:
            Severity: Major
            Found in app/assets/javascripts/components/explore_post.js.jsx - About 5 hrs to fix

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

                  setup: function() {
                    var self      = this;
                    var settings  = self.settings;
                    var eventNS   = self.eventNS;
                    var $window   = $(window);
              Severity: Major
              Found in app/assets/javascripts/selectize_fixed.js - About 5 hrs to fix

                File post_modal_form.js.jsx has 377 lines of code (exceeds 250 allowed). Consider refactoring.
                Open

                const PostModalForm = React.createClass({
                  //BEGIN***************************************************DECLARE
                  propTypes: {
                    createPost: React.PropTypes.func.isRequired,
                    updatePost: React.PropTypes.func.isRequired
                Severity: Minor
                Found in app/assets/javascripts/components/post_modal_form.js.jsx - About 5 hrs to fix

                  Function render has 117 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                    render: function() {
                      var main_part;
                      switch (this.props.post.type) {
                        case PostTypes.text:
                          main_part = (
                  Severity: Major
                  Found in app/assets/javascripts/components/post_content_view.js.jsx - About 4 hrs to fix

                    Function selectize has 115 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                      $.fn.selectize = function(settings_user) {
                        var defaults             = $.fn.selectize.defaults;
                        var settings             = $.extend({}, defaults, settings_user);
                        var attr_data            = settings.dataAttr;
                        var field_label          = settings.labelField;
                    Severity: Major
                    Found in app/assets/javascripts/selectize_fixed.js - About 4 hrs to fix

                      File emotions.js has 358 lines of code (exceeds 250 allowed). Consider refactoring.
                      Open

                      /**
                       * emojiarea - A rich textarea control that supports emojis, WYSIWYG-style.
                       * Copyright (c) 2012 DIY Co
                       *
                       * Licensed under the Apache License, Version 2.0 (the "License"); you may not use this
                      Severity: Minor
                      Found in app/assets/javascripts/emotions.js - About 4 hrs to fix

                        Function render has 96 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                          render: function(){
                            photos = this.props.photos;
                            photos = photos.map(function (p, index) {
                              return (
                                <div key={index} className="usual-post-photo action-create-element-post">
                        Severity: Major
                        Found in app/assets/javascripts/components/photos_box.js.jsx - About 3 hrs to fix

                          Function refreshOptions has 94 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              refreshOptions: function(triggerDropdown) {
                                var i, j, k, n, groups, groups_order, option, option_html, optgroup, optgroups, html, html_children, has_create_option;
                                var $active, $active_before, $create;
                          
                                if (typeof triggerDropdown === 'undefined') {
                          Severity: Major
                          Found in app/assets/javascripts/selectize_fixed.js - About 3 hrs to fix

                            Function render has 84 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              render(){
                                if (!this.props.post) return null;
                                console.log(this.props.post)
                                var post = this.props.post;
                                var author = post.author;
                            Severity: Major
                            Found in app/assets/javascripts/components/show_explore_post.js.jsx - About 3 hrs to fix

                              Function render has 83 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                render(){
                                  var self = this;
                                  var checked_count = $.grep(this.state.users, function(user){
                                      return user.checked;
                                    }).length;
                              Severity: Major
                              Found in app/assets/javascripts/components/follow_box.js.jsx - About 3 hrs to fix

                                Function render has 81 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                  render: function(){
                                    var style = {
                                      background: 'url(' + this.props.comment.author.avatar + ') no-repeat',
                                      backgroundSize: 'cover'
                                    };
                                Severity: Major
                                Found in app/assets/javascripts/components/comment.js.jsx - About 3 hrs to fix

                                  File post_box.js.jsx has 300 lines of code (exceeds 250 allowed). Consider refactoring.
                                  Open

                                  const PostBox = React.createClass({
                                    //BEGIN***************************************************DECLARE
                                    propTypes: {
                                      group_id: React.PropTypes.number,
                                      //show_panel: React.PropTypes.boolean,
                                  Severity: Minor
                                  Found in app/assets/javascripts/components/post_box.js.jsx - About 3 hrs to fix

                                    Function _navigate has 78 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        CBPGridGallery.prototype._navigate = function( dir ) {
                                            if( this.isAnimating ) return;
                                            if( dir === 'next' && this.current === this.itemsCount - 1 ||  dir === 'prev' && this.current === 0  ) {
                                                this._closeSlideshow();
                                                return;
                                    Severity: Major
                                    Found in app/assets/stylesheets/explore.js - About 3 hrs to fix

                                      Function onKeyDown has 76 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                          onKeyDown: function(e) {
                                            var isInput = e.target === this.$control_input[0];
                                            var self = this;
                                      
                                            if (self.isLocked) {
                                      Severity: Major
                                      Found in app/assets/javascripts/selectize_fixed.js - About 3 hrs to fix

                                        File react-dropzone.js.jsx has 288 lines of code (exceeds 250 allowed). Consider refactoring.
                                        Open

                                        //FUNCTION FOR ACCEPT FILES BEGIN
                                        var accept = function(file, acceptedFiles) {
                                          if (acceptedFiles) {
                                            const acceptedFilesArray = acceptedFiles.split(',');
                                            const mimeType = file.type;
                                        Severity: Minor
                                        Found in app/assets/javascripts/react-dropzone.js.jsx - About 2 hrs to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language