talho/openphin

View on GitHub

Showing 3,486 of 3,486 total issues

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    onDisable : function(){
        Ext.FormPanel.superclass.onDisable.call(this);
        if(this.form){
            this.form.items.each(function(){
                 this.disable();
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/form/Form.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/ext/src/widgets/form/Form.js on lines 326..333

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if(this.enableFormat){
            btns.bold.toggle(doc.queryCommandState('bold'));
            btns.italic.toggle(doc.queryCommandState('italic'));
            btns.underline.toggle(doc.queryCommandState('underline'));
        }
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/form/HtmlEditor.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/ext/src/widgets/form/HtmlEditor.js on lines 896..900

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if ( document.documentElement.doScroll && window == window.top ) (function(){
            if ( jQuery.isReady ) return;

            try {
                // If IE is used, use the trick by Diego Perini
Severity: Major
Found in app/assets/javascripts/jquery.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/jquery-tooltip/lib/jquery.js on lines 2295..2307

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            tools: [{id: 'icon-view', scope: this, qtip: 'Icon View', handler: function(){
                this.getPanel().getComponent('file_grid_holder').layout.setActiveItem(0);
                this.getPanel().doLayout();
            }}],
Severity: Major
Found in app/assets/javascripts/documents/Documents.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/documents/Documents.js on lines 311..316

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

            tools: [
                {id: 'detail-view', scope: this, qtip: 'Detail View', handler: function(){
                    this.getPanel().getComponent('file_grid_holder').layout.setActiveItem(1);
                    this.getPanel().doLayout();
                }}
Severity: Major
Found in app/assets/javascripts/documents/Documents.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/documents/Documents.js on lines 216..219

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    setMinValue : function(dt){
        this.minValue = (Ext.isString(dt) ? this.parseDate(dt) : dt);
        if(this.menu){
            this.menu.picker.setMinDate(this.minValue);
        }
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/form/DateField.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/ext/src/widgets/form/DateField.js on lines 240..245

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    setMaxValue : function(dt){
        this.maxValue = (Ext.isString(dt) ? this.parseDate(dt) : dt);
        if(this.menu){
            this.menu.picker.setMaxDate(this.maxValue);
        }
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/form/DateField.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/ext/src/widgets/form/DateField.js on lines 229..234

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

        if(this.enableAlignments){
            btns.justifyleft.toggle(doc.queryCommandState('justifyleft'));
            btns.justifycenter.toggle(doc.queryCommandState('justifycenter'));
            btns.justifyright.toggle(doc.queryCommandState('justifyright'));
        }
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/form/HtmlEditor.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/ext/src/widgets/form/HtmlEditor.js on lines 891..895

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    if ( jQuery.browser.msie && window == top ) (function(){
        if (jQuery.isReady) return;
        try {
            // If IE is used, use the trick by Diego Perini
            // http://javascript.nwbox.com/IEContentLoaded/
Severity: Major
Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/jquery.js on lines 3072..3086

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Similar blocks of code found in 2 locations. Consider refactoring.
Open

    onEnable : function(){
        Ext.FormPanel.superclass.onEnable.call(this);
        if(this.form){
            this.form.items.each(function(){
                 this.enable();
Severity: Major
Found in app/assets/javascripts/ext/src/widgets/form/Form.js and 1 other location - About 2 hrs to fix
app/assets/javascripts/ext/src/widgets/form/Form.js on lines 316..323

Duplicated Code

Duplicated code can lead to software that is hard to understand and difficult to change. The Don't Repeat Yourself (DRY) principle states:

Every piece of knowledge must have a single, unambiguous, authoritative representation within a system.

When you violate DRY, bugs and maintenance problems are sure to follow. Duplicated code has a tendency to both continue to replicate and also to diverge (leaving bugs as two similar implementations differ in subtle ways).

Tuning

This issue has a mass of 80.

We set useful threshold defaults for the languages we support but you may want to adjust these settings based on your project guidelines.

The threshold configuration represents the minimum mass a code block must have to be analyzed for duplication. The lower the threshold, the more fine-grained the comparison.

If the engine is too easily reporting duplication, try raising the threshold. If you suspect that the engine isn't catching enough duplication, try lowering the threshold. The best setting tends to differ from language to language.

See codeclimate-duplication's documentation for more information about tuning the mass threshold in your .codeclimate.yml.

Refactorings

Further Reading

Function uploadFile has 56 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        uploadFile: function(mode){
            var sel = this.current_selections[0],
                folder = this.folder_tree.getSelectionModel().getSelected(),
                win;
            
Severity: Major
Found in app/assets/javascripts/documents/DocumentViews.js - About 2 hrs to fix

    Function _createFileGrid has 56 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _createFileGrid: function(store){
            return {
                xtype: 'grid',
                title: 'Files',
                itemId: 'file_grid',
    Severity: Major
    Found in app/assets/javascripts/documents/Documents.js - About 2 hrs to fix

      File ext-lang-id.js has 260 lines of code (exceeds 250 allowed). Consider refactoring.
      Open

      /*!
       * Ext JS Library 3.3.0
       * Copyright(c) 2006-2010 Ext JS, Inc.
       * licensing@extjs.com
       * http://www.extjs.com/license
      Severity: Minor
      Found in app/assets/javascripts/ext/src/locale/ext-lang-id.js - About 2 hrs to fix

        Function Component has 56 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        Ext.Component = function(config){
            config = config || {};
            if(config.initialConfig){
                if(config.isAction){           // actions
                    this.baseAction = config;
        Severity: Major
        Found in app/assets/javascripts/ext/src/widgets/Component.js - About 2 hrs to fix

          Function refreshRow has 56 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              refreshRow: function(record) {
                  var store     = this.ds,
                      colCount  = this.cm.getColumnCount(),
                      columns   = this.getColumnData(),
                      last      = colCount - 1,
          Severity: Major
          Found in app/assets/javascripts/ext/src/widgets/grid/GridView.js - About 2 hrs to fix

            Function MenuNav has 56 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            Ext.menu.MenuNav = Ext.extend(Ext.KeyNav, function(){
                function up(e, m){
                    if(!m.tryActivate(m.items.indexOf(m.activeItem)-1, -1)){
                        m.tryActivate(m.items.length-1, -1);
                    }
            Severity: Major
            Found in app/assets/javascripts/ext/src/widgets/menu/Menu.js - About 2 hrs to fix

              Function onResize has 56 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){
                      var w = adjWidth,
                          h = adjHeight;
              
                      if(Ext.isDefined(w) || Ext.isDefined(h)){
              Severity: Major
              Found in app/assets/javascripts/ext/src/widgets/Panel.js - About 2 hrs to fix

                Function startEditing has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    startEditing : function(row, col){
                        this.stopEditing();
                        if(this.colModel.isCellEditable(col, row)){
                            this.view.ensureVisible(row, col, true);
                            var r = this.store.getAt(row),
                Severity: Major
                Found in app/assets/javascripts/ext/src/widgets/grid/EditorGrid.js - About 2 hrs to fix

                  Function request has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          request : function(o){
                              var me = this;
                              if(me.fireEvent(BEFOREREQUEST, me, o)){
                                  if (o.el) {
                                      if(!Ext.isEmpty(o.indicatorText)){
                  Severity: Major
                  Found in app/assets/javascripts/ext/src/ext-core/src/data/Connection.js - About 2 hrs to fix

                    Function clean has 56 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        clean: function( elems, context ) {
                            var ret = [];
                            context = context || document;
                            // !context.createElement fails in IE with an error but returns typeof 'object'
                            if (typeof context.createElement == 'undefined') 
                    Severity: Major
                    Found in app/assets/javascripts/jquery-tooltip/lib/jquery.js - About 2 hrs to fix
                      Severity
                      Category
                      Status
                      Source
                      Language