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

Fix small ui.

git-svn-id: http://svn.igniterealtime.org/svn/repos/wildfire/trunk@4197 b35dd754-fafc-0310-a699-88a17e54d16e
parent c75488a6
...@@ -7,6 +7,7 @@ ...@@ -7,6 +7,7 @@
*/ */
package org.jivesoftware.wildfire.update; package org.jivesoftware.wildfire.update;
import org.jivesoftware.util.Log;
import org.jivesoftware.wildfire.XMPPServer; import org.jivesoftware.wildfire.XMPPServer;
/** /**
...@@ -61,4 +62,17 @@ public class PluginDownloadManager { ...@@ -61,4 +62,17 @@ public class PluginDownloadManager {
return status; return status;
} }
public boolean updatePluginsList() {
UpdateManager updateManager = XMPPServer.getInstance().getUpdateManager();
try {
updateManager.checkForPluginsUpdates(true);
return true;
}
catch (Exception e) {
Log.error(e);
}
return false;
}
} }
...@@ -205,6 +205,20 @@ ...@@ -205,6 +205,20 @@
return message; return message;
} }
function updatePluginsList(){
document.getElementById("reloaderID").innerHTML = '<img src="images/working-16x16.gif" border="0"/>';
downloader.updatePluginsList(pluginsListUpdated);
}
function updatePluginsListNow(){
document.getElementById("reloader2").innerHTML = '<img src="images/working-16x16.gif" border="0"/>';
downloader.updatePluginsList(pluginsListUpdated);
}
function pluginsListUpdated(){
window.location.href = "available-plugins.jsp";
}
</script> </script>
</head> </head>
...@@ -219,7 +233,7 @@ ...@@ -219,7 +233,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;<a href="available-plugins.jsp?autoupdate=true"><fmt:message key="plugin.available.list" /></a> <fmt:message key="plugin.available.no.list" />&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%;">
...@@ -520,7 +534,7 @@ ...@@ -520,7 +534,7 @@
<% } else { %> <% } else { %>
<fmt:message key="plugin.available.autoupdate.off" /> <fmt:message key="plugin.available.autoupdate.off" />
<% } %> <% } %>
&nbsp;<a href="available-plugins.jsp?autoupdate=true"><fmt:message key="plugin.available.manual.update" /></a> &nbsp;<span id="reloader2"><a href="javascript:updatePluginsListNow()"><fmt:message key="plugin.available.manual.update" /></a></span>
</p> </p>
<% } %> <% } %>
......
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