aboutsummaryrefslogtreecommitdiffstats
path: root/data/lib/util.js
diff options
context:
space:
mode:
authorMatěj Cepl <mcepl@redhat.com>2011-03-25 16:23:51 +0100
committerMatěj Cepl <mcepl@redhat.com>2011-06-05 14:44:00 +0200
commit470e0d853724feb51a991e9e8b867e366c8519ae (patch)
treeb74910c57356601cb8735de030686334cad49917 /data/lib/util.js
parent3c3860cd080dec5a71ae6c3c7bc3438fa8875d94 (diff)
downloadbugzilla-triage-470e0d853724feb51a991e9e8b867e366c8519ae.tar.gz
Cut out general bugzilla functions to a special module.
Diffstat (limited to 'data/lib/util.js')
-rw-r--r--data/lib/util.js13
1 files changed, 13 insertions, 0 deletions
diff --git a/data/lib/util.js b/data/lib/util.js
index 6cbb493..611d353 100644
--- a/data/lib/util.js
+++ b/data/lib/util.js
@@ -81,6 +81,19 @@ function getBugNoFromURL(url) {
}
/**
+ * Send mouse click to the specified element
+ *
+ * @param String ID of the element to send mouseclick to
+ * @return None
+ */
+function clickMouse (targetID) {
+ var localEvent = document.createEvent("MouseEvents");
+ localEvent.initMouseEvent("click", true, true, document.defaultView, 0, 0,
+ 0, 0, 0, false, false, false, false, 0, null);
+ document.getElementById(targetID).dispatchEvent(localEvent);
+}
+
+/**
* Create a A element leadink nowhere, but with listener running a callback on the click
*
* @param id String with a id to be added to the element