plainblack/Lacuna-Web-Client

View on GitHub

Showing 509 of 1,320 total issues

Avoid deeply nested control flow statements.
Open

                        if(elListItem._oResultData && queue.indexOf(String(elListItem._oResultData.Id)) >= 0) {
                            this._selectItem(elListItem);
                        }
Severity: Major
Found in app/js-yui/textboxList.js - About 45 mins to fix

    Avoid deeply nested control flow statements.
    Open

                            for(var j = allListItemEls.length-1; j >= nItemsToShow; j--) {
                                extraListItem = allListItemEls[j];
                                extraListItem.style.display = "none";
                            }
    Severity: Major
    Found in app/js-yui/textboxList.js - About 45 mins to fix

      Avoid deeply nested control flow statements.
      Open

                              if(obj.extra_build_level > 0) {
                                  nLi.innerHTML = ['<span class="tradeResourceName">',obj.name,' ',obj.level,'+',obj.extra_build_level, ' (<label class="quantity">', obj.quantity, '</label>)</span> <input type="text" style="width:75px;" /><button type="button">+</button>'].join('');
                              }
                              else {
                                  nLi.innerHTML = ['<span class="tradeResourceName">',obj.name,' ',obj.level, ' (<label class="quantity">', obj.quantity, '</label>)</span> <input type="text" style="width:75px;" /><button type="button">+</button>'].join('');
      Severity: Major
      Found in app/js-yui/building/tradeMinistry.js - About 45 mins to fix

        Avoid deeply nested control flow statements.
        Open

                                if(Lang.isArray(resource)) {
                                    for(x=0; x < resource.length; x++) {
                                        name = resource[x];
                                        if(this.resources[name]) {
                                            nLi = li.cloneNode(false);
        Severity: Major
        Found in app/js-yui/building/tradeMinistry.js - About 45 mins to fix

          Avoid deeply nested control flow statements.
          Open

                                  for(var key in cur) {
                                      //if the key actually has a value count it
                                      if(cur[key]) {
                                          curNum++;
                                      }
          Severity: Major
          Found in app/js-yui/textboxList.js - About 45 mins to fix

            Avoid deeply nested control flow statements.
            Open

                                    if(!Dom.inDocument(this._elGrid)) {
                                        document.getElementById("content").appendChild(this._elGrid);
                                    }
            Severity: Major
            Found in app/js-yui/mapStar.js - About 45 mins to fix

              Avoid deeply nested control flow statements.
              Open

                                      if(ship.from.empire && ship.from.empire.name) {
                                          nLi.innerHTML = ship.from.name + ' <span style="cursor:pointer;">[' + ship.from.empire.name + ']</span>';
                                          Event.on(nLi, "click", this.EmpireProfile, ship.from.empire);
                                      }
                                      else {
              Severity: Major
              Found in app/js-yui/module/policeStation.js - About 45 mins to fix

                Avoid deeply nested control flow statements.
                Open

                                        for(x=0; x < resource.length; x++) {
                                            name = resource[x];
                                            resource_options += [
                                                '<option value="', name, '"'
                                            ].join('');
                Severity: Major
                Found in app/js-yui/building/tradeMinistry.js - About 45 mins to fix

                  Avoid deeply nested control flow statements.
                  Open

                                      if (a.extra_build_level > b.extra_build_level) {
                                        return 1;
                                      }
                                      else if (a.extra_build_level < b.extra_build_level) {
                                        return -1;
                  Severity: Major
                  Found in app/js-yui/building/theDillonForge.js - About 45 mins to fix

                    Avoid deeply nested control flow statements.
                    Open

                                                if(tiles[x] && tiles[x][y]) {
                                                    tbody.push(['<img src="',Lib.AssetUrl,'planet_side/50/',tiles[x][y],'.png" style="width:50px;height:50px;" />'].join(''));
                                                }
                    Severity: Major
                    Found in app/js-yui/messaging.js - About 45 mins to fix

                      Avoid deeply nested control flow statements.
                      Open

                                              if(nm != Game.EmpireData.name) {
                                                  to.push({name:nm});
                                              }
                      Severity: Major
                      Found in app/js-yui/messaging.js - About 45 mins to fix

                        Avoid deeply nested control flow statements.
                        Open

                                                if(oSelf.beforeDeleteEvent.fire(target)) {
                                                    delete oSelf._oTblSelections[target._value];
                                                    oSelf._elTblList.removeChild(target);
                                                    oSelf._updateDirty();
                                                }
                        Severity: Major
                        Found in app/js-yui/textboxList.js - About 45 mins to fix

                          Avoid deeply nested control flow statements.
                          Open

                                                  if (speed > 0 && speed > minSpeed) {
                                                      alert('Set speed cannot exceed the speed of the slowest ship.');
                                                      btn.disabled = false;
                                                  } else {
                                                      Game.Services.Buildings.SpacePort.send_fleet({
                          Severity: Major
                          Found in app/js-yui/mapStar.js - About 45 mins to fix

                            Avoid deeply nested control flow statements.
                            Open

                                                            if(Dom.getStyle("tradePushShipSummaryName", "display") == "none") {
                                                                Dom.setStyle("tradePushShipSummaryName", "display", "block");
                                                                this.getShipSummary();
                                                            }
                                                            else {
                            Severity: Major
                            Found in app/js-yui/building/tradeMinistry.js - About 45 mins to fix

                              Avoid deeply nested control flow statements.
                              Open

                                                          if (extra_level) {
                                                              reason = "Will build to level " + (extra_level + 1) + " for free with plan.";
                                                          }
                                                          else {
                                                              reason = "Will build for free with plan.";
                              Severity: Major
                              Found in app/js-yui/mapPlanet.js - About 45 mins to fix

                                Avoid deeply nested control flow statements.
                                Open

                                                                if(Dom.getStyle("tradeAddPlanSummaryName", "display") == "none") {
                                                                    Dom.setStyle("tradeAddPlanSummaryName", "display", "block");
                                                                    this.getPlanSummary();
                                                                }
                                                                else {
                                Severity: Major
                                Found in app/js-yui/building/tradeMinistry.js - About 45 mins to fix

                                  Avoid deeply nested control flow statements.
                                  Open

                                                                  if(Dom.getStyle("tradeAddShipSummaryName", "display") == "none") {
                                                                      Dom.setStyle("tradeAddShipSummaryName", "display", "block");
                                                                      this.getShipSummary();
                                                                  }
                                                                  else {
                                  Severity: Major
                                  Found in app/js-yui/building/tradeMinistry.js - About 45 mins to fix

                                    Avoid deeply nested control flow statements.
                                    Open

                                                            if (obj.extra_build_level > 0) {
                                                                nLi.innerHTML = ['<span class="tradeResourceName">',obj.name,' ',obj.level,'+',obj.extra_build_level, ' (<label class="quantity">', obj.quantity, '</label>)</span> <input type="text" style="width:75px;" /><button type="button">+</button>'].join('');
                                                            }
                                                            else {
                                                                nLi.innerHTML = ['<span class="tradeResourceName">',obj.name,' ',obj.level,' (<label class="quantity">', obj.quantity, '</label>)</span> <input type="text" style="width:75px;" /><button type="button">+</button>'].join('');
                                    Severity: Major
                                    Found in app/js-yui/building/tradeMinistry.js - About 45 mins to fix

                                      Avoid deeply nested control flow statements.
                                      Open

                                                              if(filter == "All") {
                                                                  shipNames.push(shipType);
                                                              }
                                                              else if(filter == "Now" && ships[shipType].can) {
                                                                  shipNames.push(shipType);
                                      Severity: Major
                                      Found in app/js-yui/building/shipyard.js - About 45 mins to fix

                                        Avoid deeply nested control flow statements.
                                        Open

                                                                for(var c=0; c<hdRow.length; c++) {
                                                                    tblOut.push("<th>");
                                                                    tblOut.push(hdRow[c]);
                                                                    tblOut.push("</th>");
                                                                }
                                        Severity: Major
                                        Found in app/js-yui/messaging.js - About 45 mins to fix
                                          Severity
                                          Category
                                          Status
                                          Source
                                          Language