- move prevent/enableIESelection() to GSS.java
authorfstamatelopoulos <devnull@localhost>
Thu, 9 Apr 2009 10:54:59 +0000 (10:54 +0000)
committerfstamatelopoulos <devnull@localhost>
Thu, 9 Apr 2009 10:54:59 +0000 (10:54 +0000)
- enable IE selection in credentials and public file URI fields so that the IE user may select and copy the contents

gss/src/gr/ebs/gss/client/CredentialsDialog.java
gss/src/gr/ebs/gss/client/FileList.java
gss/src/gr/ebs/gss/client/FilePropertiesDialog.java
gss/src/gr/ebs/gss/client/GSS.java

index 188891b..27c1e71 100644 (file)
@@ -75,7 +75,9 @@ public class CredentialsDialog extends DialogBox {
                username.addClickListener(new ClickListener () {
 
                        public void onClick(Widget sender) {
+                               GSS.enableIESelection();
                                ((TextBox) sender).selectAll();
+                               GSS.preventIESelection();
                        }
 
                });
@@ -87,7 +89,9 @@ public class CredentialsDialog extends DialogBox {
                tokenBox.addClickListener(new ClickListener () {
 
                        public void onClick(Widget sender) {
+                               GSS.enableIESelection();
                                ((TextBox) sender).selectAll();
+                               GSS.preventIESelection();
                        }
 
                });
index 724aaf1..031b53e 100644 (file)
@@ -232,7 +232,7 @@ public class FileList extends Composite implements TableListener, ClickListener
                sinkEvents(Event.ONCLICK);\r
                sinkEvents(Event.ONKEYDOWN);\r
                sinkEvents(Event.ONDBLCLICK);\r
-               preventIESelection();\r
+               GSS.preventIESelection();\r
        }\r
 \r
        public void onClick(Widget sender) {\r
@@ -877,15 +877,6 @@ public class FileList extends Composite implements TableListener, ClickListener
                        GSS.get().setCurrentSelection(null);\r
        }\r
 \r
-       public static native void preventIESelection() /*-{\r
-            $doc.body.onselectstart = function () { return false; };\r
-        }-*/;\r
-\r
-       public static native void enableIESelection() /*-{\r
-        if ($doc.body.onselectstart != null)\r
-            $doc.body.onselectstart = null;\r
-        }-*/;\r
-\r
        /**\r
         *\r
         */\r
index 8551976..ba08b8b 100644 (file)
@@ -289,7 +289,9 @@ public class FilePropertiesDialog extends DialogBox {
                path.addClickListener(new ClickListener () {\r
 \r
                        public void onClick(Widget sender) {\r
+                               GSS.enableIESelection();\r
                                ((TextBox) sender).selectAll();\r
+                               GSS.preventIESelection();\r
                        }\r
 \r
                });\r
index 0934d7b..64efdd3 100644 (file)
@@ -673,4 +673,13 @@ public class GSS implements EntryPoint, WindowResizeListener {
                return currentUserResource;
        }
 
+       public static native void preventIESelection() /*-{
+       $doc.body.onselectstart = function () { return false; };
+       }-*/;
+
+       public static native void enableIESelection() /*-{
+               if ($doc.body.onselectstart != null)
+                       $doc.body.onselectstart = null;
+       }-*/;
+
 }