Module: check_mk
Branch: master
Commit: 4ef74cbebf6964cebe2a6c47a58377ac1806faa5
URL:
http://git.mathias-kettner.de/git/?p=check_mk.git;a=commit;h=4ef74cbebf6964…
Author: Lars Michelsen <lm(a)mathias-kettner.de>
Date: Mon Dec 2 14:35:55 2013 +0100
FIX Fixed moving of snapins while in scrolled sidebar
Release 1.2.3i2 introduced a bug where a snapin was flipping
several pixels above the current mouse position when moving
a snapin while the sidebar is scrolled down.
---
.werks/296 | 10 ++++++++++
ChangeLog | 1 +
web/htdocs/js/sidebar.js | 6 +++---
3 files changed, 14 insertions(+), 3 deletions(-)
diff --git a/.werks/296 b/.werks/296
new file mode 100644
index 0000000..3332c6e
--- /dev/null
+++ b/.werks/296
@@ -0,0 +1,10 @@
+Title: Fixed moving of snapins while in scrolled sidebar
+Level: 1
+Component: multisite
+Version: 1.2.3i7
+Date: 1385991237
+Class: fix
+
+Release 1.2.3i2 introduced a bug where a snapin was flipping
+several pixels above the current mouse position when moving
+a snapin while the sidebar is scrolled down.
diff --git a/ChangeLog b/ChangeLog
index 83018ec..1e84fab 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -66,6 +66,7 @@
* 0006 FIX: Checkboxes for hosts/services were missing on modified views...
* 0284 FIX: Context help toggled on/off randomly...
* 0285 FIX: Fixed bookmarking of absolute URLs or PNP/NagVis URLs in sidebar
snapin...
+ * 0296 FIX: Fixed moving of snapins while in scrolled sidebar...
WATO:
* 0053 New rule for configuring the display_name of a service...
diff --git a/web/htdocs/js/sidebar.js b/web/htdocs/js/sidebar.js
index 62f57d9..270bb2a 100644
--- a/web/htdocs/js/sidebar.js
+++ b/web/htdocs/js/sidebar.js
@@ -160,8 +160,7 @@ function snapinDrag(event) {
// Drag the snapin
snapinDragging.style.position = 'absolute';
var newTop = event.clientY - snapinOffset[0] - snapinScrollTop;
- /*if (weAreIEF__k)
- newTop += document.getElementById('side_content').scrollTop;*/
+ newTop += document.getElementById('side_content').scrollTop;
snapinDragging.style.top = newTop + 'px';
snapinDragging.style.left = (event.clientX - snapinOffset[1]) + 'px';
snapinDragging.style.zIndex = 200;
@@ -284,7 +283,8 @@ function getSnapinList() {
}
function getSnapinCoords(obj) {
- var snapinTop = snapinDragging.offsetTop +
document.getElementById('side_content').scrollTop;
+ var snapinTop = snapinDragging.offsetTop;
+ // + document.getElementById('side_content').scrollTop;
var bottomOffset = obj.offsetTop + obj.clientHeight - snapinTop;
if (bottomOffset < 0)