Commit c4f7b688 authored by Matt Tucker's avatar Matt Tucker Committed by matt

Updating setup tool to work better for back button usage.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4844 b35dd754-fafc-0310-a699-88a17e54d16e
parent 882d1d51
......@@ -34,6 +34,7 @@
sidebar = "true";
}
boolean showSidebar = Boolean.parseBoolean(sidebar);
int currentStep = decoratedPage.getIntProperty("meta.currentStep");
%>
<%!
......@@ -110,35 +111,8 @@
<!-- BEGIN jive-sidebar -->
<div id="jive-sidebar">
<% if (showSidebar) { %>
<%!
final String INCOMPLETE = "incomplete";
final String IN_PROGRESS = "in_progress";
final String DONE = "done";
%>
<% // Get sidebar values from the session:
String step1 = (String)session.getAttribute("jive.setup.sidebar.1");
String step2 = (String)session.getAttribute("jive.setup.sidebar.2");
String step3 = (String)session.getAttribute("jive.setup.sidebar.3");
String step4 = (String)session.getAttribute("jive.setup.sidebar.4");
String step5 = (String)session.getAttribute("jive.setup.sidebar.5");
if (step1 == null) { step1 = IN_PROGRESS; }
if (step2 == null) { step2 = INCOMPLETE; }
if (step3 == null) { step3 = INCOMPLETE; }
if (step4 == null) { step4 = INCOMPLETE; }
if (step5 == null) { step5 = INCOMPLETE; }
int currentStep = 1;
if (step1.equals(DONE)) { currentStep = 2; }
if (step2.equals(DONE)) { currentStep = 3; }
if (step3.equals(DONE)) { currentStep = 4; }
if (step4.equals(DONE)) { currentStep = 5; }
if (step5.equals(DONE)) { currentStep = 6; }
String[] items = {step1, step2, step3, step4, step5};
String[] names = {
<% if (showSidebar) {
String[] names = {
LocaleUtils.getLocalizedString("setup.sidebar.language"),
LocaleUtils.getLocalizedString("setup.sidebar.settings"),
LocaleUtils.getLocalizedString("setup.sidebar.datasource"),
......@@ -156,10 +130,10 @@
<div class="jive-sidebar-group">
<strong><fmt:message key="setup.sidebar.title" /></strong>
<ul>
<% for (int i=0; i<items.length; i++) { %>
<% if (INCOMPLETE.equals(items[i])) { %>
<% for (int i=0; i<names.length; i++) { %>
<% if (currentStep < i) { %>
<li><%= names[i] %></li>
<% } else if (IN_PROGRESS.equals(items[i])) { %>
<% } else if (currentStep == i) { %>
<li class="jiveCurrent"><%= names[i] %></li>
<% } else { %>
<li class="jiveComplete"><!--<a href="<%= links[i] %>">--><%= names[i] %></li>
......
src/web/images/setup_sidebar_progress1.gif

267 Bytes | W: | H:

src/web/images/setup_sidebar_progress1.gif

331 Bytes | W: | H:

src/web/images/setup_sidebar_progress1.gif
src/web/images/setup_sidebar_progress1.gif
src/web/images/setup_sidebar_progress1.gif
src/web/images/setup_sidebar_progress1.gif
  • 2-up
  • Swipe
  • Onion skin
src/web/images/setup_sidebar_progress2.gif

331 Bytes | W: | H:

src/web/images/setup_sidebar_progress2.gif

351 Bytes | W: | H:

src/web/images/setup_sidebar_progress2.gif
src/web/images/setup_sidebar_progress2.gif
src/web/images/setup_sidebar_progress2.gif
src/web/images/setup_sidebar_progress2.gif
  • 2-up
  • Swipe
  • Onion skin
src/web/images/setup_sidebar_progress3.gif

351 Bytes | W: | H:

src/web/images/setup_sidebar_progress3.gif

372 Bytes | W: | H:

src/web/images/setup_sidebar_progress3.gif
src/web/images/setup_sidebar_progress3.gif
src/web/images/setup_sidebar_progress3.gif
src/web/images/setup_sidebar_progress3.gif
  • 2-up
  • Swipe
  • Onion skin
src/web/images/setup_sidebar_progress4.gif

372 Bytes | W: | H:

src/web/images/setup_sidebar_progress4.gif

377 Bytes | W: | H:

src/web/images/setup_sidebar_progress4.gif
src/web/images/setup_sidebar_progress4.gif
src/web/images/setup_sidebar_progress4.gif
src/web/images/setup_sidebar_progress4.gif
  • 2-up
  • Swipe
  • Onion skin
src/web/images/setup_sidebar_progress5.gif

377 Bytes | W: | H:

src/web/images/setup_sidebar_progress5.gif

284 Bytes | W: | H:

src/web/images/setup_sidebar_progress5.gif
src/web/images/setup_sidebar_progress5.gif
src/web/images/setup_sidebar_progress5.gif
src/web/images/setup_sidebar_progress5.gif
  • 2-up
  • Swipe
  • Onion skin
......@@ -50,9 +50,6 @@
}
else {
JiveGlobals.setLocale(newLocale);
// update the sidebar status
session.setAttribute("jive.setup.sidebar.1","done");
session.setAttribute("jive.setup.sidebar.2","in_progress");
// redirect
response.sendRedirect("setup-host-settings.jsp");
return;
......@@ -66,6 +63,7 @@
<html>
<head>
<title><fmt:message key="setup.index.title" /></title>
<meta name="currentStep" content="0"/>
</head>
<body>
......
......@@ -28,8 +28,6 @@
<%! // Global vars, methods, etc
void setSetupFinished(HttpSession session) {
JiveGlobals.setXMLProperty("setup","true");
// update the sidebar status
session.setAttribute("jive.setup.sidebar.4","done");
}
%>
......@@ -101,7 +99,8 @@
%>
<html>
<head>
<title><fmt:message key="setup.admin.settings.account" /></title>
<title><fmt:message key="setup.admin.settings.account" /></title>
<meta name="currentStep" content="4"/>
</head>
<body>
......
......@@ -120,10 +120,7 @@
DbConnectionManager.setConnectionProvider(conProvider);
// Try to establish a connection to the datasource
if (testConnection(errors)) {
// update the sidebar status
session.setAttribute("jive.setup.sidebar.3","done");
session.setAttribute("jive.setup.sidebar.4","in_progress");
// All good, so redirect
// Finished, so redirect
response.sendRedirect("setup-admin-settings.jsp");
return;
}
......@@ -134,8 +131,8 @@
<html>
<head>
<title><fmt:message key="setup.datasource.jndi.setting" /></title>
<meta name="currentStep" content="2"/>
</head>
<body>
<p class="jive-setup-page-header">
......
......@@ -106,9 +106,6 @@
ConnectionProvider conProvider = new EmbeddedConnectionProvider();
DbConnectionManager.setConnectionProvider(conProvider);
if (testConnection(errors)) {
// Update the sidebar status
session.setAttribute("jive.setup.sidebar.3","done");
session.setAttribute("jive.setup.sidebar.4","in_progress");
// Redirect
response.sendRedirect("setup-profile-settings.jsp");
return;
......@@ -131,7 +128,8 @@
<html>
<head>
<title><fmt:message key="setup.datasource.settings.title" /></title>
<title><fmt:message key="setup.datasource.settings.title" /></title>
<meta name="currentStep" content="2"/>
</head>
<body>
......
......@@ -153,9 +153,6 @@
// No errors setting the properties, so test the connection
DbConnectionManager.setConnectionProvider(conProvider);
if (testConnection(errors)) {
// Update the sidebar status
session.setAttribute("jive.setup.sidebar.3","done");
session.setAttribute("jive.setup.sidebar.4","in_progress");
// Success, move on
response.sendRedirect("setup-profile-settings.jsp");
return;
......@@ -195,7 +192,8 @@
<html>
<head>
<title><fmt:message key="setup.datasource.standard.title" /></title>
<title><fmt:message key="setup.datasource.standard.title" /></title>
<meta name="currentStep" content="2"/>
</head>
<body>
......
......@@ -39,7 +39,7 @@
<html>
<head>
<title><fmt:message key="setup.finished.title" /></title>
<meta name="currentStep" content="5"/>
</head>
<body>
......
......@@ -73,11 +73,7 @@
xmlSettings.put("adminConsole.securePort",Integer.toString(securePort));
session.setAttribute("xmlSettings", xmlSettings);
// update the sidebar status
session.setAttribute("jive.setup.sidebar.2","done");
session.setAttribute("jive.setup.sidebar.3","in_progress");
// successful, so redirect
// Successful, so redirect
response.sendRedirect("setup-datasource-settings.jsp");
return;
}
......@@ -99,7 +95,8 @@
<html>
<head>
<title><fmt:message key="setup.host.settings.title" /></title>
<title><fmt:message key="setup.host.settings.title" /></title>
<meta name="currentStep" content="1"/>
</head>
<body>
......
......@@ -30,9 +30,6 @@
boolean next = request.getParameter("continue") != null;
if (next) {
// Update the sidebar status
session.setAttribute("jive.setup.sidebar.4","done");
session.setAttribute("jive.setup.sidebar.5","in_progress");
// Redirect
response.sendRedirect("setup-admin-settings.jsp");
return;
......@@ -40,7 +37,8 @@
%>
<html>
<head>
<title>Profile Settings</title>
<title>Profile Settings</title>
<meta name="currentStep" content="3"/>
</head>
<body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment