plainblack/Lacuna-Web-Client

View on GitHub

Showing 509 of 1,320 total issues

Function getAddShips has 30 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        getAddShips : function() {
            require('js/actions/menu/loader').show();
            
            this.service.get_trade_ships({
                session_id: Game.GetSession(""),
Severity: Minor
Found in app/js-yui/building/tradeMinistry.js - About 1 hr to fix

    Function MaxValue has 30 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            MaxValue : function(e) {
                var btn = Event.getTarget(e),
                    input = btn.input,
                    cp = Game.GetCurrentPlanet(),
                    origVal, newVal;
    Severity: Minor
    Found in app/js-yui/building/wasteExchanger.js - About 1 hr to fix

      Function getLogs has 30 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              getLogs : function(e) {
                  if(e.newValue) {
                      if(!this.battleLogs) {
                          require('js/actions/menu/loader').show();
                          this.service.view_battle_logs({session_id:Game.GetSession(),building_id:this.building.id}, {
      Severity: Minor
      Found in app/js-yui/building/spacePort.js - About 1 hr to fix

        Function getForeign has 30 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                getForeign : function(e) {
                    if(e.newValue) {
                        if(!this.shipsForeign) {
                            require('js/actions/menu/loader').show();
                            this.service.view_foreign_ships({session_id:Game.GetSession(),building_id:this.building.id,page_number:1}, {
        Severity: Minor
        Found in app/js-yui/building/spacePort.js - About 1 hr to fix

          Function RenameSpecies has 30 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  RenameSpecies : function(e) {
                      Event.stopEvent(e);
                      var btn = Event.getTarget(e);
                      var newName = Dom.get('newSpeciesName').value;
                      var newDesc = Dom.get('newSpeciesDesc').value.substr(0,1024);
          Severity: Minor
          Found in app/js-yui/building/geneticsLab.js - About 1 hr to fix

            Function getAddShips has 30 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    getAddShips : function(e) {
                        if(e.newValue && !this.tradeShips) {
                            require('js/actions/menu/loader').show();
                            
                            this.service.get_trade_ships({
            Severity: Minor
            Found in app/js-yui/building/mercenariesGuild.js - About 1 hr to fix

              Function bhgGetActions has 30 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                  bhgGetActions : function() {
                    require('js/actions/menu/loader').show();
              
                    Dom.setStyle("bhgActions", "display", "none");
              
              
              Severity: Minor
              Found in app/js-yui/building/blackHoleGenerator.js - About 1 hr to fix

                Function ShipSend has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        ShipSend : function(e) {
                            var btn = Event.getTarget(e);
                            btn.disabled = true;
                
                            var oSelf = this.Self,
                Severity: Minor
                Found in app/js-yui/building/spacePort.js - About 1 hr to fix

                  Function _createSendToSelect has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          _createSendToSelect : function() {
                              var dataSource = new Util.XHRDataSource("/empire");
                              dataSource.connMethodPost = "POST";
                              dataSource.maxCacheEntries = 2;
                              dataSource.responseType = YAHOO.util.XHRDataSource.TYPE_JSON;
                  Severity: Minor
                  Found in app/js-yui/building/embassy.js - About 1 hr to fix

                    Function loadSentMessages has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            loadSentMessages : function() {
                                this._setTab(this.sent);
                                if(this.pager) {this.pager.destroy();}
                    
                                var InboxServ = Game.Services.Inbox,
                    Severity: Minor
                    Found in app/js-yui/messaging.js - About 1 hr to fix

                      Function loadArchiveMessages has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              loadArchiveMessages : function() {
                                  this._setTab(this.archive);
                                  if(this.pager) {this.pager.destroy();}
                      
                                  var InboxServ = Game.Services.Inbox,
                      Severity: Minor
                      Found in app/js-yui/messaging.js - About 1 hr to fix

                        Function build has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                build : function() {
                                    if (!this.Display) {
                                        var container = document.createElement("div");
                                        container.id = "notify";
                                        Dom.addClass(container, Lib.Styles.HIDDEN);
                        Severity: Minor
                        Found in app/js-yui/notify.js - About 1 hr to fix

                          Function getForeign has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                          Open

                                  getForeign : function(e) {
                                      if(e.newValue) {
                                          if(!this.shipsForeign) {
                                              require('js/actions/menu/loader').show();
                                              this.service.view_foreign_ships({session_id:Game.GetSession(),building_id:this.building.id,page_number:1}, {
                          Severity: Minor
                          Found in app/js-yui/module/policeStation.js - About 1 hr to fix

                            Function loadTrashMessages has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                    loadTrashMessages : function() {
                                        this._setTab(this.trash);
                                        if(this.pager) {this.pager.destroy();}
                            
                                        var InboxServ = Game.Services.Inbox,
                            Severity: Minor
                            Found in app/js-yui/messaging.js - About 1 hr to fix

                              Function CreateSpecies has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                  var CreateSpecies = function(Empire) {
                                      this.id = "createSpecies";
                                      this._empire = Empire;
                                      this.createEvent("onCreateSuccessful");
                                      
                              Severity: Minor
                              Found in app/js-yui/createSpecies.js - About 1 hr to fix

                                Function LawsPopulate has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        LawsPopulate : function(){
                                            var details = Dom.get("lawsDetails");
                                            
                                            if(details) {
                                                var laws = this.laws,
                                Severity: Minor
                                Found in app/js-yui/module/parliament.js - About 1 hr to fix

                                  Function CreateEmpireSearch has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

                                          CreateEmpireSearch : function(id) {
                                              var dataSource = new Util.XHRDataSource("/empire");
                                              dataSource.connMethodPost = "POST";
                                              dataSource.maxCacheEntries = 2;
                                              dataSource.responseType = YAHOO.util.XHRDataSource.TYPE_JSON;
                                  Severity: Minor
                                  Found in app/js-yui/module/parliament.js - About 1 hr to fix

                                    Function PopulateShipsMiningPlatforms has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

                                            PopulateShipsMiningPlatforms : function(panel) {
                                                var ships = this.currentShips.mining_platforms || [];
                                                    details = Dom.get("planetDetailMiningShips");
                                    
                                                if(details) {
                                    Severity: Minor
                                    Found in app/js-yui/mapStar.js - About 1 hr to fix

                                      Function PopulateShipsExcavators has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              PopulateShipsExcavators : function(panel) {
                                                  var ships = this.currentShips.excavators || [];
                                                      details = Dom.get("planetDetailExcavators");
                                      
                                                  if(details) {
                                      Severity: Minor
                                      Found in app/js-yui/mapStar.js - About 1 hr to fix

                                        Function FireBFG has 30 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                FireBFG : function(e) {
                                                    var button = Event.getTarget(e),
                                                        body   = Lib.getSelectedOptionValue('proposeFireBfgBody'),
                                                        reason = Dom.get('proposeFireBfgReason').value;
                                                    
                                        Severity: Minor
                                        Found in app/js-yui/module/parliament.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language