From d0f5c2b074ab0776bf9605ccbdbe0475c72c1041 Mon Sep 17 00:00:00 2001 From: kzantow Date: Wed, 13 Apr 2016 10:22:09 -0400 Subject: [PATCH 1/2] JENKINS-34137 - better handling of the close button: not allowed while plugins installing or in certain other places, close now directs to setup complete panel, with message about skipping admin user creation --- war/src/main/js/pluginSetupWizardGui.js | 4 ++-- war/src/main/js/templates/pluginSelectionPanel.hbs | 2 +- war/src/main/js/templates/welcomePanel.hbs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/war/src/main/js/pluginSetupWizardGui.js b/war/src/main/js/pluginSetupWizardGui.js index 4177cf4eca..94342188e2 100644 --- a/war/src/main/js/pluginSetupWizardGui.js +++ b/war/src/main/js/pluginSetupWizardGui.js @@ -207,7 +207,7 @@ var createPluginSetupWizard = function(appendTarget) { decorate($container); var $modalHeader = $container.find('.modal-header'); - if($modalHeader.length > 0) { + if($modalHeader.length > 0 && $modalHeader.is('.closeable')) { $modalHeader.prepend( ''); } @@ -815,7 +815,7 @@ var createPluginSetupWizard = function(appendTarget) { '.plugin-select-recommended': function() { selectedPluginNames = pluginManager.recommendedPluginNames(); refreshPluginSelectionPanel(); }, '.plugin-show-selected': toggleSelectedSearch, '.select-category': selectCategory, - '.close': closeInstaller, + '.close': skipFirstUser, '.resume-installation': resumeInstallation, '.install-done-restart': restartJenkins, '.save-first-user:not([disabled])': saveFirstUser, diff --git a/war/src/main/js/templates/pluginSelectionPanel.hbs b/war/src/main/js/templates/pluginSelectionPanel.hbs index addd570e56..12a31294f7 100644 --- a/war/src/main/js/templates/pluginSelectionPanel.hbs +++ b/war/src/main/js/templates/pluginSelectionPanel.hbs @@ -1,4 +1,4 @@ -