提交 1fe92556 编写于 作者: M Manuel Recena 提交者: Oleg Nenashev

[JENKINS-35020] Fixed some JSHint errors (#2368)

* [JENKINS-35020] Fixed some JSHint errors

* [JENKINS-35020] @kzantow's comment was addressed

* [JENKINS-35020] @kzantow's comment was addressed
上级 02e4bc51
......@@ -427,7 +427,7 @@ var createPluginSetupWizard = function(appendTarget) {
};
// Define actions
var showInstallProgress = function(state) {
var showInstallProgress = function() {
// check for installing plugins that failed
if(failedPluginNames.length > 0) {
setPanel(pluginSuccessPanel, { installingPlugins : installingPlugins, failedPlugins: true });
......@@ -525,7 +525,7 @@ var createPluginSetupWizard = function(appendTarget) {
}
// keep polling while install is running
if(complete < total || data.state == 'INITIAL_PLUGINS_INSTALLING') {
if(complete < total || data.state === 'INITIAL_PLUGINS_INSTALLING') {
setPanel(progressPanel, { installingPlugins : installingPlugins });
// wait a sec
setTimeout(updateStatus, 250);
......@@ -795,7 +795,7 @@ var createPluginSetupWizard = function(appendTarget) {
}
try {
if(JSON.parse(data).status == 'ok') {
if(JSON.parse(data).status === 'ok') {
showStatePanel();
return;
}
......@@ -950,7 +950,8 @@ var createPluginSetupWizard = function(appendTarget) {
// Process extensions
var extensionTranslationOverrides = [];
if ('undefined' != typeof(setupWizardExtensions)) {
/* globals setupWizardExtensions: true */
if ('undefined' !== typeof(setupWizardExtensions)) {
$.each(setupWizardExtensions, function() {
this.call(self, {
'$': $,
......
/* globals onSetupWizardInitialized: true */
onSetupWizardInitialized(function(wizard) {
var $ = wizard.$; // jQuery
var jenkins = wizard.jenkins; // wizard-provided jenkins api
var pluginManager = wizard.pluginManager;
var upgradePanel = require('./templates/upgradePanel.hbs');
var upgradeSuccessPanel = require('./templates/upgradeSuccessPanel.hbs');
var upgradeSkippedPanel = require('./templates/upgradeSkippedPanel.hbs');
wizard.addActions({
'.skip-recommended-plugins': function() {
wizard.setPanel(upgradeSkippedPanel);
......@@ -15,7 +15,7 @@ onSetupWizardInitialized(function(wizard) {
jenkins.goTo('/setupWizard/installState/UPGRADE/hideUpgradeWizard');
}
});
wizard.addStateHandlers({
UPGRADE: function() {
wizard.loadPluginCategories(function(){
......
......@@ -193,12 +193,13 @@ exports.loadTranslations = function(bundleName, handler, onError) {
}
throw 'Unable to load localization data: ' + res.message;
}
var translations = res.data;
if('undefined' !== typeof(Proxy)) {
/* globals Proxy: true */
if('undefined' !== typeof Proxy) {
translations = new Proxy(translations, {
get: function(target, property, receiver) {
get: function(target, property) {
if(property in target) {
return target[property];
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册