From 74b717cfc29873b60d9038548026cfb2db33302c Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Sat, 25 May 2013 10:45:48 +0200 Subject: [PATCH] fix some js warnings --- .../resources/sonia/scm/hg.config-wizard.js | 18 +++++++++--------- .../src/main/resources/sonia/scm/hg.config.js | 8 ++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config-wizard.js b/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config-wizard.js index 6eff386b39..5c867b8830 100644 --- a/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config-wizard.js +++ b/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config-wizard.js @@ -62,7 +62,7 @@ Sonia.hg.ConfigWizard = Ext.extend(Ext.Window,{ } } }] - } + }; Ext.apply(this, Ext.apply(this.initialConfig, config)); Sonia.hg.ConfigWizard.superclass.initComponent.apply(this, arguments); @@ -292,7 +292,7 @@ Sonia.hg.ConfigWizardPanel = Ext.extend(Ext.Panel,{ } }] }] - } + }; Ext.apply(this, Ext.apply(this.initialConfig, config)); Sonia.hg.ConfigWizardPanel.superclass.initComponent.apply(this, arguments); @@ -315,12 +315,12 @@ Sonia.hg.ConfigWizardPanel = Ext.extend(Ext.Panel,{ var next = -1; - if ( id == 'cod' && direction == 1 ){ + if ( id === 'cod' && direction === 1 ){ var v = Ext.getCmp('configureOrDownload').getValue().getRawValue(); var df = false; - if ( v == 'localInstall' ){ + if ( v === 'localInstall' ){ next = 1; - } else if ( v == 'remoteInstall' ){ + } else if ( v === 'remoteInstall' ){ next = 2; df = true; } @@ -328,7 +328,7 @@ Sonia.hg.ConfigWizardPanel = Ext.extend(Ext.Panel,{ Ext.getCmp('move-next').setDisabled(true); Ext.getCmp('finish').setDisabled(df); } - else if (direction == -1 && (id == 'localInstall' || id == 'remoteInstall')) { + else if (direction === -1 && (id === 'localInstall' || id === 'remoteInstall')) { next = 0; Ext.getCmp('move-prev').setDisabled(true); Ext.getCmp('move-next').setDisabled(false); @@ -342,9 +342,9 @@ Sonia.hg.ConfigWizardPanel = Ext.extend(Ext.Panel,{ applyChanges: function(){ var v = Ext.getCmp('configureOrDownload').getValue().getRawValue(); - if ( v == 'localInstall' ){ + if ( v === 'localInstall' ){ this.applyLocalConfiguration(); - } else if ( v == 'remoteInstall' ){ + } else if ( v === 'remoteInstall' ){ this.applyRemoteConfiguration(); } }, @@ -427,7 +427,7 @@ Ext.reg('hgConfigWizardPanel', Sonia.hg.ConfigWizardPanel); // i18n -if ( i18n != null && i18n.country == 'de' ){ +if ( i18n && i18n.country === 'de' ){ Ext.override(Sonia.hg.ConfigWizardPanel, { diff --git a/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js b/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js index 9ea80a51b3..f8aa46e0a8 100644 --- a/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js +++ b/scm-plugins/scm-hg-plugin/src/main/resources/sonia/scm/hg.config.js @@ -121,7 +121,7 @@ Sonia.hg.ConfigPanel = Ext.extend(Sonia.config.ConfigForm, { }); wizard.on('finish', function(config){ var self = Ext.getCmp('hgConfigForm'); - if ( config != null ){ + if ( config ){ if (debug){ console.debug( 'load config from wizard and submit to server' ); } @@ -137,7 +137,7 @@ Sonia.hg.ConfigPanel = Ext.extend(Sonia.config.ConfigForm, { }, scope: this }] - } + }; Ext.apply(this, Ext.apply(this.initialConfig, config)); Sonia.hg.ConfigPanel.superclass.initComponent.apply(this, arguments); @@ -193,7 +193,7 @@ Ext.reg("hgConfigPanel", Sonia.hg.ConfigPanel); // i18n -if ( i18n != null && i18n.country == 'de' ){ +if ( i18n && i18n.country === 'de' ){ Ext.override(Sonia.hg.ConfigPanel, { @@ -251,7 +251,7 @@ Sonia.repository.typeIcons['hg'] = 'resources/images/icons/16x16/mercurial.png'; Ext.override(Sonia.repository.ChangesetViewerGrid, { isMercurialRepository: function(){ - return this.repository.type == 'hg'; + return this.repository.type === 'hg'; }, getChangesetId: function(id, record){