fix node open on hover when using dnd
[pithos] / src / gr / ebs / gss / client / DisplayHelper.java
index f72d757..f60d14c 100644 (file)
@@ -1,5 +1,5 @@
 /*
 /*
- * Copyright 2009 Electronic Business Systems Ltd.
+ * Copyright 2009, 2010 Electronic Business Systems Ltd.
  *
  * This file is part of GSS.
  *
  *
  * This file is part of GSS.
  *
@@ -82,6 +82,8 @@ public class DisplayHelper {
                var logger = $wnd.console;
                if (logger && logger.debug)
                        logger.debug(message);
                var logger = $wnd.console;
                if (logger && logger.debug)
                        logger.debug(message);
+               else if (logger && logger.log)
+                       logger.log(message);
        }-*/;
 
        /**
        }-*/;
 
        /**
@@ -118,5 +120,22 @@ public class DisplayHelper {
                styleRow(table, row, true, styleName);
                return row;
        }
                styleRow(table, row, true, styleName);
                return row;
        }
+       /**
+        * The implementation of this trim method also checks for
+        * no brake space characters (nbsp) = '\00A0'
+        * and removes them
+        *
+        * @param input
+        * @return the new trimmed string without whitespace or no brake space
+        */
+       public static native String trim(String input) /*-{
+    if(input.length == 0)
+       return input;
+       if((input[0]||input[input.length-1]) != '\u0020' && (input[0]||input[input.length-1]) != '\u00A0')
+       return input;
+    var r1 = input.replace(/^(\s*)/, '');
+    var r2 = r1.replace(/\s*$/, '');
+    return r2;
+  }-*/;
 
 }
 
 }