geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rwo...@apache.org
Subject svn commit: r1144170 - in /geronimo/server/trunk/plugins/console: console-core/src/main/java/org/apache/geronimo/console/message/ console-portal-driver/src/main/webapp/ console-portal-driver/src/main/webapp/images/
Date Fri, 08 Jul 2011 06:32:29 GMT
Author: rwonly
Date: Fri Jul  8 06:32:29 2011
New Revision: 1144170

URL: http://svn.apache.org/viewvc?rev=1144170&view=rev
Log:
GERONIMO-5954 font type and size between abbreviate and detail error messages in portlet are
different / I also replace the old ugly msg icons.

Modified:
    geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/CommonMessage.java
    geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/ErrorMessage.java
    geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/InfoMessage.java
    geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/WarnMessage.java
    geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/CommonMsg.js
    geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/images/msg_error.gif
    geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/images/msg_info.gif
    geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/images/msg_warn.gif

Modified: geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/CommonMessage.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/CommonMessage.java?rev=1144170&r1=1144169&r2=1144170&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/CommonMessage.java
(original)
+++ geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/CommonMessage.java
Fri Jul  8 06:32:29 2011
@@ -52,4 +52,7 @@ public abstract class CommonMessage impl
 
     public abstract String renderMessage();
 
+    protected String convertLineBreakToBR(String str){
+        return str.replaceAll("\r\n|[\r\n]", "<br />");
+    }
 }

Modified: geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/ErrorMessage.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/ErrorMessage.java?rev=1144170&r1=1144169&r2=1144170&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/ErrorMessage.java
(original)
+++ geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/ErrorMessage.java
Fri Jul  8 06:32:29 2011
@@ -50,8 +50,8 @@ public final class ErrorMessage extends 
         if (null != detail) {
             sb.append("<span id=\""
                             + timestamp
-                            + "org_apache_geronimo_detailedMessages\" style=\"display: none;\"
class=\"validation-error\"><pre>"
-                            + detail + "</pre></span>");
+                            + "org_apache_geronimo_detailedMessages\" style=\"display: none;\"
class=\"validation-error\">"
+                            + convertLineBreakToBR(detail) + "</span>");
         }
         sb.append("</td></tr>");
         return sb.toString();

Modified: geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/InfoMessage.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/InfoMessage.java?rev=1144170&r1=1144169&r2=1144170&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/InfoMessage.java
(original)
+++ geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/InfoMessage.java
Fri Jul  8 06:32:29 2011
@@ -50,8 +50,8 @@ public final class InfoMessage extends C
         if (null != detail) {
             sb.append("<span id=\""
                             + timestamp
-                            + "org_apache_geronimo_detailedMessages\" style=\"display: none;\"
class=\"validation-info\"><pre>"
-                            + detail + "</pre></span>");
+                            + "org_apache_geronimo_detailedMessages\" style=\"display: none;\"
class=\"validation-info\">"
+                            + convertLineBreakToBR(detail) + "</span>");
         }
         sb.append("</td></tr>");
         return sb.toString();

Modified: geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/WarnMessage.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/WarnMessage.java?rev=1144170&r1=1144169&r2=1144170&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/WarnMessage.java
(original)
+++ geronimo/server/trunk/plugins/console/console-core/src/main/java/org/apache/geronimo/console/message/WarnMessage.java
Fri Jul  8 06:32:29 2011
@@ -50,8 +50,8 @@ public final class WarnMessage extends C
         if (null != detail) {
             sb.append("<span id=\""
                             + timestamp
-                            + "org_apache_geronimo_detailedMessages\" style=\"display: none;\"
class=\"validation-warn\"><pre>"
-                            + detail + "</pre></span>");
+                            + "org_apache_geronimo_detailedMessages\" style=\"display: none;\"
class=\"validation-warn\">"
+                            + convertLineBreakToBR(detail) + "</span>");
         }
         sb.append("</td></tr>");
         return sb.toString();

Modified: geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/CommonMsg.js
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/CommonMsg.js?rev=1144170&r1=1144169&r2=1144170&view=diff
==============================================================================
--- geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/CommonMsg.js
(original)
+++ geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/CommonMsg.js
Fri Jul  8 06:32:29 2011
@@ -119,15 +119,25 @@ function addCommonMessage(namespace, msg
             default:
                 span2.className="validation-info";
         }
-        var pre = document.createElement("pre");
-        span2.appendChild(pre);
-        pre.appendChild(document.createTextNode(msg.abbr));
-        pre.appendChild(document.createElement("br"));
-        pre.appendChild(document.createTextNode(msg.detail));
-        pre.appendChild(document.createElement("br"));
+        //var pre = document.createElement("pre");
+        //span2.appendChild(pre);
+        span2.appendChild(document.createTextNode(msg.abbr));
+        span2.appendChild(document.createElement("br"));
+        span2.appendChild(document.createTextNode(convertLineBreakToBR(msg.detail)));
+        span2.appendChild(document.createElement("br"));
     }
 }
 
+function convertLineBreakToBR(str) {
+    str = str.replace(/(\r\n|[\r\n])/g, "<br />");
+    return str;
+}
+
+function convertBRtoLineBreak (str) {
+    str = str.replace(/<br \/>/g, "\r\n");
+    return str;
+}
+
 function showConfirmMessage() {
     dojo.require("dijit.Dialog");
     dojo.require("dijit.form.Button");

Modified: geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/images/msg_error.gif
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/images/msg_error.gif?rev=1144170&r1=1144169&r2=1144170&view=diff
==============================================================================
Binary files - no diff available.

Modified: geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/images/msg_info.gif
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/images/msg_info.gif?rev=1144170&r1=1144169&r2=1144170&view=diff
==============================================================================
Binary files - no diff available.

Modified: geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/images/msg_warn.gif
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/plugins/console/console-portal-driver/src/main/webapp/images/msg_warn.gif?rev=1144170&r1=1144169&r2=1144170&view=diff
==============================================================================
Binary files - no diff available.



Mime
View raw message