svn commit: r1210193 - /ofbiz/trunk/themes/bizznesstime/includes/messages.ftl

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

svn commit: r1210193 - /ofbiz/trunk/themes/bizznesstime/includes/messages.ftl

jleroux@apache.org
Author: jleroux
Date: Sun Dec  4 20:12:14 2011
New Revision: 1210193

URL: http://svn.apache.org/viewvc?rev=1210193&view=rev
Log:
Fixes an issue reported by andrewzn: "Error messages are never displayed with BIZZNESS_TIME theme" at https://issues.apache.org/jira/browse/OFBIZ-4607

The reason is outdated JS in messages.ftl

jleroux: I did not use andrewzn's solution because it overrode another part of the screen. I tried to understand why humanMsg, which has been adapted during jQuery move, did not work. I guess it's simply because biznessTime application.js is not loaded; though it's declared in BizznessTimeThemeData.xml as VT_HDR_JAVASCRIPT. At this stage, as I was missing time, I decided to simply reuse the same way than in webcommon messages.ftl

Modified:
    ofbiz/trunk/themes/bizznesstime/includes/messages.ftl

Modified: ofbiz/trunk/themes/bizznesstime/includes/messages.ftl
URL: http://svn.apache.org/viewvc/ofbiz/trunk/themes/bizznesstime/includes/messages.ftl?rev=1210193&r1=1210192&r2=1210193&view=diff
==============================================================================
--- ofbiz/trunk/themes/bizznesstime/includes/messages.ftl (original)
+++ ofbiz/trunk/themes/bizznesstime/includes/messages.ftl Sun Dec  4 20:12:14 2011
@@ -36,20 +36,30 @@ under the License.
 
 <#-- display the error messages -->
 <#if (errorMessage?has_content || errorMessageList?has_content)>
-<script type="text/javascript">
-    document.observe('dom:loaded', function() {
-        humanMsg.displayMsg('<div class="errorMessage"><#if errorMessage?has_content><p>${errorMessage}</p></#if><#if errorMessageList?has_content><#list errorMessageList as errorMsg><p>${errorMsg}</p></#list></#if></p></div>');
-        return false;
-    });
-</script>
+  <div id="content-messages" class="content-messages errorMessage" onclick="document.getElementById('content-messages').parentNode.removeChild(this)">
+    <p>${uiLabelMap.CommonFollowingErrorsOccurred}:</p>
+    <#if errorMessage?has_content>
+      <p>${errorMessage}</p>
+    </#if>
+    <#if errorMessageList?has_content>
+      <#list errorMessageList as errorMsg>
+        <p>${errorMsg}</p>
+      </#list>
+    </#if>
+  </div>
 </#if>
 
 <#-- display the event messages -->
 <#if (eventMessage?has_content || eventMessageList?has_content)>
-<script type="text/javascript">
-    document.observe('dom:loaded', function() {
-        humanMsg.displayMsg('<div class="eventMessage"><#if eventMessage?has_content><p>${eventMessage}</p></#if><#if eventMessageList?has_content><#list eventMessageList as eventMsg><p>${eventMsg}</p></#list></#if></div>');
-        return false;
-    });
-</script>
+  <div id="content-messages" class="content-messages eventMessage" onclick="document.getElementById('content-messages').parentNode.removeChild(this)">
+    <p>${uiLabelMap.CommonFollowingOccurred}:</p>
+    <#if eventMessage?has_content>
+      <p>${eventMessage}</p>
+    </#if>
+    <#if eventMessageList?has_content>
+      <#list eventMessageList as eventMsg>
+        <p>${eventMsg}</p>
+      </#list>
+    </#if>
+  </div>
 </#if>