plainblack/Lacuna-Web-Client

View on GitHub

Showing 509 of 1,320 total issues

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

                success : function(o){
                    YAHOO.log(o, "info", "PlanetaryCommand.abandon.success");
                    this.rpcSuccess(o);

                    delete Game.EmpireData.planets[cp.id]; // Remove the abandoned planet
Severity: Minor
Found in app/js-yui/building/planetaryCommand.js - About 1 hr to fix

    Function getAvailableTrades has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            getAvailableTrades : function(e) {
                if(e.newValue) {
                    require('js/actions/menu/loader').show();
                    var data = {session_id:Game.GetSession(),building_id:this.building.id,page_number:1},
                        selVal = Lib.getSelectedOptionValue("tradeFilter");
    Severity: Minor
    Found in app/js-yui/building/tradeMinistry.js - About 1 hr to fix

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

              MineWithdraw : function() {
                  if(confirm(['Are you sure you want to withdraw the trade asking for ', this.Trade.ask, ' essentia and offering ', this.Trade.offer.join(', '),'?'].join(''))) {
                      require('js/actions/menu/loader').show();
                      this.Self.service.withdraw_from_market({
                          session_id:Game.GetSession(""),
      Severity: Minor
      Found in app/js-yui/building/tradeMinistry.js - About 1 hr to fix

        Function ViewData has 28 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                ViewData : function(id, url, callback, x, y) {
                    var BuildingServ = Game.Services.Buildings.Generic,
                        data = {
                            session_id: Game.GetSession(""),
                            building_id: id
        Severity: Minor
        Found in app/js-yui/mapPlanet.js - About 1 hr to fix

          Function MakePlan has 28 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  MakePlan : function() {
                      var plan_class = Lib.getSelectedOptionValue("forgeMakePlanSelect"),
                          level = Dom.get("forgeMakePlanLevel").value;
                      
                      if ( plan_class == "" ) {
          Severity: Minor
          Found in app/js-yui/building/theDillonForge.js - About 1 hr to fix

            Function parseReason has 28 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    parseReason : function(reason, defReason) {
                        var output = "";
                        if(reason) {
                            if(Lang.isArray(reason)) {
                                switch(reason[0]) {
            Severity: Minor
            Found in app/js-yui/library.js - About 1 hr to fix

              Function GetProbes has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

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

                Function onTickerTick has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                    onTickerTick : function() {
                
                        var body = clone(this.state);
                
                        var tickIncoming = function(ship) {
                Severity: Minor
                Found in app/js/stores/rpc/body.js - About 1 hr to fix

                  Function populatePushShipName has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          populatePushShipName : function() {
                              var elm = Dom.get("tradePushShipName"),
                                  li = document.createElement("li"), nLi;
                                  
                              if(elm) {
                  Severity: Minor
                  Found in app/js-yui/building/transporter.js - About 1 hr to fix

                    Function _getPlanTab has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                    Open

                            _getPlanTab : function() {
                                this.planTab = new YAHOO.widget.Tab({ label: "Plans", content: [
                                    '<ul class="plan planHeader clearafter"><li class="planQuan">Quantity</li><li class="planName">Name</li><li class="planLevel">Level</li><li class="planExtra">Extra Level</li></ul>',
                                    '<div>',
                                    '    <div id="planDetails">',
                    Severity: Minor
                    Found in app/js-yui/building/planetaryCommand.js - About 1 hr to fix

                      Function populateAddShipName has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                      Open

                              populateAddShipName : function() {
                                  var elm = Dom.get("tradeAddShipName"),
                                      li = document.createElement("li"), nLi;
                                      
                                  if(elm) {
                      Severity: Minor
                      Found in app/js-yui/building/transporter.js - About 1 hr to fix

                        Function _createActionIcon has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                        Open

                                _createActionIcon : function() {
                                    if(this.actionIcon) {
                                        if(this.data) {
                                            if (Game.GetCookieSettings("showLevels","0") == "1") {
                                                Dom.setStyle(this.actionIcon, "visibility", "visible");
                        Severity: Minor
                        Found in app/js-yui/mapper.js - About 1 hr to fix

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

                                              success : function(o){
                                                  this.rpcSuccess(o);
                                                  
                                                  for(var i=0; i<lis.length; i++) {
                                                      if(lis[i].Object) {
                          Severity: Minor
                          Found in app/js-yui/building/transporter.js - About 1 hr to fix

                            Function populateSearch has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                            Open

                                populateSearch : function() {
                                  var sel = Dom.get("archaeologyOre");
                                  if(sel && this.ore){
                                    sel.options.length = 0;
                                    var opt = document.createElement("option"),
                            Severity: Minor
                            Found in app/js-yui/building/archaeology.js - About 1 hr to fix

                              Function _getPropsTab has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                              Open

                                      _getPropsTab : function() {
                                          var tab = new YAHOO.widget.Tab({ label: "Propositions", content: [
                                              '<div>',
                                              '    <div style="overflow:auto;"><ul id="propsDetails"></ul></div>',
                                              '</div>'
                              Severity: Minor
                              Found in app/js-yui/building/embassy.js - About 1 hr to fix

                                Function buildLevels has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                Open

                                        buildLevels : function(levelCosts) {
                                            var frag = ['<table id="stationLabLevels" class="buildingStats" cellpadding="0" cellspacing="0"><col width="53" /><colgroup span="6" width="110" />'],
                                                planet = Game.GetCurrentPlanet();
                                            var buildfield = function(costs,type,low) {
                                                return [
                                Severity: Minor
                                Found in app/js-yui/building/spaceStationLab.js - About 1 hr to fix

                                  Function spiesView has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                  Open

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

                                    Function prisonersView has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                    Open

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

                                      Function LotteryPopulate has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                      Open

                                              LotteryPopulate : function(options) {
                                                  var details = Dom.get("entertainmentLotteryList");
                                                  if(details) {
                                                      var li = document.createElement("li");
                                                          
                                      Severity: Minor
                                      Found in app/js-yui/building/entertainment.js - About 1 hr to fix

                                        Function CreateAlliance has 27 lines of code (exceeds 25 allowed). Consider refactoring.
                                        Open

                                                CreateAlliance : function() {
                                                    var data = {
                                                        session_id: Game.GetSession(""),
                                                        building_id: this.building.id,
                                                        name: Dom.get("embassyCreateName").value
                                        Severity: Minor
                                        Found in app/js-yui/building/embassy.js - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language