diff --git a/config/alfresco/messages/office-addin.properties b/config/alfresco/messages/office-addin.properties
index 1181a8a1ab..ae9df10fe1 100644
--- a/config/alfresco/messages/office-addin.properties
+++ b/config/alfresco/messages/office-addin.properties
@@ -11,7 +11,7 @@ office.title.document_tags=Document Tags
# Help
office.help.title=Online Help
-office.help.url=http://www.alfresco.com/help/34/community/msaddin/
+office.help.url=http://www.alfresco.com/help/{0}{1}/{2}/msaddin/
# Headers and Subheaders
office.header.my_checked_out_documents=My Checked Out Documents
diff --git a/config/alfresco/web-client-config.xml b/config/alfresco/web-client-config.xml
index dd6c9d94a9..89d4584109 100644
--- a/config/alfresco/web-client-config.xml
+++ b/config/alfresco/web-client-config.xml
@@ -72,7 +72,7 @@
false
- http://www.alfresco.com/help/34/community/ecmexplorerhelp/
+ http://www.alfresco.com/help/{version.major}{version.minor}/{version.edition}/ecmexplorerhelp/
diff --git a/source/java/org/alfresco/web/bean/NavigationBean.java b/source/java/org/alfresco/web/bean/NavigationBean.java
index 906f83f5e8..c5ba2442a6 100644
--- a/source/java/org/alfresco/web/bean/NavigationBean.java
+++ b/source/java/org/alfresco/web/bean/NavigationBean.java
@@ -25,6 +25,8 @@ import java.util.Enumeration;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
import javax.faces.context.FacesContext;
import javax.faces.event.ActionEvent;
@@ -52,6 +54,7 @@ import org.alfresco.service.cmr.search.SearchService;
import org.alfresco.service.cmr.security.AccessStatus;
import org.alfresco.service.cmr.security.MutableAuthenticationService;
import org.alfresco.service.cmr.security.PermissionService;
+import org.alfresco.service.descriptor.Descriptor;
import org.alfresco.service.namespace.NamespaceService;
import org.alfresco.web.app.Application;
import org.alfresco.web.app.context.UIContextService;
@@ -498,7 +501,30 @@ public class NavigationBean implements Serializable
*/
public void setHelpUrl(String helpUrl)
{
- this.helpUrl = helpUrl;
+ if (this.helpUrl == null)
+ {
+ Descriptor serverDescriptor = Repository.getServiceRegistry(FacesContext.getCurrentInstance()).getDescriptorService().getServerDescriptor();
+ // search / replace each available key occurrence in the template string
+ // Note: server descriptor is looking for "version.major", "version.minor", etc.
+ Pattern p = Pattern.compile("\\{(\\w+\\.?\\w+)\\}");
+ Matcher m = p.matcher(helpUrl);
+ boolean result = m.find();
+ if (result)
+ {
+ StringBuffer sb = new StringBuffer();
+ String value = null;
+ do
+ {
+ value = serverDescriptor.getDescriptor(m.group(1));
+ m.appendReplacement(sb, value != null ? value.toLowerCase() : m.group(1));
+ result = m.find();
+ } while (result);
+ m.appendTail(sb);
+ helpUrl = sb.toString();
+ }
+
+ this.helpUrl = helpUrl;
+ }
}
/**
@@ -1047,7 +1073,7 @@ public class NavigationBean implements Serializable
/* package */ void initFromClientConfig()
{
this.clientConfig = Application.getClientConfig(FacesContext.getCurrentInstance());
- this.helpUrl = clientConfig.getHelpUrl();
+ this.setHelpUrl(clientConfig.getHelpUrl());
this.shelfExpanded = clientConfig.isShelfVisible();
}
diff --git a/source/web/scripts/office/navigation.js b/source/web/scripts/office/navigation.js
index 0904c15891..89e9b294f1 100644
--- a/source/web/scripts/office/navigation.js
+++ b/source/web/scripts/office/navigation.js
@@ -14,7 +14,6 @@ var OfficeNavigation =
init: function()
{
- $('overlayPanel').setStyle('opacity', 0);
OfficeNavigation.setupToggles();
OfficeNavigation.setupCreateSpace();
OfficeNavigation.getDocumentNames();
@@ -24,7 +23,6 @@ var OfficeNavigation =
{
OfficeNavigation.showCreateSpace();
}
-
},
setupToggles: function()
diff --git a/source/web/scripts/office/office_addin.js b/source/web/scripts/office/office_addin.js
index ceed520e51..dc3b6535a6 100644
--- a/source/web/scripts/office/office_addin.js
+++ b/source/web/scripts/office/office_addin.js
@@ -11,6 +11,8 @@ var OfficeAddin =
init: function()
{
+ $('overlayPanel').setStyle('opacity', 0);
+
window.queryObject = OfficeAddin.toQueryObject(document.location.search);
window.contextPath = OfficeAddin.getContextPath();
window.serviceContextPath = OfficeAddin.getServiceContextPath();