Skip to content
This repository has been archived by the owner on Nov 9, 2017. It is now read-only.

Commit

Permalink
Merge commit '57a4555240779f1dd6f8b917bf1528b049d4d475' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
Zanata Build Server committed Dec 2, 2015
2 parents 0f8de1b + 57a4555 commit 13f6b4c
Show file tree
Hide file tree
Showing 9 changed files with 51 additions and 19 deletions.
3 changes: 3 additions & 0 deletions docs/release-notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@
* [ZNTA-811](https://zanata.atlassian.net/browse/ZNTA-811) - Downloaded translated .pot file has no extension
* [ZNTA-726](https://zanata.atlassian.net/browse/ZNTA-726) - leading/trailing newline validation should not check the line numbers

* [ZNTA-818](https://zanata.atlassian.net/browse/ZNTA-818) - 'SHOW' does not work while changing password in the Settings twice

* [ZNTA-813](https://zanata.atlassian.net/browse/ZNTA-813) - Add tooltip for disabled account
* [ZNTA-814](https://zanata.atlassian.net/browse/ZNTA-814) - handle enter key in inactive account page

-----------------------

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public HomePage clickResendActivationEmail() {
}

public InactiveAccountPage enterNewEmail(String email) {
enterText(readyElement(By.id("inactiveAccountForm:email:input:email"))
enterText(readyElement(By.id("inactiveAccountForm:email:input:emailInput"))
, email);
return new InactiveAccountPage(getDriver());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public class DashboardAccountTab extends DashboardBasePage {
private By updateEmailButton = By.id("email-update-form:updateEmailButton");
private By oldPasswordField = By.id("passwordChangeForm:oldPasswordField:input:oldPassword");
private By newPasswordField = By.id("passwordChangeForm:newPasswordField:input:newPassword");
private By changePasswordButton = By.id("passwordChangeForm:changePasswordButton");
private By changePasswordButton = By.cssSelector("button[id^='passwordChangeForm:changePasswordButton']");

public DashboardAccountTab(WebDriver driver) {
super(driver);
Expand Down
1 change: 1 addition & 0 deletions zanata-war/src/main/resources/messages.properties
Original file line number Diff line number Diff line change
Expand Up @@ -1055,6 +1055,7 @@ jsf.Enabled=Enabled
jsf.AreYouSureYouWishToDeleteThisUserThisActionCannotBeUndone=Are you sure you wish to delete this user? This action cannot be undone.
jsf.UserManager.delete.constraintViolation.error=This user cannot be removed from the system. You can deactivate the user instead.
jsf.AccountEnabled=Account enabled
jsf.account.disable.tooltip=Account is not enabled
jsf.account.notFound=No account found.
jsf.account.notActivated=Account is not activated.

Expand Down
14 changes: 9 additions & 5 deletions zanata-war/src/main/webapp-jboss/WEB-INF/web.xml
Original file line number Diff line number Diff line change
Expand Up @@ -139,9 +139,10 @@
</listener>


<listener>
<listener-class>net.bull.javamelody.SessionListener</listener-class>
</listener>
<!-- This is already declared in the web-fragment.xml in javamelody's jar: -->
<!--<listener>-->
<!--<listener-class>net.bull.javamelody.SessionListener</listener-class>-->
<!--</listener>-->

<!-- Seam -->

Expand Down Expand Up @@ -189,11 +190,14 @@

<!--java melody for monitoring stats-->
<filter>
<filter-name>monitoring</filter-name>
<!-- This name must match the web-fragment.xml in javamelody's jar,
so that we can override it. -->
<filter-name>javamelody</filter-name>
<filter-class>org.zanata.seam.interceptor.MonitoringWrapper</filter-class>
<!--<async-supported>true</async-supported>-->
</filter>
<filter-mapping>
<filter-name>monitoring</filter-name>
<filter-name>javamelody</filter-name>
<url-pattern>/*</url-pattern>
</filter-mapping>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
xmlns:f="http://java.sun.com/jsf/core"
xmlns:h="http://java.sun.com/jsf/html"
xmlns:a4j="http://richfaces.org/a4j"
xmlns:rich="http://richfaces.org/rich"
xmlns:zanata="http://java.sun.com/jsf/composite/zanata">

<h1>#{msgs['jsf.dashboard.settings.title']}</h1>
Expand Down Expand Up @@ -104,15 +105,14 @@
</div>
</zanata:decorate>
</div>
<input id="changePasswordButton" type="submit"
value="Update password" styleClass="button"
jsfc="a4j:commandButton"
<zanata:ajax-command-button
id="changePasswordButton"
oncomplete="zanata.form.init('#{rich:clientId('passwordChangeForm')}');"
action="#{userSettingsAction.changePassword()}"
render="passwordChangeForm"
status="change-password-loader"/>
<a4j:status name="change-password-loader">
<f:facet name="start"><zanata:loader layout="inline" type="loader--small"/></f:facet>
</a4j:status>
styleClass="button"
render="passwordChangeForm">
Update password
</zanata:ajax-command-button>
</h:form>
</ui:fragment>
<hr/>
Expand Down
26 changes: 23 additions & 3 deletions zanata-war/src/main/webapp/account/inactive_account.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,26 @@
<a4j:jsFunction name="sendActivationEmail"
action="#{inactiveAccountAction.sendActivationEmail}"/>

<script type="application/javascript">
function getNewEmailField() {
return jQuery('#' + jqSelector('#{rich:clientId('emailInput')}'));
}

function getInactiveAccountForm() {
return jQuery('#' + jqSelector('#{rich:clientId('inactiveAccountForm')}'));
}

getInactiveAccountForm().keypress(function(e) {
if(e.which == 13) {
if(getNewEmailField().is(":focus")) {
e.preventDefault();
e.stopPropagation();
jQuery('#' + jqSelector('#{rich:clientId('updateEmail')}')).click();
return false;
}
}
});
</script>

<div class="header__logo-only">
<h:link outcome="/home.xhtml" id="home" tabindex="1">
Expand All @@ -35,11 +55,11 @@

<h:outputText value="#{msgs['jsf.or']}"/>

<zanata:decorate id="email" styleClass="l--push-top-quarter" componentId="emailField">
<zanata:decorate id="email" styleClass="l--push-top-quarter" componentId="emailInputField">
<div class="form--inline">
<h:inputText id="email" styleClass="form--inline__input" value="#{inactiveAccountAction.email}"
<h:inputText id="emailInput" styleClass="form--inline__input" value="#{inactiveAccountAction.email}"
placeholder="#{msgs['jsf.email.placeholder']}">
<a4j:ajax event="blur" render="emailField"/>
<a4j:ajax event="blur" render="emailInputField"/>
</h:inputText>

<div class="form--inline__suffix">
Expand Down
4 changes: 4 additions & 0 deletions zanata-war/src/main/webapp/admin/monitoring.xhtml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
<!--
This is necessary in Seam 2.3 / JSF 2 because JSF actually checks for the existence of the physical view.
See: https://issues.jboss.org/browse/JBSEAM-4939
-->
2 changes: 1 addition & 1 deletion zanata-war/src/main/webapp/admin/usermanager.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
disabled="#{not identity.hasPermission('seam.user', 'update')}">
<div class="list__item__content">
<div class="list__item__info">
<h3 class="list__title">
<h3 class="list__title" title="#{identityManager.isUserEnabled(user) ? '' : msgs['jsf.account.disable.tooltip']}">
<span
class="#{identityManager.isUserEnabled(user) ? '' : 'txt--danger'}">
<ui:fragment
Expand Down

0 comments on commit 13f6b4c

Please sign in to comment.