r1475 - branches/bxe_2_0/js

[email protected]
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Tue May 16 17:23:08 2006
New Revision: 1475

Modified:
   branches/bxe_2_0/js/widget.js
Log:
move context menu 50px from edge

Modified: branches/bxe_2_0/js/widget.js
==============================================================================
--- branches/bxe_2_0/js/widget.js	(original)
+++ branches/bxe_2_0/js/widget.js	Tue May 16 17:23:08 2006
@@ -62,6 +62,10 @@
 	}
 	var right = (this.node.offsetLeft + this.node.offsetWidth);
 	if (right > (window.innerWidth  + window.scrollX)) {
+			if (!this.isSubpopup) {
+				right = right + 50;
+			}
+			
 			this.node.style.left = (this.node.offsetLeft - (right - (window.innerWidth + window.scrollX))) + "px";
 	}
 
@@ -96,8 +100,9 @@
 }
 
 
-function Widget_MenuPopup(title) {
+function Widget_MenuPopup(title,isSubpopup) {
 	this.node = this.initNode("div","MenuPopup");
+	this.isSubpopup = isSubpopup;
 	if (title) {
 		this.initTitle(title)
 	}
@@ -583,7 +588,7 @@
 	this.positionize();
 	window.onresize = this.positionize;
 	this.Display  = "block";
-	this.subPopup = new Widget_MenuPopup();
+	this.subPopup = new Widget_MenuPopup(null,true);
 	this.buildXPath(bxe_config.xmldoc.documentElement);
 	
 	this.draw();	
@@ -694,8 +699,8 @@
 	this.Popup = new Widget_MenuPopup();
 	this.Popup.position(0,0,"absolute");
 	this.Popup.ContextMenu = this;
-	this.subPopup = new Widget_MenuPopup();
-	this.subPopup.subPopup = new Widget_MenuPopup();
+	this.subPopup = new Widget_MenuPopup(null,true);
+	this.subPopup.subPopup = new Widget_MenuPopup(null,true);
 	//this.Popup.EditAttributes = new Widget_ModalAttributeBox();
 	
 }
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs
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.