Scarab commit: svn commit: r10830 - trunk/src/webapp/scripts/sstree.js

Hussayn Dabbous <[email protected]>
Newsgroups gmane.comp.java.scarab.cvs
Message-ID <[email protected]>
Author: dabbous
Date: 2009-07-23 05:41:04-0700
New Revision: 10830

Modified:
   trunk/src/webapp/scripts/sstree.js

Log:
SCB2979: 
fix: interference with the Calendar popup and treeviewPopup 
(only seen on IE6). The error was:
When a TreeViewPopup was opened and immediately 
afterwards the Calendar popup was opened, 
then the calendar popup did not close any more.


Modified: trunk/src/webapp/scripts/sstree.js
Url: http://scarab.tigris.org/source/browse/scarab/trunk/src/webapp/scripts/sstree.js?view=diff&pathrev=10830&r1=10829&r2=10830
==============================================================================
--- trunk/src/webapp/scripts/sstree.js	(original)
+++ trunk/src/webapp/scripts/sstree.js	2009-07-23 05:41:04-0700
@@ -114,7 +114,8 @@
 
 		elem.style.display = 'inline-block';
 		elem.style.left = pos.x + 'px';
-		elem.style.top = pos.y + 'px';
+		elem.style.top  = pos.y + 'px';
+		elem.oldMouseup = document.onmouseup;
 		
 		document.onmouseup = function(event) {
 			if (!event) event = window.event;
@@ -128,7 +129,7 @@
 			
 			if (!((event.clientX >= x1) && (event.clientX <= x2) && (event.clientY >= y1) && (event.clientY <= y2))) {
 				elem.style.display = 'none';				
-				document.onmouseup = null;
+				document.onmouseup = elem.oldMouseup;
 			}
 		};
 
@@ -188,11 +189,15 @@
 var observer = new Observer;
 
 function clickTree(attributeId, key, value, display) {
+
 	//alert(attributeId);
+
 	document.getElementById(key).value = value;
 	document.getElementById(key + ':Display').value = display;
-	document.getElementById(key + ':Popup').style.display = 'none';				
-	document.onmouseup = null;
+
+	var elem = document.getElementById(key + ':Popup');
+	elem.style.display = 'none';				
+	document.onmouseup = elem.oldMouseup;
 	
 	scope = ["treeview", attributeId, key, value, display];
 	observer.fire(scope);

------------------------------------------------------
http://scarab.tigris.org/ds/viewMessage.do?dsForumId=3577&dsMessageId=2374802
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.