BadrIT/translation_center

View on GitHub

Showing 161 of 426 total issues

Consider simplifying this complex logical expression.
Open

        if(!(/^(document|window|parent)$/).test(o.containment) && o.containment.constructor != Array) {
            var c = $(o.containment);
            var ce = c[0]; if(!ce) return;
            var co = c.offset();
            var over = ($(ce).css("overflow") != 'hidden');
Severity: Critical
Found in app/assets/javascripts/translation_center/jquery-ui.js - About 2 hrs to fix

    Function _clear has 50 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

        _clear: function(event, noPropagation) {
    
            this.reverting = false;
            // We delay all events that have to be triggered to after the point where the placeholder has been removed and
            // everything else normalized again
    Severity: Minor
    Found in app/assets/javascripts/translation_center/jquery-ui.js - About 2 hrs to fix

      Function _mouseCapture has 50 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

          _mouseCapture: function( event ) {
              var position, normValue, distance, closestHandle, index, allowed, offset, mouseOverHandle,
                  that = this,
                  o = this.options;
      
      
      Severity: Minor
      Found in app/assets/javascripts/translation_center/jquery-ui.js - About 2 hrs to fix

        Function _contactContainers has 49 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

            _contactContainers: function(event) {
        
                // get innermost container that intersects with item
                var innermostContainer = null, innermostIndex = null;
        
        
        Severity: Minor
        Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

          Function blind has 49 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          $.effects.effect.blind = function( o, done ) {
              // Create element
              var el = $( this ),
                  props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
                  mode = $.effects.setMode( el, o.mode || "hide" ),
          Severity: Minor
          Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

            Function _determineDate has 48 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                _determineDate: function(inst, date, defaultDate) {
                    var offsetNumeric = function(offset) {
                        var date = new Date();
                        date.setDate(date.getDate() + offset);
                        return date;
            Severity: Minor
            Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

              Function _toggle has 48 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _toggle: function( event, eventData ) {
                      var that = this,
                          toShow = eventData.newPanel,
                          toHide = eventData.oldPanel;
              
              
              Severity: Minor
              Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

                Function _animate has 48 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _animate: function( toShow, toHide, data ) {
                        var total, easing, duration,
                            that = this,
                            adjust = 0,
                            down = toShow.length &&
                Severity: Minor
                Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

                  Function scale has 47 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  $.effects.effect.scale = function( o, done ) {
                  
                      // Create element
                      var el = $( this ),
                          options = $.extend( true, {}, o ),
                  Severity: Minor
                  Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

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

                        _setOption: function( key, value ) {
                            var i,
                                valsLength = 0;
                    
                            if ( $.isArray( this.options.values ) ) {
                    Severity: Minor
                    Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

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

                      $.effects.effect.fold = function( o, done ) {
                      
                          // Create element
                          var el = $( this ),
                              props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
                      Severity: Minor
                      Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

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

                            _tabKeydown: function( event ) {
                                var focusedTab = $( this.document[0].activeElement ).closest( "li" ),
                                    selectedIndex = this.tabs.index( focusedTab ),
                                    goingForward = true;
                        
                        
                        Severity: Minor
                        Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

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

                          function editableTranslations(){
                          
                            $.each($('.user_translation'), function(){
                              var key_id = $(this).attr('data-key-id');
                          
                          
                          Severity: Minor
                          Found in app/assets/javascripts/translation_center/translations.js - About 1 hr to fix

                            Function effect has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                effect: function( /* effect, options, speed, callback */ ) {
                                    var args = _normalizeArguments.apply( this, arguments ),
                                        mode = args.mode,
                                        queue = args.queue,
                                        effectMethod = $.effects.effect[ args.effect ],
                            Severity: Minor
                            Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

                              Function _generatePosition has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  _generatePosition: function(event) {
                              
                                      var o = this.options, scroll = this.cssPosition == 'absolute' && !(this.scrollParent[0] != document && $.contains(this.scrollParent[0], this.offsetParent[0])) ? this.offsetParent : this.scrollParent, scrollIsRootNode = (/(html|body)/i).test(scroll[0].tagName);
                                      var pageX = event.pageX;
                                      var pageY = event.pageY;
                              Severity: Minor
                              Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

                                Function _destroy has 44 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                    _destroy: function() {
                                        if ( this.xhr ) {
                                            this.xhr.abort();
                                        }
                                
                                
                                Severity: Minor
                                Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

                                  Function refresh has 43 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                      refresh: function() {
                                          var menus,
                                              icon = this.options.icons.submenu,
                                              submenus = this.element.find( this.options.menus );
                                  
                                  
                                  Severity: Minor
                                  Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

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

                                      , show: function () {
                                          var $tip
                                            , inside
                                            , pos
                                            , actualWidth
                                    Severity: Minor
                                    Found in app/assets/javascripts/translation_center/bootstrap.js - About 1 hr to fix

                                      Function shake has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      $.effects.effect.shake = function( o, done ) {
                                      
                                          var el = $( this ),
                                              props = [ "position", "top", "bottom", "left", "right", "height", "width" ],
                                              mode = $.effects.setMode( el, o.mode || "effect" ),
                                      Severity: Minor
                                      Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

                                        Function _makeResizable has 42 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                            _makeResizable: function( handles ) {
                                                handles = (handles === undefined ? this.options.resizable : handles);
                                                var that = this,
                                                    options = this.options,
                                                    // .ui-resizable has position: relative defined in the stylesheet
                                        Severity: Minor
                                        Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language