- enable IE selection in credentials and public file URI fields so that the IE user may select and copy the contents
username.addClickListener(new ClickListener () {
public void onClick(Widget sender) {
+ GSS.enableIESelection();
((TextBox) sender).selectAll();
+ GSS.preventIESelection();
}
});
tokenBox.addClickListener(new ClickListener () {
public void onClick(Widget sender) {
+ GSS.enableIESelection();
((TextBox) sender).selectAll();
+ GSS.preventIESelection();
}
});
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
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
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
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;
+ }-*/;
+
}