Add Double Click to Oracle APEX Shuttle Widget
Do you want to improve the usability of the Oracle APEX Shuttle Widget a little bit?
Let's enhance it by adding support for double click. It will allow users to double click on an entry in one of the two lists of the shuttle, to move the selected entry to the other list as they would normally do with the corresponding icons. I think that's a little bit more convenient and faster than using the icons.
There comes the necessary code.
Let's enhance it by adding support for double click. It will allow users to double click on an entry in one of the two lists of the shuttle, to move the selected entry to the other list as they would normally do with the corresponding icons. I think that's a little bit more convenient and faster than using the icons.
There comes the necessary code.
- Create a Page Item of type "Shuttle"
- Add the following code into the "Post Element Text" property of that page item.
<script type="text/javascript">
(function(){
var vName = "#CURRENT_FORM_ELEMENT#".substr(2);
$x("#CURRENT_ITEM_NAME#").ondblclick = new Function("g_Shuttlep_"+vName+".remove();");
$x("#CURRENT_ITEM_NAME#_2").ondblclick = new Function("g_Shuttlep_"+vName+".move();");
})();
</script> - That's it, you are done. Quite simple and easy, isn't it?
Labels: Javascript, Oracle APEX, Shuttle, UI improvement
















7 Comments:
Gute Idee Patrick. Wundert mich die haben nicht daran gedacht. Es zeigt, dass ihre praktische Erfahrungen nicht so gross sind.
By
Denes Kubicek, at 13 January, 2008 11:34
AHG!
Sure call me out by name !!!!
;)
I'll see what I can do.
Carl
By
Carl Backstrom, at 15 January, 2008 02:20
:-)
By
Patrick Wolf, at 15 January, 2008 07:55
Done and checked in
By
Carl Backstrom, at 02 February, 2008 00:21
Great! Thanks a lot Carl!
By
Patrick Wolf, at 02 February, 2008 00:32
Nice work!
I was actually very surprised the first time I used a demo of the shuttle that it didn't support double-clicking. It's great to see that it's so easy to add. Here's hoping it's included in Apex 3.1! :-)
By
Stew, at 06 February, 2008 16:26
@Stew
That was what my previous comment mean's it's the appropriate changes have already been applied to the 3.1 build
By
Carl Backstrom, at 06 February, 2008 18:04
Post a Comment
<< Home