Fixed: showjGrowl called twice
showjGrowl function is called twice,
even when there is no message to show.
@@ -57,14 +57,7 @@ under the License.
</#if>
</div>
</#if>
- <#assign jGrowlPosition = modelTheme.getProperty("jgrowlPosition")>
- <#assign jGrowlWidth = modelTheme.getProperty("jgrowlWidth")>
- <#assign jGrowlHeight = modelTheme.getProperty("jgrowlHeight")>
- <#assign jGrowlSpeed = modelTheme.getProperty("jgrowlSpeed")>
- <script>showjGrowl(
- "${uiLabelMap.CommonShowAll}", "${uiLabelMap.CommonCollapse}", "${uiLabelMap.CommonHideAllNotifications}",
- "${jGrowlPosition}", "${jGrowlWidth}", "${jGrowlHeight}", "${jGrowlSpeed}");</script>
<#-- display the event messages -->
<#if (eventMessage?has_content || eventMessageList?has_content)>
<div id="content-messages" class="content-messages eventMessage"
@@ -79,13 +72,6 @@ under the License.
</#list>
</#if>
</div>
- <#assign jGrowlPosition = modelTheme.getProperty("jgrowlPosition")>
- <#assign jGrowlWidth = modelTheme.getProperty("jgrowlWidth")>
- <#assign jGrowlHeight = modelTheme.getProperty("jgrowlHeight")>
- <#assign jGrowlSpeed = modelTheme.getProperty("jgrowlSpeed")>
- <script>showjGrowl(
- "${uiLabelMap.CommonShowAll}", "${uiLabelMap.CommonCollapse}", "${uiLabelMap.CommonHideAllNotifications}",
- "${jGrowlPosition}", "${jGrowlWidth}", "${jGrowlHeight}", "${jGrowlSpeed}");</script>
</#if>
<#-- display the warning messages -->
@@ -103,12 +89,16 @@ under the License.
</#if>
</div>
</#if>
+
+ <#if (errorMessage?has_content || errorMessageList?has_content
+ || eventMessage?has_content || eventMessageList?has_content
+ || warningMessage?has_content || warningMessageList?has_content)>
<#assign jGrowlPosition = modelTheme.getProperty("jgrowlPosition")>
<#assign jGrowlWidth = modelTheme.getProperty("jgrowlWidth")>
<#assign jGrowlHeight = modelTheme.getProperty("jgrowlHeight")>
<#assign jGrowlSpeed = modelTheme.getProperty("jgrowlSpeed")>
-
<script>showjGrowl(
"${uiLabelMap.CommonShowAll}", "${uiLabelMap.CommonCollapse}", "${uiLabelMap.CommonHideAllNotifications}",
"${jGrowlPosition}", "${jGrowlWidth}", "${jGrowlHeight}", "${jGrowlSpeed}");</script>
+ </#if>
</#escape>
