On Mon, Sep 10, 2012 at 5:26 PM, Howard Lewis Ship <[email protected]> wrote: > Hat to be a PITA but ... I'd prefer to see an @since JavaDoc tag on > the new value. Thanks! >
Oh, and the new method. Just @since 5.3.6 is ok, even though it is added in 5.3.6 and 5.4. > On Mon, Sep 3, 2012 at 7:59 AM, <[email protected]> wrote: >> Updated Branches: >> refs/heads/5.3 e08ac9ee2 -> 6e3de5d4b >> refs/heads/master 6223ac85a -> 17a9f42e7 >> >> >> TAP5-1996: Add Severity.SUCCESS enum for alerts >> >> Signed-off-by: Kalle Korhonen <[email protected]> >> >> >> Project: http://git-wip-us.apache.org/repos/asf/tapestry-5/repo >> Commit: http://git-wip-us.apache.org/repos/asf/tapestry-5/commit/17a9f42e >> Tree: http://git-wip-us.apache.org/repos/asf/tapestry-5/tree/17a9f42e >> Diff: http://git-wip-us.apache.org/repos/asf/tapestry-5/diff/17a9f42e >> >> Branch: refs/heads/master >> Commit: 17a9f42e7651e3f15fc2e62da95eac36cc004844 >> Parents: 6223ac8 >> Author: dmitrygusev <[email protected]> >> Authored: Sun Sep 2 00:39:54 2012 +0400 >> Committer: Kalle Korhonen <[email protected]> >> Committed: Mon Sep 3 07:57:12 2012 -0700 >> >> ---------------------------------------------------------------------- >> .../org/apache/tapestry5/alerts/AlertManager.java | 7 +++++++ >> .../java/org/apache/tapestry5/alerts/Severity.java | 2 +- >> .../internal/alerts/AlertManagerImpl.java | 5 +++++ >> .../resources/org/apache/tapestry5/silk/accept.png | Bin 0 -> 781 bytes >> .../resources/org/apache/tapestry5/t5-alerts.css | 12 +++++++++++- >> 5 files changed, 24 insertions(+), 2 deletions(-) >> ---------------------------------------------------------------------- >> >> >> http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/17a9f42e/tapestry-core/src/main/java/org/apache/tapestry5/alerts/AlertManager.java >> ---------------------------------------------------------------------- >> diff --git >> a/tapestry-core/src/main/java/org/apache/tapestry5/alerts/AlertManager.java >> b/tapestry-core/src/main/java/org/apache/tapestry5/alerts/AlertManager.java >> index 2888c0a..2c22039 100644 >> --- >> a/tapestry-core/src/main/java/org/apache/tapestry5/alerts/AlertManager.java >> +++ >> b/tapestry-core/src/main/java/org/apache/tapestry5/alerts/AlertManager.java >> @@ -22,6 +22,13 @@ package org.apache.tapestry5.alerts; >> */ >> public interface AlertManager >> { >> + /** >> + * Adds an {@link Severity#SUCCESS} alert with the default duration, >> {@link Duration#SINGLE}. >> + * >> + * @param message to present to the user >> + */ >> + void success(String message); >> + >> /** >> * Adds an {@link Severity#INFO} alert with the default duration, >> {@link Duration#SINGLE}. >> * >> >> http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/17a9f42e/tapestry-core/src/main/java/org/apache/tapestry5/alerts/Severity.java >> ---------------------------------------------------------------------- >> diff --git >> a/tapestry-core/src/main/java/org/apache/tapestry5/alerts/Severity.java >> b/tapestry-core/src/main/java/org/apache/tapestry5/alerts/Severity.java >> index 82d98cb..524a9f8 100644 >> --- a/tapestry-core/src/main/java/org/apache/tapestry5/alerts/Severity.java >> +++ b/tapestry-core/src/main/java/org/apache/tapestry5/alerts/Severity.java >> @@ -19,7 +19,7 @@ package org.apache.tapestry5.alerts; >> */ >> public enum Severity >> { >> - INFO, WARN, ERROR; >> + SUCCESS, INFO, WARN, ERROR; >> >> /** >> * The CSS class to be used for the client list element. >> >> http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/17a9f42e/tapestry-core/src/main/java/org/apache/tapestry5/internal/alerts/AlertManagerImpl.java >> ---------------------------------------------------------------------- >> diff --git >> a/tapestry-core/src/main/java/org/apache/tapestry5/internal/alerts/AlertManagerImpl.java >> >> b/tapestry-core/src/main/java/org/apache/tapestry5/internal/alerts/AlertManagerImpl.java >> index 3c1acce..56ea534 100644 >> --- >> a/tapestry-core/src/main/java/org/apache/tapestry5/internal/alerts/AlertManagerImpl.java >> +++ >> b/tapestry-core/src/main/java/org/apache/tapestry5/internal/alerts/AlertManagerImpl.java >> @@ -42,6 +42,11 @@ public class AlertManagerImpl implements AlertManager >> needAlertStorageCleanup = perThreadManager.createValue(); >> } >> >> + public void success(String message) >> + { >> + alert(Duration.SINGLE, Severity.SUCCESS, message); >> + } >> + >> public void info(String message) >> { >> alert(Duration.SINGLE, Severity.INFO, message); >> >> http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/17a9f42e/tapestry-core/src/main/resources/org/apache/tapestry5/silk/accept.png >> ---------------------------------------------------------------------- >> diff --git >> a/tapestry-core/src/main/resources/org/apache/tapestry5/silk/accept.png >> b/tapestry-core/src/main/resources/org/apache/tapestry5/silk/accept.png >> new file mode 100644 >> index 0000000..89c8129 >> Binary files /dev/null and >> b/tapestry-core/src/main/resources/org/apache/tapestry5/silk/accept.png >> differ >> >> http://git-wip-us.apache.org/repos/asf/tapestry-5/blob/17a9f42e/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.css >> ---------------------------------------------------------------------- >> diff --git >> a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.css >> b/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.css >> index 50c3b54..b8ae6b0 100644 >> --- a/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.css >> +++ b/tapestry-core/src/main/resources/org/apache/tapestry5/t5-alerts.css >> @@ -40,7 +40,17 @@ DIV.t-alert-container DIV.t-warn { >> } >> >> DIV.t-alert-container DIV.t-info { >> - background: green url("silk/information.png") no-repeat; >> + background: #08f url("silk/information.png") no-repeat; >> + border-radius: 5px; >> + -moz-border-radius: 5px; >> + -webkit-border-radius: 5px; >> + margin-bottom: 5px; >> + padding-left: 22px; >> + color: white; >> +} >> + >> +DIV.t-alert-container DIV.t-success { >> + background: green url("silk/accept.png") no-repeat; >> border-radius: 5px; >> -moz-border-radius: 5px; >> -webkit-border-radius: 5px; >> > > > > -- > Howard M. Lewis Ship > > Creator of Apache Tapestry > > The source for Tapestry training, mentoring and support. Contact me to > learn how I can get you up and productive in Tapestry fast! > > (971) 678-5210 > http://howardlewisship.com -- Howard M. Lewis Ship Creator of Apache Tapestry The source for Tapestry training, mentoring and support. Contact me to learn how I can get you up and productive in Tapestry fast! (971) 678-5210 http://howardlewisship.com --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
