plainblack/Lacuna-Web-Client

View on GitHub

Showing 509 of 1,320 total issues

Function success has 34 lines of code (exceeds 25 allowed). Consider refactoring.
Open

            success : _.bind(function(o) {

                if (!this.chat) {
                    return true;
                }
Severity: Minor
Found in app/js/components/menu/chat.jsx - About 1 hr to fix

    Consider simplifying this complex logical expression.
    Open

                if(o.result.building && this.building) {
                    //if we suddenly have work update the tile to add the tile.  if we don't have work update the tile to remove the timer
                    var workChanged = (
                        (this.building.work && !o.result.building.work) ||
                        (!this.building.work && o.result.building.work) ||
    Severity: Critical
    Found in app/js-yui/building.js - About 1 hr to fix

      Consider simplifying this complex logical expression.
      Open

      if (typeof YAHOO.lacuna.Profile == "undefined" || !YAHOO.lacuna.Profile) {
      
      (function(){
          var Lang = YAHOO.lang,
              Util = YAHOO.util,
      Severity: Critical
      Found in app/js-yui/profile.js - About 1 hr to fix

        Consider simplifying this complex logical expression.
        Open

        if (typeof YAHOO.lacuna.buildings.WasteExchanger == "undefined" || !YAHOO.lacuna.buildings.WasteExchanger) {
            
        (function(){
            var Lang = YAHOO.lang,
                Util = YAHOO.util,
        Severity: Critical
        Found in app/js-yui/building/wasteExchanger.js - About 1 hr to fix

          Consider simplifying this complex logical expression.
          Open

          if (typeof YAHOO.lacuna.buildings.WasteRecycling == "undefined" || !YAHOO.lacuna.buildings.WasteRecycling) {
              
          (function(){
              var Lang = YAHOO.lang,
                  Util = YAHOO.util,
          Severity: Critical
          Found in app/js-yui/building/wasteRecycling.js - About 1 hr to fix

            Consider simplifying this complex logical expression.
            Open

            if (typeof YAHOO.lacuna.Notify == "undefined" || !YAHOO.lacuna.Notify) {
            
            (function(){
                var Lang = YAHOO.lang,
                    Util = YAHOO.util,
            Severity: Critical
            Found in app/js-yui/notify.js - About 1 hr to fix

              Function showTiles has 33 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      showTiles : function(refresh) {
                          if(this.tileCache) {
                              var bounds = this.bounds;
                              var tiles = {};
                              //from left to right (smaller to bigger)
              Severity: Minor
              Found in app/js-yui/mapper.js - About 1 hr to fix

                Function Transmit has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        Transmit : function(e, opt) {
                            var btn = Event.getTarget(e);
                            Event.stopEvent(e);
                            require('js/actions/menu/loader').show();
                            btn.disabled = true;
                Severity: Minor
                Found in app/js-yui/building/subspaceSupplyDepot.js - About 1 hr to fix

                  Function createFind has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          createFind : function() {
                              this.species = Dom.get("lojDetails");
                  
                              var dataSource = new Util.XHRDataSource("/empire");
                              dataSource.connMethodPost = "POST";
                  Severity: Minor
                  Found in app/js-yui/building/libraryOfJith.js - About 1 hr to fix

                    Function bhgGenerate has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                        bhgGenerate   : function(e) {
                          var oSelf = this.Self,
                            target = this.Target,
                            task = this.Task;
                    
                    
                    Severity: Minor
                    Found in app/js-yui/building/blackHoleGenerator.js - About 1 hr to fix

                      Function SpyAssign has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              SpyAssign : function() {
                                  require('js/actions/menu/loader').show();
                                  var assign = this.Assign[this.Assign.selectedIndex].value;
                                  
                                  this.Self.service.assign_spy({
                      Severity: Minor
                      Found in app/js-yui/building/intelligence.js - About 1 hr to fix

                        Function MoveSpyShip has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                MoveSpyShip : function(e, matchedEl, tab) {
                                    Event.stopEvent(e);
                                    require('js/actions/menu/loader').show();
                                    var shipId = matchedEl.parentNode.parentNode.parentNode.shipId,
                                        spies = tab.spiesToMove,
                        Severity: Minor
                        Found in app/js-yui/mapStar.js - About 1 hr to fix

                          Function WrappedService has 33 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                      WrappedService : function(method, name) {
                                          var logNS = 'Game.RPC.' + name + '.failure';
                                          var func = function(params, origOpts) {
                                              var retry = function() {
                                                  var opts = { retry : 0 };
                          Severity: Minor
                          Found in app/js/game.jsx - About 1 hr to fix

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

                                    render : function(el) {
                                        el = Dom.get(el);
                                        var container = document.createElement('div');
                                        this.container = container;
                                        container.innerHTML = this._getHtml();
                            Severity: Minor
                            Found in app/js-yui/speciesDesigner.js - About 1 hr to fix

                              Function onDragDrop has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  onDragDrop: function(e, id) {
                                    if (id == "archaeologyGlyphDetails") {
                              
                                      // The position of the cursor at the time of the drop (YAHOO.util.Point)
                                      var pt = DDM.interactionInfo.point; 
                              Severity: Minor
                              Found in app/js-yui/building/archaeology.js - About 1 hr to fix

                                Function MineWithdraw has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        MineWithdraw : function(e) {
                                            var btn = Event.getTarget(e);
                                            btn.disabled = true;
                                            if(confirm(['Are you sure you want to withdraw the trade asking for ', this.Trade.ask, ' essentia and offering ', this.Trade.offer,'?'].join(''))) {
                                                require('js/actions/menu/loader').show();
                                Severity: Minor
                                Found in app/js-yui/building/mercenariesGuild.js - About 1 hr to fix

                                  Function success has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                                  success : function(o){
                                                      YAHOO.log(o, "info", "Network19.NewsGet.success");
                                                      require('js/actions/menu/loader').hide();
                                                      this.rpcSuccess(o);
                                                      
                                  Severity: Minor
                                  Found in app/js-yui/building/network19.js - About 1 hr to fix

                                    Function SpyPopulate has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            SpyPopulate : function() {
                                                var details = Dom.get("spiesDetails");
                                                if(details) {
                                                    var spies = this.spies.spies,
                                                        nDiv,
                                    Severity: Minor
                                    Found in app/js-yui/building/intelligence.js - About 1 hr to fix

                                      Function SplitPlan has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              SplitPlan : function() {
                                                  var selected = Lib.getSelectedOptionValue("forgeSplitPlanSelect"),
                                                      quantity = Dom.get("forgeSplitPlanQuantity").value;
                                                  
                                                  if ( selected == "" ) {
                                      Severity: Minor
                                      Found in app/js-yui/building/theDillonForge.js - About 1 hr to fix

                                        Function InitLogin has 32 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                    InitLogin : function() {
                                                        if (!Lacuna.Game.LoginDialog) {
                                                            Lacuna.Game.LoginDialog = new Lacuna.Login();
                                                            Lacuna.Game.LoginDialog.subscribe('onLoginSuccessful', function(oArgs) {
                                                                var result = oArgs.result;
                                        Severity: Minor
                                        Found in app/js/game.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language