summaryrefslogtreecommitdiffstats
path: root/js/util.js
diff options
context:
space:
mode:
authormkanat%bugzilla.org <>2007-11-29 09:20:05 +0100
committermkanat%bugzilla.org <>2007-11-29 09:20:05 +0100
commit9dfa47cccbf6cf4f98d807c1c61400fc138e18ff (patch)
tree14f2bcdec784bc9ad056894af2d85e92acd5f295 /js/util.js
parentab73b625a7fb071794cd1152de3c8486d91788f6 (diff)
downloadbugzilla-9dfa47cccbf6cf4f98d807c1c61400fc138e18ff.tar.gz
bugzilla-9dfa47cccbf6cf4f98d807c1c61400fc138e18ff.tar.xz
Bug 397099: Date/Time Fields should have a JavaScript widget for picking a date
Patch By Max Kanat-Alexander <mkanat@bugzilla.org> r=LpSolit, r=glob, a=mkanat
Diffstat (limited to 'js/util.js')
-rw-r--r--js/util.js18
1 files changed, 18 insertions, 0 deletions
diff --git a/js/util.js b/js/util.js
index 293c89a5d..98bafb664 100644
--- a/js/util.js
+++ b/js/util.js
@@ -117,6 +117,24 @@ function bz_getFullWidth(fromObj)
}
/**
+ * Causes a block to appear directly underneath another block,
+ * overlaying anything below it.
+ *
+ * @param item The block that you want to move.
+ * @param parent The block that it goes on top of.
+ * @return nothing
+ */
+function bz_overlayBelow(item, parent) {
+ var elemY = bz_findPosY(parent);
+ var elemX = bz_findPosX(parent);
+ var elemH = parent.offsetHeight;
+
+ item.style.position = 'absolute';
+ item.style.left = elemX + "px";
+ item.style.top = elemY + elemH + 1 + "px";
+}
+
+/**
* Create wanted options in a select form control.
*
* @param aSelect Select form control to manipulate.