[Mapbender-commits] r5886 - branches/3_dev/http/plugins

svn_mapbender at osgeo.org svn_mapbender at osgeo.org
Sat Apr 10 07:55:15 EDT 2010


Author: mh
Date: 2010-04-10 07:55:14 -0400 (Sat, 10 Apr 2010)
New Revision: 5886

Modified:
   branches/3_dev/http/plugins/mb_login.js
   branches/3_dev/http/plugins/mb_login_html.php
Log:


Modified: branches/3_dev/http/plugins/mb_login.js
===================================================================
--- branches/3_dev/http/plugins/mb_login.js	2010-04-10 11:27:42 UTC (rev 5885)
+++ branches/3_dev/http/plugins/mb_login.js	2010-04-10 11:55:14 UTC (rev 5886)
@@ -2,8 +2,24 @@
 	$.fn.login = function () {
 		return this.each(function () {
 			//alert(this.id);
-			//if($(this).is('div')
-					$(this).load("./plugins/mb_login_html.php");
+			if ($(this).is('div')) {
+				$(this).load("./plugins/mb_login_html.php");
+			}
+			else {
+				var $loginDiv = $("<div title='Login'/>").hide().load("./plugins/mb_login_html.php");
+				$(this).append($loginDiv).bind("click", function () {
+					$loginDiv.dialog({
+						buttons: {
+							"Login": function () {
+								$("form", $loginDiv).get(0).submit();
+							}
+						},
+						modal: true,
+						resizable: false,
+						draggable: false
+					});
+				});
+			}
 		});
 	};
 })(jQuery);
\ No newline at end of file

Modified: branches/3_dev/http/plugins/mb_login_html.php
===================================================================
--- branches/3_dev/http/plugins/mb_login_html.php	2010-04-10 11:27:42 UTC (rev 5885)
+++ branches/3_dev/http/plugins/mb_login_html.php	2010-04-10 11:55:14 UTC (rev 5886)
@@ -5,7 +5,8 @@
 	echo "<table>";
 	echo "<tr><td>" . _mb("Name") . ": </td><td><input type='text' name='name' class='login_text' value=''></td></tr>";
 	echo "<tr><td>" . _mb("Password") . ": </td><td><input type='password' name='password' class='login_text'></td></tr>";
-	echo "<tr><td></td><td><input type='submit' class='myButton' value='login' title='anmelden'>";
+	echo "<tr><td></td><td>";
+//	echo "<input type='submit' class='myButton' value='login' title='anmelden'>";
 	echo "&nbsp;&nbsp;<a href='../frames/forgottenPassword.php' title='" . 
 		_mb("Forgot your password?") . "' target='_blank'>" . 
 		_mb("Forgot your password?") . "</a>";



More information about the Mapbender_commits mailing list