SVN: toys/stbr/index.php
sparky
sparky at pld-linux.org
Mon May 21 19:34:08 CEST 2007
Author: sparky
Date: Mon May 21 19:34:07 2007
New Revision: 8619
Modified:
toys/stbr/index.php
Log:
- over behaves like it used to do but locks in place on click
Modified: toys/stbr/index.php
==============================================================================
--- toys/stbr/index.php (original)
+++ toys/stbr/index.php Mon May 21 19:34:07 2007
@@ -106,17 +106,23 @@
popup = null;
popupS = null;
+var overLock = 0;
+var activeOver = null;
function O(e, t, txt) {
+ if (overLock) return;
popupS.left = "10px";
popupS.display = "block";
popup.innerHTML = tohtml( txt );
- if (popup.offsetWidth > 500) popupS.width = "500px";
-/* t.onmouseout = hideOver;
+ if (popup.offsetWidth > 500)
+ popupS.width = "500px";
+ activeOver = t;
+ t.onmouseout = hideOver;
+ t.onclick = lockOver;
if (window.onmousemove)
window.onmousemove = moveOver;
else
document.onmousemove = moveOver;
-*/
+
moveOver(e);
}
@@ -190,6 +196,24 @@
popupS.left = (x < maxX ? x : maxX) + "px";
popupS.top = (y < maxY ? y : y - popup.offsetHeight - 30) + "px";
}
+function lockOver(e) {
+ if ( overLock ) {
+ overLock = 0;
+ activeOver.onmouseout = hideOver;
+ if (window.onmousemove)
+ window.onmousemove = moveOver;
+ else
+ document.onmousemove = moveOver;
+ return;
+ }
+ overLock = 1;
+ activeOver.onmouseout = null;
+ if (window.onmousemove)
+ window.onmousemove = null;
+ else
+ document.onmousemove = null;
+ moveOver(e);
+}
function hideOver() {
popupS.display = "none";
popupS.width = "auto";
@@ -293,7 +317,7 @@
sqlite_exec($db, $insert, $err);
echo $err;
- $title = "onclick=\"O(event, this, '$title')\"";
+ $title = "onmouseover=\"O(event, this, '$title')\"";
$info = '<a class="mailto">' . $filled['requester'] . '</a> / ' . $filled['flags'] . '<br />' . $filled['date'];
}
@@ -305,7 +329,7 @@
else
{
$info = '<a class="mailto">' . $q['queue_requester'] . '</a> / ' . $q['queue_flags'] . '<br />' . $q['queue_date'];
- $title = "onclick=\"O(event, this, 'Cached: [br/]{$q['queue_builder_info']}')\"";
+ $title = "onmouseover=\"O(event, this, 'Cached: [br/]{$q['queue_builder_info']}')\"";
}
?>
<tr class="application" <?=$title?>>
More information about the pld-cvs-commit
mailing list