Showing 509 of 1,320 total issues
Function success
has 34 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
success : _.bind(function(o) {
if (!this.chat) {
return true;
}
Consider simplifying this complex logical expression. Open
Open
if(o.result.building && this.building) {
//if we suddenly have work update the tile to add the tile. if we don't have work update the tile to remove the timer
var workChanged = (
(this.building.work && !o.result.building.work) ||
(!this.building.work && o.result.building.work) ||
Consider simplifying this complex logical expression. Open
Open
if (typeof YAHOO.lacuna.Profile == "undefined" || !YAHOO.lacuna.Profile) {
(function(){
var Lang = YAHOO.lang,
Util = YAHOO.util,
Consider simplifying this complex logical expression. Open
Open
if (typeof YAHOO.lacuna.buildings.WasteExchanger == "undefined" || !YAHOO.lacuna.buildings.WasteExchanger) {
(function(){
var Lang = YAHOO.lang,
Util = YAHOO.util,
Consider simplifying this complex logical expression. Open
Open
if (typeof YAHOO.lacuna.buildings.WasteRecycling == "undefined" || !YAHOO.lacuna.buildings.WasteRecycling) {
(function(){
var Lang = YAHOO.lang,
Util = YAHOO.util,
Consider simplifying this complex logical expression. Open
Open
if (typeof YAHOO.lacuna.Notify == "undefined" || !YAHOO.lacuna.Notify) {
(function(){
var Lang = YAHOO.lang,
Util = YAHOO.util,
Function showTiles
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
showTiles : function(refresh) {
if(this.tileCache) {
var bounds = this.bounds;
var tiles = {};
//from left to right (smaller to bigger)
Function Transmit
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
Transmit : function(e, opt) {
var btn = Event.getTarget(e);
Event.stopEvent(e);
require('js/actions/menu/loader').show();
btn.disabled = true;
Function createFind
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
createFind : function() {
this.species = Dom.get("lojDetails");
var dataSource = new Util.XHRDataSource("/empire");
dataSource.connMethodPost = "POST";
Function bhgGenerate
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
bhgGenerate : function(e) {
var oSelf = this.Self,
target = this.Target,
task = this.Task;
Function SpyAssign
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SpyAssign : function() {
require('js/actions/menu/loader').show();
var assign = this.Assign[this.Assign.selectedIndex].value;
this.Self.service.assign_spy({
Function MoveSpyShip
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
MoveSpyShip : function(e, matchedEl, tab) {
Event.stopEvent(e);
require('js/actions/menu/loader').show();
var shipId = matchedEl.parentNode.parentNode.parentNode.shipId,
spies = tab.spiesToMove,
Function WrappedService
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
WrappedService : function(method, name) {
var logNS = 'Game.RPC.' + name + '.failure';
var func = function(params, origOpts) {
var retry = function() {
var opts = { retry : 0 };
Function render
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
render : function(el) {
el = Dom.get(el);
var container = document.createElement('div');
this.container = container;
container.innerHTML = this._getHtml();
Function onDragDrop
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
onDragDrop: function(e, id) {
if (id == "archaeologyGlyphDetails") {
// The position of the cursor at the time of the drop (YAHOO.util.Point)
var pt = DDM.interactionInfo.point;
Function MineWithdraw
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
MineWithdraw : function(e) {
var btn = Event.getTarget(e);
btn.disabled = true;
if(confirm(['Are you sure you want to withdraw the trade asking for ', this.Trade.ask, ' essentia and offering ', this.Trade.offer,'?'].join(''))) {
require('js/actions/menu/loader').show();
Function success
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
success : function(o){
YAHOO.log(o, "info", "Network19.NewsGet.success");
require('js/actions/menu/loader').hide();
this.rpcSuccess(o);
Function SpyPopulate
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SpyPopulate : function() {
var details = Dom.get("spiesDetails");
if(details) {
var spies = this.spies.spies,
nDiv,
Function SplitPlan
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
SplitPlan : function() {
var selected = Lib.getSelectedOptionValue("forgeSplitPlanSelect"),
quantity = Dom.get("forgeSplitPlanQuantity").value;
if ( selected == "" ) {
Function InitLogin
has 32 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
InitLogin : function() {
if (!Lacuna.Game.LoginDialog) {
Lacuna.Game.LoginDialog = new Lacuna.Login();
Lacuna.Game.LoginDialog.subscribe('onLoginSuccessful', function(oArgs) {
var result = oArgs.result;