r1303 - branches/bxe_2_0/plugins

[email protected]
Newsgroups gmane.editors.bitflux.cvs
Message-ID <[email protected]>
Author: chregu
Date: Mon May 16 20:48:21 2005
New Revision: 1303

Modified:
   branches/bxe_2_0/plugins/ServerClipboard.js
Log:
fix for http://bugs.bitflux.ch/cgi-bin/bugzilla/show_bug.cgi?id=786
server clipboard, call at startup of BXE


Modified: branches/bxe_2_0/plugins/ServerClipboard.js
==============================================================================
--- branches/bxe_2_0/plugins/ServerClipboard.js	(original)
+++ branches/bxe_2_0/plugins/ServerClipboard.js	Mon May 16 20:48:21 2005
@@ -27,6 +27,12 @@
 		
 	}
 	
+	this.start = function() {
+		if (window.location.protocol != "file:" ) {
+			BxeServerClipboard_get();
+		}
+	}
+	
 	this.getCss = function() {
 		return new Array();
 	}
@@ -56,24 +62,8 @@
 	});
 	var clipNode = bxe_config.ServerClipboard.clipNode;
 	if (clipNode == "_notloaded") {
-		var td = new mozileTransportDriver("http");
-		var url = eval(bxe_config.ServerClipboard.urlfunction + "('GET')");
-		td.url = url;
-		var req =  td.load(url,null,false);
-		if (req.document) {
-			try {
-				if (req.document.documentElement.localName == "parsererror") {
-					bxe_config.ServerClipboard.clipNode = "_error";
-				} else {
-					bxe_config.ServerClipboard.clipNode = req.document.documentElement;
-				}
-			} catch(e) {
-				bxe_config.ServerClipboard.clipNode = "_error";
-			}
-		} else {
-			bxe_config.ServerClipboard.clipNode = "_error";
-		}
 		
+		BxeServerClipboard_get();
 		
 	}
 	if (clipNode != "_error") {
@@ -95,6 +85,24 @@
 	
 	
 }
-
+function BxeServerClipboard_get() {
+	var td = new mozileTransportDriver("http");
+	var url = eval(bxe_config.ServerClipboard.urlfunction + "('GET')");
+	td.url = url;
+	var req =  td.load(url,null,false);
+	if (req.document) {
+		try {
+			if (req.document.documentElement.localName == "parsererror") {
+				bxe_config.ServerClipboard.clipNode = "_error";
+			} else {
+				bxe_config.ServerClipboard.clipNode = req.document.documentElement;
+			}
+		} catch(e) {
+			bxe_config.ServerClipboard.clipNode = "_error";
+		}
+	} else {
+		bxe_config.ServerClipboard.clipNode = "_error";
+	}
+}
 
 
-- 
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.