Commit ae37587e authored by Derek DeMoro's avatar Derek DeMoro Committed by derek

Fixed enterprise info page.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@5572 b35dd754-fafc-0310-a699-88a17e54d16e
parent 92de87e7
...@@ -117,6 +117,12 @@ ...@@ -117,6 +117,12 @@
## Added key: 'setup.admin.settings.ldap.info' ## Added key: 'setup.admin.settings.ldap.info'
## Added key: 'setup.admin.settings.administrator' ## Added key: 'setup.admin.settings.administrator'
## Added key: 'setup.admin.settings.remove' ## Added key: 'setup.admin.settings.remove'
## Added key: 'plugin.available.no.plugin'
## Updated key: 'plugin.available.list'
## Added key: 'plugin.enterprise.download.error'
## Added key: 'plugin.enterprise.dont.show'
## Added key: 'plugin.enterprise.installing'
## Added key: 'plugin.enterprise.installed'
# Wildfire # Wildfire
...@@ -1951,7 +1957,8 @@ plugin.available.autoupdate.on = Auto update is turned on. ...@@ -1951,7 +1957,8 @@ plugin.available.autoupdate.on = Auto update is turned on.
plugin.available.autoupdate.off = Auto update is off. plugin.available.autoupdate.off = Auto update is off.
plugin.available.manual.update = Update Now. plugin.available.manual.update = Update Now.
plugin.available.no.list = The list of available plugins has not yet been downloaded. plugin.available.no.list = The list of available plugins has not yet been downloaded.
plugin.available.list = Click here to download the list plugin.available.no.plugin = Plugin information has not yet been downloaded.
plugin.available.list = Click here to download.
plugin.available.no.list.description = In order to install plugins, the list of available plugins must be download \ plugin.available.no.list.description = In order to install plugins, the list of available plugins must be download \
from Jive Software. Once the plugins have been downloaded, you may \ from Jive Software. Once the plugins have been downloaded, you may \
chooser which plugins to install. chooser which plugins to install.
...@@ -1962,6 +1969,7 @@ plugin.available.change = to change the auto-update settings. ...@@ -1962,6 +1969,7 @@ plugin.available.change = to change the auto-update settings.
plugin.available.cancel.redirect = Leaving this page will cause all downloads to cancel. Leave anyway? plugin.available.cancel.redirect = Leaving this page will cause all downloads to cancel. Leave anyway?
plugin.available.error.downloading = Unable to download plugin(s). Please try again. plugin.available.error.downloading = Unable to download plugin(s). Please try again.
# Server bytes statistics # Server bytes statistics
server_bytes.stats.incoming.name=Server Traffic server_bytes.stats.incoming.name=Server Traffic
...@@ -1989,4 +1997,10 @@ calendar.weekend = 0,6 ...@@ -1989,4 +1997,10 @@ calendar.weekend = 0,6
calendar.close = Close calendar.close = Close
calendar.today = Today calendar.today = Today
calendar.time_part = (Shift-)Click or drag to change value calendar.time_part = (Shift-)Click or drag to change value
calendar.time = Time: calendar.time = Time:
\ No newline at end of file
# Enterprise Download Page
plugin.enterprise.download.error = Unable to download the Enterprise plugin. Please try again.
plugin.enterprise.dont.show= Don't show this page again
plugin.enterprise.installing = Installing Enterprise Plugin...
plugin.enterprise.installed = Enterprise plugin installed successfully. Refreshing momentarily...
\ No newline at end of file
...@@ -189,13 +189,15 @@ public class JiveProperties implements Map<String, String> { ...@@ -189,13 +189,15 @@ public class JiveProperties implements Map<String, String> {
insertProperty(key, value); insertProperty(key, value);
} }
String result = properties.put((String)key, (String)value);
// Generate event. // Generate event.
Map<String, String> params = new HashMap<String, String>(); Map<String, String> params = new HashMap<String, String>();
params.put("value", value); params.put("value", value);
PropertyEventDispatcher.dispatchEvent(key, PropertyEventDispatcher.EventType.property_set, PropertyEventDispatcher.dispatchEvent(key, PropertyEventDispatcher.EventType.property_set,
params); params);
return properties.put((String)key, (String)value); return result;
} }
private void insertProperty(String name, String value) { private void insertProperty(String name, String value) {
......
...@@ -26,6 +26,13 @@ ...@@ -26,6 +26,13 @@
boolean downloadRequested = request.getParameter("download") != null; boolean downloadRequested = request.getParameter("download") != null;
String url = request.getParameter("url"); String url = request.getParameter("url");
boolean disable = request.getParameter("disable") != null;
if(disable){
JiveGlobals.setProperty("enterpriseInfoEnabled", "false");
response.sendRedirect("/index.jsp");
return;
}
UpdateManager updateManager = XMPPServer.getInstance().getUpdateManager(); UpdateManager updateManager = XMPPServer.getInstance().getUpdateManager();
List<AvailablePlugin> plugins = updateManager.getNotInstalledPlugins(); List<AvailablePlugin> plugins = updateManager.getNotInstalledPlugins();
...@@ -56,8 +63,9 @@ ...@@ -56,8 +63,9 @@
var downloading; var downloading;
function downloadPlugin(url, id) { function downloadPlugin(url, id) {
downloading = true; downloading = true;
document.getElementById(id + "-image").innerHTML = '<img src="images/working-16x16.gif" border="0"/>'; document.getElementById("install-button").style.display = 'none';
document.getElementById(id).style.background = "#FFFFCC"; document.getElementById("installing-button").style.display = '';
document.getElementById("installed").style.display = 'none';
setTimeout("startDownload('" + url + "','" + id + "')", 5000); setTimeout("startDownload('" + url + "','" + id + "')", 5000);
} }
...@@ -68,20 +76,23 @@ ...@@ -68,20 +76,23 @@
function downloadComplete(status) { function downloadComplete(status) {
downloading = false; downloading = false;
if (!status.successfull) { if (!status.successfull) {
document.getElementById(status.hashCode + "-image").innerHTML = '<img src="images/add-16x16.gif" border="0"/>'; document.getElementById("install-button").style.display = '';
document.getElementById(status.hashCode).style.background = "#FFFFFF"; document.getElementById("installing-button").style.display = 'none';
document.getElementById("errorMessage").style.display = ''; document.getElementById("installed").style.display = 'none';
document.getElementById(status.hashCode).style.display = ''; document.getElementById("error-message").style.display = '';
document.getElementById(status.hashCode + "-row").style.display = 'none';
setTimeout("closeErrorMessage()", 5000);
} }
else { else {
document.getElementById(status.hashCode).style.display = 'none'; document.getElementById("install-button").style.display = 'none';
document.getElementById(status.hashCode + "-row").style.display = ''; document.getElementById("installing-button").style.display = 'none';
setTimeout("fadeIt('" + status.hashCode + "')", 3000); document.getElementById("installed").style.display = '';
setTimeout("gotoEnterprise()", 5000);
} }
} }
function gotoEnterprise(){
window.location.href = "plugins/enterprise/index.jsp";
}
function closeErrorMessage(){ function closeErrorMessage(){
Effect.Fade("errorMessage"); Effect.Fade("errorMessage");
} }
...@@ -244,7 +255,7 @@ ...@@ -244,7 +255,7 @@
<%if(plugins.size() == 0){ %> <%if(plugins.size() == 0){ %>
<div style="padding:10px;background:#FFEBB5;border:1px solid #DEB24A;width:75%;"> <div style="padding:10px;background:#FFEBB5;border:1px solid #DEB24A;width:75%;">
<fmt:message key="plugin.available.no.list" />&nbsp;<span id="reloaderID"><a href="javascript:updatePluginsList();"><fmt:message key="plugin.available.list" /></a></span> <fmt:message key="plugin.available.no.plugin" />&nbsp;<span id="reloaderID"><a href="javascript:updatePluginsList();"><fmt:message key="plugin.available.list" /></a></span>
</div> </div>
<br/> <br/>
<div style="width:75%;"> <div style="width:75%;">
...@@ -264,13 +275,6 @@ ...@@ -264,13 +275,6 @@
</div> </div>
<div class="light-gray-border" style="padding:10px;">
<table cellpadding="0" cellspacing="0" border="0" width="100%">
<tr style="background:#f3f7fa;">
<td class="table-header-left">&nbsp;</td>
<td nowrap colspan="7" class="row-header">Install Enterprise Plugin</td>
</tr>
<% <%
for (AvailablePlugin plugin : plugins) { for (AvailablePlugin plugin : plugins) {
String pluginName = plugin.getName(); String pluginName = plugin.getName();
...@@ -284,43 +288,6 @@ ...@@ -284,43 +288,6 @@
continue; continue;
} }
%> %>
<tr id="<%= plugin.hashCode()%>">
<td width="1%" class="line-bottom-border">
<% if (plugin.getIcon() != null) { %>
<img src="<%= plugin.getIcon() %>" width="16" height="16" alt="Plugin">
<% }
else { %>
<img src="images/plugin-16x16.gif" width="16" height="16" alt="Plugin">
<% } %>
</td>
<td width="20%" nowrap class="line-bottom-border">
<%= (pluginName != null ? pluginName : "") %> &nbsp;
</td>
<td nowrap valign="top" class="line-bottom-border">
<% if (plugin.getReadme() != null) { %>
<a href="<%= plugin.getReadme() %>"
><img src="images/doc-readme-16x16.gif" width="16" height="16" border="0" alt="README"></a>
<% }
else { %> &nbsp; <% } %>
<% if (plugin.getChangelog() != null) { %>
<a href="<%= plugin.getChangelog() %>"
><img src="images/doc-changelog-16x16.gif" width="16" height="16" border="0" alt="changelog"></a>
<% }
else { %> &nbsp; <% } %>
</td>
<td width="60%" class="line-bottom-border">
<%= pluginDescription != null ? pluginDescription : "" %>
</td>
<td width="5%" align="center" valign="top" class="line-bottom-border">
<%= pluginVersion != null ? pluginVersion : "" %>
</td>
<td width="15%" nowrap valign="top" class="line-bottom-border">
<%= pluginAuthor != null ? pluginAuthor : "" %> &nbsp;
</td>
<td width="15%" nowrap valign="top" class="line-bottom-border">
<%= fileSize %>
</td>
<td width="1%" align="center" valign="top" class="line-bottom-border">
<% <%
String updateURL = plugin.getURL(); String updateURL = plugin.getURL();
if (updateManager.isPluginDownloaded(updateURL)) { if (updateManager.isPluginDownloaded(updateURL)) {
...@@ -329,62 +296,27 @@ ...@@ -329,62 +296,27 @@
<% } <% }
else { %> else { %>
<span id="<%= plugin.hashCode() %>-image"><a href="javascript:downloadPlugin('<%=updateURL%>', '<%= plugin.hashCode()%>')"><img src="images/add-16x16.gif" width="16" height="16" border="0" <div id="error-message" class="error" style="display:none;">
alt="<fmt:message key="plugin.available.download" />"></a></span> <fmt:message key="plugin.enterprise.download.error" />
<% } %> </div>
</td>
</tr>
<tr id="<%= plugin.hashCode()%>-row" style="display:none;background: #E7FBDE;">
<td width="1%" class="line-bottom-border">
<img src="<%= plugin.getIcon()%>" width="16" height="16"/>
</td>
<td colspan="6" nowrap class="line-bottom-border"><%= plugin.getName()%> <fmt:message key="plugin.available.installation.success" /></td>
<td class="line-bottom-border" align="center">
<img src="images/success-16x16.gif" height="16" width="16"/>
</td>
</tr>
<%
}
%>
</table>
</div>
<%
String time = JiveGlobals.getProperty("update.lastCheck");
if(time != null){
Date date = new Date(Long.parseLong(time));
time = JiveGlobals.formatDate(date);
}
%>
<p style="font-size: 8pt; padding: 4px 0px 10px 0px;">
<% if(time != null) { %>
Last checked for an updated version <%= time%>.
<% } %>
&nbsp;<span id="reloader2"><a href="javascript:updatePluginsListNow()"><fmt:message key="plugin.available.manual.update" /></a></span>
</p>
<% } %>
<div class="jive-enterprise-info-install">
<a href="#" class="jive-enterprise-info-install-btn">Install Enterprise Plugin</a>
<p>Version 3.0.1 - 3.9 MB<br>
<a href="#">Readme</a> &nbsp;|&nbsp; <a href="#">Changelog</a></p>
<div class="jive-enterprise-info-close"><a href="#">Don't Show This Again</a></div>
</div>
<div class="jive-enterprise-info-wait"> <div id="install-button" class="jive-enterprise-info-install">
<img src="images/wait24trans.gif" alt="" align="left"> <strong>Installing Enterprise Plugin...</strong> <a href="javascript:downloadPlugin('<%=updateURL%>', '<%= plugin.hashCode()%>')" class="jive-enterprise-info-install-btn">Install Enterprise Plugin</a>
</div> <p>Version <%= pluginVersion%> - <%= fileSize%><br>
<a href="<%=plugin.getReadme()%>" target=_blank>Readme</a> &nbsp;|&nbsp; <a href="<%= plugin.getChangelog()%>" target=_blank>ChangeLog</a></p>
<div class="jive-enterprise-info-close"><a href="enterprise-info.jsp?disable=true"><fmt:message key="plugin.enterprise.dont.show" /></a></div>
</div>
<div class="jive-enterprise-info-success">
<strong>Enterprise plugin installed successfully</strong> Please [insert instructions here]
</div>
<div id="installing-button" class="jive-enterprise-info-wait" style="display:none;">
<img src="images/wait24trans.gif" alt="" align="left"> <strong><fmt:message key="plugin.enterprise.installing" /></strong>
</div>
<div id="installed" class="jive-enterprise-info-success" style="display:none;">
<strong><fmt:message key="plugin.enterprise.installed" /></strong>
</div>
<% } } } %>
</body> </body>
</html> </html>
\ No newline at end of file
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