r1633 - branches/bxe_2_0/js

[email protected] Wed, 15 Nov 2006 13:22:51 +0100 (CET)
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Wed Nov 15 13:22:50 2006
New Revision: 1633

Modified:
   branches/bxe_2_0/js/bxeFunctions.js
   branches/bxe_2_0/js/widget.js
Log:
fix some undefined errors

Modified: branches/bxe_2_0/js/bxeFunctions.js
==============================================================================
--- branches/bxe_2_0/js/bxeFunctions.js	(original)
+++ branches/bxe_2_0/js/bxeFunctions.js	Wed Nov 15 13:22:50 2006
@@ -655,7 +655,8 @@
 		menui.MenuPopup._node = node._node;
 		popup.hasEditAttributes = true;
 	}
-	if (BxeClipboardPasteDialog) {
+	
+	if (typeof BxeClipboardPasteDialog == 'function') {
 		popup.addMenuItem(bxe_i18n.getText("Paste from Extern", new Array(node.vdom.bxeName)), function (e) {
 			BxeTextClipboard_OpenDialog(e);
 		});

Modified: branches/bxe_2_0/js/widget.js
==============================================================================
--- branches/bxe_2_0/js/widget.js	(original)
+++ branches/bxe_2_0/js/widget.js	Wed Nov 15 13:22:50 2006
@@ -1182,7 +1182,7 @@
 	}
 	e.preventDefault();
 	e.stopPropagation();
-	if (BxeTextClipboard_keyhandler) {
+	if (typeof BxeTextClipboard_keyhandler == 'function') {
 		document.removeEventListener("keypress", BxeTextClipboard_keyhandler, true);
 	}
 }
@@ -1203,7 +1203,7 @@
 			cancel.setAttribute("value",bxe_i18n.getText("Cancel"));
 			cancel.name="__cancel";
 			this.hasTable.parentNode.addEventListener("reset", function(e) { 
-				if (BxeTextClipboard_keyhandler) {
+				if (typeof BxeTextClipboard_keyhandler == 'function') {
 					document.removeEventListener("keypress", BxeTextClipboard_keyhandler, true);
 				}
 				bxe_registerKeyHandlers();
-- 
Bx-editor-cvs mailing list
[email protected]
http://lists.bitflux.ch/cgi-bin/listinfo/bx-editor-cvs