[Mapbender-commits] r5709 - trunk/mapbender/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Tue Mar 2 09:00:47 EST 2010


Author: christoph
Date: 2010-03-02 09:00:46 -0500 (Tue, 02 Mar 2010)
New Revision: 5709

Modified:
   trunk/mapbender/http/plugins/mb_twitter_signin.js
Log:


Modified: trunk/mapbender/http/plugins/mb_twitter_signin.js
===================================================================
--- trunk/mapbender/http/plugins/mb_twitter_signin.js	2010-03-02 13:47:53 UTC (rev 5708)
+++ trunk/mapbender/http/plugins/mb_twitter_signin.js	2010-03-02 14:00:46 UTC (rev 5709)
@@ -70,11 +70,18 @@
 				if (obj.signedIn) {
 					alert(message);
 					$this.text(translatedI18nObject.logOut);
+					$this.mapbender(function () {
+						this.signedIn = true;
+						this.events.signedIn.trigger();
+					}
 				}
 				else {
 					$this.text(translatedI18nObject.logIn);
+					$this.mapbender(function () {
+						this.signedIn = false;
+						this.events.signedOut.trigger();
+					}
 				}
-				$this.mapbender("signedIn", obj.signedIn);
 			}
 		});
 		req.send();
@@ -83,6 +90,10 @@
 	
 	this.signedIn = false;
 
+	this.events = {
+		signedIn: new Mapbender.Event(),
+		signedOut: new Mapbender.Event()
+	};
 	var getOauthToken = function () {
 		var getString = document.location.search.substr(1,document.location.search.length);
 		if (getString === '') {



More information about the Mapbender_commits mailing list