Showing 509 of 1,320 total issues
Function success
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
success : function(o){
YAHOO.log(o, "info", "PlanetaryCommand.abandon.success");
this.rpcSuccess(o);
delete Game.EmpireData.planets[cp.id]; // Remove the abandoned planet
Function getAvailableTrades
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
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");
Function MineWithdraw
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
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(""),
Function ViewData
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
ViewData : function(id, url, callback, x, y) {
var BuildingServ = Game.Services.Buildings.Generic,
data = {
session_id: Game.GetSession(""),
building_id: id
Function MakePlan
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
MakePlan : function() {
var plan_class = Lib.getSelectedOptionValue("forgeMakePlanSelect"),
level = Dom.get("forgeMakePlanLevel").value;
if ( plan_class == "" ) {
Function parseReason
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
parseReason : function(reason, defReason) {
var output = "";
if(reason) {
if(Lang.isArray(reason)) {
switch(reason[0]) {
Function GetProbes
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
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}, {
Function onTickerTick
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onTickerTick : function() {
var body = clone(this.state);
var tickIncoming = function(ship) {
Function populatePushShipName
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
populatePushShipName : function() {
var elm = Dom.get("tradePushShipName"),
li = document.createElement("li"), nLi;
if(elm) {
Function _getPlanTab
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
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">',
Function populateAddShipName
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
populateAddShipName : function() {
var elm = Dom.get("tradeAddShipName"),
li = document.createElement("li"), nLi;
if(elm) {
Function _createActionIcon
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_createActionIcon : function() {
if(this.actionIcon) {
if(this.data) {
if (Game.GetCookieSettings("showLevels","0") == "1") {
Dom.setStyle(this.actionIcon, "visibility", "visible");
Function success
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
success : function(o){
this.rpcSuccess(o);
for(var i=0; i<lis.length; i++) {
if(lis[i].Object) {
Function populateSearch
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
populateSearch : function() {
var sel = Dom.get("archaeologyOre");
if(sel && this.ore){
sel.options.length = 0;
var opt = document.createElement("option"),
Function _getPropsTab
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
_getPropsTab : function() {
var tab = new YAHOO.widget.Tab({ label: "Propositions", content: [
'<div>',
' <div style="overflow:auto;"><ul id="propsDetails"></ul></div>',
'</div>'
Function buildLevels
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
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 [
Function spiesView
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
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}, {
Function prisonersView
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
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}, {
Function LotteryPopulate
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
LotteryPopulate : function(options) {
var details = Dom.get("entertainmentLotteryList");
if(details) {
var li = document.createElement("li");
Function CreateAlliance
has 27 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
CreateAlliance : function() {
var data = {
session_id: Game.GetSession(""),
building_id: this.building.id,
name: Dom.get("embassyCreateName").value