plainblack/Lacuna-Web-Client

View on GitHub

Showing 509 of 1,320 total issues

Function _getAddTab has 35 lines of code (exceeds 25 allowed). Consider refactoring.
Open

        _getAddTab : function() {
            this.add = new YAHOO.widget.Tab({ label: "Add Trade", content: [
            '<div id="aHt"><div class="tradeStash yui-g">',
            '    <div class="yui-u first">',
            '        <legend>On Planet</legend>',
Severity: Minor
Found in app/js-yui/building/transporter.js - About 1 hr to fix

    Function tick has 35 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            tick : function(e, oArgs) {
                var tickSec = oArgs[0]/1000, hasUpgrade, hasWork;
                if(this.data.pending_build) {
                    this.data.pending_build.seconds_remaining -= tickSec;
                    var remainingBuild = Math.round(this.data.pending_build.seconds_remaining);
    Severity: Minor
    Found in app/js-yui/mapper.js - About 1 hr to fix

      Function DetailsView has 35 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              DetailsView : function(tile) {
                  //YAHOO.log(tile, "info", "DetailsView");
      
                  if (!FactoryMap[tile.data.url]) {
                      // Pass this off to the new React stuff.
      Severity: Minor
      Found in app/js-yui/mapPlanet.js - About 1 hr to fix

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

            render : function() {
                return (
                    <div className="drag-handle" style={{
                        backgroundColor      : '#184F82',
                        border               : '1px solid black',
        Severity: Minor
        Found in app/js/components/window/panel/panelHeader.jsx - About 1 hr to fix

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

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

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

                    moveByTiles : function( x, y ) {
                        var absX = Math.abs(x),
                            absY = Math.abs(y),
                            durMS = absX > absY ? this.tileSizeInPx * absX : this.tileSizeInPx * absY, //get the longest duration if we're moving both x and y
                            totalX = x * this.tileSizeInPx,
            Severity: Minor
            Found in app/js-yui/mapper.js - About 1 hr to fix

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

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

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

                        _createHorizSingle : function (container, thumb, num) {
                            var range = 180,
                                tickSize = 30,
                                elNum = Sel.query('.'+num, this.container, true);
                            container = Sel.query('.'+container, this.container, true);
                Severity: Minor
                Found in app/js-yui/speciesDesigner.js - About 1 hr to fix

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

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

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

                            getPushShips : function() {
                                var targetId = Lib.getSelectedOptionValue("tradePushColony");
                                if(targetId) {
                                    require('js/actions/menu/loader').show();
                                    this.service.get_trade_ships({
                    Severity: Minor
                    Found in app/js-yui/building/tradeMinistry.js - About 1 hr to fix

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

                              PropLineDetails : function(prop, sec) {
                                  if(prop.status == "Passed" || prop.status == "Failed") {
                                      return ['<div style="margin-bottom:2px;">',
                                          '<div class="yui-gb">',
                                          '    <div class="yui-u first"><label>',prop.name,'</label></div>',
                      Severity: Minor
                      Found in app/js-yui/building/embassy.js - About 1 hr to fix

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

                                _getAllianceTab : function() {
                                    var div = document.createElement("div");
                                    if(this.isLeader) {
                                        div.innerHTML = ['<div>',
                                        '    <ul>',
                        Severity: Minor
                        Found in app/js-yui/building/embassy.js - About 1 hr to fix

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

                                  ShipScuttle : function(e, matchedEl, container) {
                                      if(confirm(["Are you sure you want to Scuttle ",this.Ship.name,"?"].join(''))) {
                                          var btn = Event.getTarget(e);
                                          btn.disabled = true;
                                          require('js/actions/menu/loader').show();
                          Severity: Minor
                          Found in app/js-yui/building/spacePort.js - About 1 hr to fix

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

                                    populateAddResourceName : function() {
                                        var elm = Dom.get("tradeAddResourceName"),
                                            li = document.createElement("li"), nLi, x, r, name, resource;
                                            
                                        if(elm) {
                            Severity: Minor
                            Found in app/js-yui/building/tradeMinistry.js - About 1 hr to fix

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

                                      populatePushResourceName : function() {
                                          var elm = Dom.get("tradePushResourceName"),
                                              li = document.createElement("li"), nLi, x, r, name, resource;
                                              
                                          if(elm) {
                              Severity: Minor
                              Found in app/js-yui/building/tradeMinistry.js - About 1 hr to fix

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

                                        AddMerc : function(e) {
                                            var qVal = Dom.get("tradeAddAskingQuantity").value*1;
                                            if(!Lang.isNumber(qVal) || qVal <= 0) {
                                                Dom.get("tradeAddMessage").innerHTML = "Quantity of asking essentia must be a number and greater than 0";
                                                return;
                                Severity: Minor
                                Found in app/js-yui/building/mercenariesGuild.js - About 1 hr to fix

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

                                          loadTab : function(isAll) {
                                              switch(this.currentTab) {
                                                  case this.create.id:
                                                      Dom.setStyle(this.archiver,"display","none");
                                                      this.loadCreate(isAll);
                                  Severity: Minor
                                  Found in app/js-yui/messaging.js - About 1 hr to fix

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

                                            PropLineDetails : function(prop, sec) {
                                                if(prop.status == "Passed" || prop.status == "Failed") {
                                                    return ['<div style="margin-bottom:2px;">',
                                                        '<div class="yui-gb">',
                                                        '    <div class="yui-u first"><label>',prop.name,'</label></div>',
                                    Severity: Minor
                                    Found in app/js-yui/module/parliament.js - About 1 hr to fix

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

                                              ProbesDisplay : function() {
                                                  var stars = this.probes,
                                                      probeDetails = Dom.get("probeDetails");
                                                      
                                                  if(probeDetails) {
                                      Severity: Minor
                                      Found in app/js-yui/building/observatory.js - About 1 hr to fix

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

                                            render : function() {
                                                return (
                                                    <div>
                                                        <div
                                                            style={{
                                        Severity: Minor
                                        Found in app/js/components/window/captcha.jsx - About 1 hr to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language