BadrIT/translation_center

View on GitHub

Showing 161 of 426 total issues

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

        add: function( url, label, index ) {
            if ( index === undefined ) {
                index = this.anchors.length;
            }

Severity: Minor
Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

            if (this.floating && horizontalDirection) {
                return ((horizontalDirection == "right" && isOverRightHalf) || (horizontalDirection == "left" && !isOverRightHalf));
            } else {
                return verticalDirection && ((verticalDirection == "down" && isOverBottomHalf) || (verticalDirection == "up" && !isOverBottomHalf));
            }
    Severity: Critical
    Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

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

        Consider simplifying this complex logical expression.
        Open

                if ( ( ( $target[0].id != $.datepicker._mainDivId &&
                        $target.parents('#' + $.datepicker._mainDivId).length == 0 &&
                        !$target.hasClass($.datepicker.markerClassName) &&
                        !$target.closest("." + $.datepicker._triggerClass).length &&
                        $.datepicker._datepickerShowing && !($.datepicker._inDialog && $.blockUI) ) ) ||
        Severity: Critical
        Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

          Function _eventHandler has 41 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

              _eventHandler: function( event ) {
                  var options = this.options,
                      active = this.active,
                      clicked = $( event.currentTarget ),
                      clickedIsActive = clicked[ 0 ] === active[ 0 ],
          Severity: Minor
          Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

            Function bridge has 39 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

            $.widget.bridge = function( name, object ) {
                var fullName = object.prototype.widgetFullName || name;
                $.fn[ name ] = function( options ) {
                    var isMethodCall = typeof options === "string",
                        args = slice.call( arguments, 1 ),
            Severity: Minor
            Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

              Function _on has 38 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  _on: function( suppressDisabledCheck, element, handlers ) {
                      var delegateElement,
                          instance = this;
              
                      // no suppressDisabledCheck flag, shuffle arguments
              Severity: Minor
              Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

                Function _mouseStart has 38 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    _mouseStart: function(event) {
                
                        var o = this.options;
                
                        //Create and append the visible helper
                Severity: Minor
                Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

                  Function intersect has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                  $.ui.intersect = function(draggable, droppable, toleranceMode) {
                  
                      if (!droppable.offset) return false;
                  
                      var x1 = (draggable.positionAbs || draggable.position.absolute).left, x2 = x1 + draggable.helperProportions.width,
                  Severity: Minor
                  Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

                    Function drop has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                    $.effects.effect.drop = function( o, done ) {
                    
                        var el = $( this ),
                            props = [ "position", "top", "bottom", "left", "right", "opacity", "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 _mouseDown has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                          _mouseDown: function(event) {
                              // don't let more than one widget handle mouseStart
                              if( mouseHandled ) { return; }
                      
                              // we may have missed mouseup (out of window)
                      Severity: Minor
                      Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

                        Function _size has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                            _size: function() {
                                /* If the user has resized the dialog, the .ui-dialog and .ui-dialog-content
                                 * divs will both have width and height set, so we need to reset them
                                 */
                                var nonContentHeight, minContentHeight, autoHeight,
                        Severity: Minor
                        Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

                          Function drag has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                              drag: function(event, ui) {
                          
                                  var inst = $(this).data("draggable"), o = inst.options;
                                  var d = o.snapTolerance;
                          
                          
                          Severity: Minor
                          Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

                            Function slide has 37 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                              , slide: function (type, next) {
                                  var $active = this.$element.find('.item.active')
                                    , $next = next || $active[type]()
                                    , isCycling = this.interval
                                    , direction = type == 'next' ? 'left' : 'right'
                            Severity: Minor
                            Found in app/assets/javascripts/translation_center/bootstrap.js - About 1 hr to fix

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

                                  refresh: function() {
                                      var maxHeight, overflow,
                                          heightStyle = this.options.heightStyle,
                                          parent = this.element.parent();
                              
                              
                              Severity: Minor
                              Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

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

                                    load: function( index, event ) {
                                        index = this._getIndex( index );
                                        var that = this,
                                            tab = this.tabs.eq( index ),
                                            anchor = tab.find( ".ui-tabs-anchor" ),
                                Severity: Minor
                                Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

                                  Function _generatePosition has 36 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);
                                  
                                          // This is another very weird special case that only happens for relative elements:
                                  Severity: Minor
                                  Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

                                    Function name has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                        $.fn[ name ] = function( options ) {
                                            var isMethodCall = typeof options === "string",
                                                args = slice.call( arguments, 1 ),
                                                returnValue = this;
                                    
                                    
                                    Severity: Minor
                                    Found in app/assets/javascripts/translation_center/jquery-ui.js - About 1 hr to fix

                                      Function clip has 36 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                      $.effects.effect.clip = 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 slide has 35 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

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