Skip to content

Commit

Permalink
Fix #11375: StaticMessage add success severity (#11901)
Browse files Browse the repository at this point in the history
  • Loading branch information
melloware committed May 10, 2024
1 parent 5b601f1 commit 8d7ad0d
Show file tree
Hide file tree
Showing 16 changed files with 41 additions and 24 deletions.
2 changes: 1 addition & 1 deletion docs/15_0_0/components/staticmessage.md
Expand Up @@ -22,7 +22,7 @@ rendered | true | Boolean | Boolean value to specify the rendering of the compon
binding | null | Object | An el expression that maps to a server side UIComponent instance in a backing bean
summary | null | String | The message summary.
detail | null | String | The message detail.
severity | null | String | The severity of the message: error, info, warn, fatal.
severity | null | String | The severity of the message: success, info, error, warn, fatal.
display | both | String | Defines the display mode.
escape | true | Boolean | Defines whether HTML would be escaped or not.
style | null | String | Style of main container element.
Expand Down
5 changes: 4 additions & 1 deletion docs/15_0_0/gettingstarted/whatsnew.md
Expand Up @@ -17,4 +17,7 @@ Look into [migration guide](https://primefaces.github.io/primefaces/15_0_0/#/../
* Added [hCaptcha](https://www.hcaptcha.com/) support

* FeedReader
* Added `podcast="true"` property if [Apple Itunes Podcast](https://help.apple.com/itc/podcasts_connect/#/itcb54353390) parsing and specific tags
* Added `podcast="true"` property if [Apple Itunes Podcast](https://help.apple.com/itc/podcasts_connect/#/itcb54353390) parsing and specific tags

* StaticMessage
* Added `severity="success"` to align with React/Vue/Angular
Expand Up @@ -22,6 +22,9 @@
<div class="card">
<h5>Basic</h5>
<div class="grid">
<div class="col-12 md:col-4">
<p:staticMessage severity="success" summary="SUCCESS" detail="Message Content" style="width: 100%"/>
</div>
<div class="col-12 md:col-4">
<p:staticMessage severity="info" summary="INFO" detail="Message Content" style="width: 100%"/>
</div>
Expand All @@ -31,6 +34,9 @@
<div class="col-12 md:col-4">
<p:staticMessage severity="error" summary="ERROR" detail="Message Content" style="width: 100%"/>
</div>
<div class="col-12 md:col-4">
<p:staticMessage severity="fatal" summary="FATAL" detail="Message Content" style="width: 100%"/>
</div>
</div>

<h5>Closable</h5>
Expand Down
2 changes: 1 addition & 1 deletion primefaces/pom.xml
Expand Up @@ -1209,7 +1209,7 @@
<maven.test.skip>true</maven.test.skip>
<maven.javadoc.skip>true</maven.javadoc.skip>
<maven.source.skip>true</maven.source.skip>
<jakarta.jar.skip>true</jakarta.jar.skip>
<jakarta.jar.skip>false</jakarta.jar.skip>
<checkstyle.skip>true</checkstyle.skip>
<license.skipCheckLicense>true</license.skipCheckLicense>
<license.skipAddThirdParty>true</license.skipAddThirdParty>
Expand Down
Expand Up @@ -27318,7 +27318,7 @@
</attribute>
<attribute>
<description>
<![CDATA[The severity of the message: error, info, warn, fatal.]]>
<![CDATA[The severity of the message: success, info, error, warn, fatal.]]>
</description>
<name>severity</name>
<required>true</required>
Expand Down

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

Large diffs are not rendered by default.

@@ -1,17 +1,17 @@
.ui-messages-info, .ui-messages-warn, .ui-messages-error, .ui-messages-fatal {
.ui-messages-success, .ui-messages-info, .ui-messages-warn, .ui-messages-error, .ui-messages-fatal {
border: 1px solid;
margin: 10px 0px;
padding:10px 10px 10px 10px;
}

.ui-message-info, .ui-message-error, .ui-message-warn, .ui-message-fatal {
.ui-message-success, .ui-message-info, .ui-message-error, .ui-message-warn, .ui-message-fatal {
border: 1px solid;
margin: 0px 5px;
padding:2px 5px;
}

.ui-messages-info-icon, .ui-messages-warn-icon, .ui-messages-error-icon, .ui-messages-fatal-icon,
.ui-message-info-icon, .ui-message-warn-icon, .ui-message-error-icon, .ui-message-fatal-icon {
.ui-messages-success-icon, .ui-messages-info-icon, .ui-messages-warn-icon, .ui-messages-error-icon, .ui-messages-fatal-icon,
.ui-message-success-icon, .ui-message-info-icon, .ui-message-warn-icon, .ui-message-error-icon, .ui-message-fatal-icon {
background: url("#{resource['primefaces:messages/messages.png']}") no-repeat;
display:block;
float:left;
Expand All @@ -20,28 +20,34 @@
position: relative;
}

.ui-messages-info-icon, .ui-messages-warn-icon, .ui-messages-error-icon, .ui-messages-fatal-icon {
.ui-messages-success-icon, .ui-messages-info-icon, .ui-messages-warn-icon, .ui-messages-error-icon, .ui-messages-fatal-icon {
height:24px;
width:24px;
margin-top:-4px;
}

.ui-message-info-icon, .ui-message-warn-icon, .ui-message-error-icon, .ui-message-fatal-icon {
.ui-message-success-icon, .ui-message-info-icon, .ui-message-warn-icon, .ui-message-error-icon, .ui-message-fatal-icon {
height:16px;
width:16px;
}

.ui-messages-info-summary, .ui-messages-warn-summary, .ui-messages-error-summary, .ui-messages-fatal-summary,
.ui-message-info-summary, .ui-message-warn-summary, .ui-message-error-summary, .ui-message-fatal-summary {
.ui-messages-success-summary, .ui-messages-info-summary, .ui-messages-warn-summary, .ui-messages-error-summary, .ui-messages-fatal-summary,
.ui-message-success-summary, .ui-message-info-summary, .ui-message-warn-summary, .ui-message-error-summary, .ui-message-fatal-summary {
margin-left:10px;
font-weight:bold;
}

.ui-messages-info-detail, .ui-messages-warn-detail, .ui-messages-error-detail, .ui-messages-fatal-detail,
.ui-message-info-detail, .ui-message-warn-detail, .ui-message-error-detail, .ui-message-fatal-detail {
.ui-messages-success-detail, .ui-messages-info-detail, .ui-messages-warn-detail, .ui-messages-error-detail, .ui-messages-fatal-detail,
.ui-message-success-detail, .ui-message-info-detail, .ui-message-warn-detail, .ui-message-error-detail, .ui-message-fatal-detail {
margin-left:5px;
}

.ui-messages-success, .ui-message-success {
color: #1ea97c;
background-color: rgba(228, 248, 240, 0.7);
border-color: #1ea97c;
}

.ui-messages-info, .ui-message-info {
color: #3a87ad;
background-color: #d9edf7;
Expand Down Expand Up @@ -81,10 +87,12 @@
height:16px
}

.ui-messages-success-icon {background-position: 0px -316px;}
.ui-messages-info-icon {background-position: 0px -316px;}
.ui-messages-warn-icon {background-position: 0px -448px;}
.ui-messages-error-icon {background-position: 0px -52px;}
.ui-messages-fatal-icon {background-position: 0px -184px;}
.ui-message-success-icon {background-position: 0px -360px;}
.ui-message-info-icon {background-position: 0px -360px;}
.ui-message-warn-icon {background-position: 0px -492px;}
.ui-message-error-icon {background-position: 0px -96px;}
Expand Down

0 comments on commit 8d7ad0d

Please sign in to comment.