Showing 509 of 1,320 total issues
Avoid deeply nested control flow statements. Open
Open
if(elListItem._oResultData && queue.indexOf(String(elListItem._oResultData.Id)) >= 0) {
this._selectItem(elListItem);
}
Avoid deeply nested control flow statements. Open
Open
for(var j = allListItemEls.length-1; j >= nItemsToShow; j--) {
extraListItem = allListItemEls[j];
extraListItem.style.display = "none";
}
Avoid deeply nested control flow statements. Open
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('');
Avoid deeply nested control flow statements. Open
Open
if(Lang.isArray(resource)) {
for(x=0; x < resource.length; x++) {
name = resource[x];
if(this.resources[name]) {
nLi = li.cloneNode(false);
Avoid deeply nested control flow statements. Open
Open
for(var key in cur) {
//if the key actually has a value count it
if(cur[key]) {
curNum++;
}
Avoid deeply nested control flow statements. Open
Open
if(!Dom.inDocument(this._elGrid)) {
document.getElementById("content").appendChild(this._elGrid);
}
Avoid deeply nested control flow statements. Open
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 {
Avoid deeply nested control flow statements. Open
Open
for(x=0; x < resource.length; x++) {
name = resource[x];
resource_options += [
'<option value="', name, '"'
].join('');
Avoid deeply nested control flow statements. Open
Open
if (a.extra_build_level > b.extra_build_level) {
return 1;
}
else if (a.extra_build_level < b.extra_build_level) {
return -1;
Avoid deeply nested control flow statements. Open
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(''));
}
Avoid deeply nested control flow statements. Open
Open
if(nm != Game.EmpireData.name) {
to.push({name:nm});
}
Avoid deeply nested control flow statements. Open
Open
if(oSelf.beforeDeleteEvent.fire(target)) {
delete oSelf._oTblSelections[target._value];
oSelf._elTblList.removeChild(target);
oSelf._updateDirty();
}
Avoid deeply nested control flow statements. Open
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({
Avoid deeply nested control flow statements. Open
Open
if(Dom.getStyle("tradePushShipSummaryName", "display") == "none") {
Dom.setStyle("tradePushShipSummaryName", "display", "block");
this.getShipSummary();
}
else {
Avoid deeply nested control flow statements. Open
Open
if (extra_level) {
reason = "Will build to level " + (extra_level + 1) + " for free with plan.";
}
else {
reason = "Will build for free with plan.";
Avoid deeply nested control flow statements. Open
Open
if(Dom.getStyle("tradeAddPlanSummaryName", "display") == "none") {
Dom.setStyle("tradeAddPlanSummaryName", "display", "block");
this.getPlanSummary();
}
else {
Avoid deeply nested control flow statements. Open
Open
if(Dom.getStyle("tradeAddShipSummaryName", "display") == "none") {
Dom.setStyle("tradeAddShipSummaryName", "display", "block");
this.getShipSummary();
}
else {
Avoid deeply nested control flow statements. Open
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('');
Avoid deeply nested control flow statements. Open
Open
if(filter == "All") {
shipNames.push(shipType);
}
else if(filter == "Now" && ships[shipType].can) {
shipNames.push(shipType);
Avoid deeply nested control flow statements. Open
Open
for(var c=0; c<hdRow.length; c++) {
tblOut.push("<th>");
tblOut.push(hdRow[c]);
tblOut.push("</th>");
}