diff --git a/source/java/org/alfresco/web/bean/NavigationBean.java b/source/java/org/alfresco/web/bean/NavigationBean.java index 6f5b3bcf64..f6ed81f1f2 100644 --- a/source/java/org/alfresco/web/bean/NavigationBean.java +++ b/source/java/org/alfresco/web/bean/NavigationBean.java @@ -675,7 +675,10 @@ public class NavigationBean implements Serializable { if (this.currentNodeId == null) { - throw new AlfrescoRuntimeException("Cannot retrieve current Node if NodeId is null!"); + // handle the possibility that we have no current location + // this is possible in cluster fail-over or due to a missing node + // default back to the current toolbar root location + this.processToolbarLocation(this.getToolbarLocation(), false); } if (s_logger.isDebugEnabled()) @@ -696,7 +699,7 @@ public class NavigationBean implements Serializable } catch (InvalidNodeRefException refErr) { - FacesContext fc = FacesContext.getCurrentInstance(); + FacesContext fc = FacesContext.getCurrentInstance(); Utils.addErrorMessage(MessageFormat.format(Application.getMessage( fc, ERROR_DELETED_FOLDER), new Object[] {this.currentNodeId}) ); @@ -715,10 +718,13 @@ public class NavigationBean implements Serializable SharedDeviceList shares = filesysConfig.getShares(); Enumeration shareEnum = shares.enumerateShares(); - while ( shareEnum.hasMoreElements() && diskShare == null) { - SharedDevice curShare = shareEnum.nextElement(); - if ( curShare.getContext() instanceof ContentContext) - diskShare = (DiskSharedDevice) curShare; + while (shareEnum.hasMoreElements() && diskShare == null) + { + SharedDevice curShare = shareEnum.nextElement(); + if (curShare.getContext() instanceof ContentContext) + { + diskShare = (DiskSharedDevice)curShare; + } } if (diskShare != null) diff --git a/source/web/jsp/rules/compare-date-property.jsp b/source/web/jsp/rules/compare-date-property.jsp index 9a6c72c629..a1a6010b43 100644 --- a/source/web/jsp/rules/compare-date-property.jsp +++ b/source/web/jsp/rules/compare-date-property.jsp @@ -35,38 +35,39 @@ diff --git a/source/web/jsp/users/invite-users-wizard/notify.jsp b/source/web/jsp/users/invite-users-wizard/notify.jsp index 3efd9b5295..9d19f747e7 100644 --- a/source/web/jsp/users/invite-users-wizard/notify.jsp +++ b/source/web/jsp/users/invite-users-wizard/notify.jsp @@ -35,6 +35,7 @@ window.onload = pageLoaded; var okEnabled; + var notifyEnabled = false; function pageLoaded() { @@ -47,22 +48,31 @@ { if (okEnabled) { - if (document.getElementById("wizard:wizard-body:subject").value.length == 0) + if (document.getElementById("wizard:wizard-body:subject").value.length > 0 || + !notifyEnabled) { - document.getElementById("wizard:finish-button").disabled = true; + document.getElementById("wizard:finish-button").disabled = false; + document.getElementById("wizard:next-button").disabled = false; } else { - document.getElementById("wizard:finish-button").disabled = false; + document.getElementById("wizard:finish-button").disabled = true; + document.getElementById("wizard:next-button").disabled = true; + } } } + + function checkNotify(notify) + { + notifyEnabled = notify.value == "yes"; + checkButtonState(); } - + diff --git a/source/web/jsp/wcm/create-website-wizard/notify.jsp b/source/web/jsp/wcm/create-website-wizard/notify.jsp index f4de46e2ad..0244c51649 100644 --- a/source/web/jsp/wcm/create-website-wizard/notify.jsp +++ b/source/web/jsp/wcm/create-website-wizard/notify.jsp @@ -35,11 +35,14 @@ window.onload = pageLoaded; var okEnabled; + var notifyEnabled = false; function pageLoaded() { document.getElementById("wizard:wizard-body:subject").focus(); okEnabled = !document.getElementById("wizard:finish-button").disabled; + var radio = document.forms[0].elements["wizard:wizard-body:notify"]; + notifyEnabled = radio[0].checked; checkButtonState(); } @@ -47,22 +50,32 @@ { if (okEnabled) { - if (document.getElementById("wizard:wizard-body:subject").value.length == 0) + if (document.getElementById("wizard:wizard-body:subject").value.length > 0 || + !notifyEnabled) { - document.getElementById("wizard:finish-button").disabled = true; + document.getElementById("wizard:finish-button").disabled = false; + document.getElementById("wizard:next-button").disabled = false; } else { - document.getElementById("wizard:finish-button").disabled = false; + document.getElementById("wizard:finish-button").disabled = true; + document.getElementById("wizard:next-button").disabled = true; } } } + + function checkNotify(notify) + { + notifyEnabled = notify.value == "yes"; + checkButtonState(); + } + - + @@ -80,7 +93,7 @@ - +