[open-ils-commits] r18548 - in trunk/Open-ILS/web/opac/skin/default: js xml/common (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Nov 1 13:13:46 EDT 2010


Author: phasefx
Date: 2010-11-01 13:13:42 -0400 (Mon, 01 Nov 2010)
New Revision: 18548

Modified:
   trunk/Open-ILS/web/opac/skin/default/js/sidebar.js
   trunk/Open-ILS/web/opac/skin/default/xml/common/login.xml
Log:
this wraps the input elements used for opac login in an actual form element, with the goal of allowing browsers to save credentials for the site.  So far this appears to work for Firefox 3.6.12, but not for Chrome 7.0.517.41, Opera 10.63, nor Safari 5.0.2.  IE 8.0.6001.18702 will prompt for saving credentials, but won't actually populate the form on a revisit.  Some of this may be due to me using an invalid/expired SSL-cert on my dev box, but I suspect it's really because another page is not being loaded after form submission.  Any ideas/suggestions?


Modified: trunk/Open-ILS/web/opac/skin/default/js/sidebar.js
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/js/sidebar.js	2010-11-01 16:23:22 UTC (rev 18547)
+++ trunk/Open-ILS/web/opac/skin/default/js/sidebar.js	2010-11-01 17:13:42 UTC (rev 18548)
@@ -157,12 +157,12 @@
 
 function initLogin() {
 
-	G.ui.login.button.onclick = loginDance;
+	G.ui.login.button.onclick = function(evt) { G.ui.login.form.setAttribute('action','javascript:loginDance();'); };
 	G.ui.login.username.onkeydown = 
-		function(evt) {if(userPressedEnter(evt)) loginDance();};
+		function(evt) {if(userPressedEnter(evt)) G.ui.login.form.setAttribute('action','javascript:loginDance();');};
 	G.ui.login.password.onkeydown = 
-		function(evt) {if(userPressedEnter(evt)) loginDance();};
-
+		function(evt) {if(userPressedEnter(evt)) G.ui.login.form.setAttribute('action','javascript:loginDance();');};
+    
 //	if(loginBoxVisible) {
 //		showCanvas();
 //	} else {
@@ -171,9 +171,9 @@
 //	}
 
 //	loginBoxVisible = !loginBoxVisible;
-	G.ui.login.cancel.onclick = showCanvas;
+	G.ui.login.cancel.onclick = function(evt) { G.ui.login.form.setAttribute('action','javascript:showCanvas();'); };
 	if(findCurrentPage() == MYOPAC) 
-		G.ui.login.cancel.onclick = goHome;
+		G.ui.login.cancel.onclick = function(evt) { G.ui.login.form.setAttribute('action','javascript:goHome();'); };
 }
 
 function setSidebarLinks() {

Modified: trunk/Open-ILS/web/opac/skin/default/xml/common/login.xml
===================================================================
--- trunk/Open-ILS/web/opac/skin/default/xml/common/login.xml	2010-11-01 16:23:22 UTC (rev 18547)
+++ trunk/Open-ILS/web/opac/skin/default/xml/common/login.xml	2010-11-01 17:13:42 UTC (rev 18548)
@@ -4,6 +4,7 @@
 	<script language='javascript' type='text/javascript'>
 		config.ids.login = {};
 		config.css.login = {};
+		config.ids.login.form			= "login_form";
 		config.ids.login.box			= "login_box";
 		config.ids.login.tbody			= "login_tbody";
 		config.ids.login.username	= "login_username";
@@ -22,39 +23,41 @@
 
 	<br/>
 
-	<table id='login_table' class='data_grid' style='margin-left: 20px;' width='95%'>
-		<tbody id='login_tbody'>
-			<tr>
-				<td><span class='login_text'>&login.username;</span></td>
-				<td>
-					<span class='login_text'>
-						<input id='login_username' type='text' size='16' />
-					</span>
-				</td>
-			</tr>
-			<tr>
-				<td>
-					<span class='login_text'>&common.password;</span>
-				</td>
-				<td>
-					<span class='login_text'>
-						<input id='login_password' type='password' size='16' />
-					</span>
-				</td>
-			</tr>
-			<tr><td><br/></td><td/></tr>
-			<tr class='color_1'>
-				<td colspan='2' align='center'>
-					<span class='login_text' style='margin-right: 20px;'>
-					<input type='submit' value='&common.login;'  id='login_button'/>
-					</span>
-					<span class='login_text' style='margin-left: 20px;'>
-						<input type='submit' id='login_cancel_button' value='&common.cancel;'/>
-					</span>
-				</td>
-			</tr>
-		</tbody>
-	</table>
+    <form id='login_form'>
+        <table id='login_table' class='data_grid' style='margin-left: 20px;' width='95%'>
+            <tbody id='login_tbody'>
+                <tr>
+                    <td><span class='login_text'>&login.username;</span></td>
+                    <td>
+                        <span class='login_text'>
+                            <input id='login_username' type='text' size='16' />
+                        </span>
+                    </td>
+                </tr>
+                <tr>
+                    <td>
+                        <span class='login_text'>&common.password;</span>
+                    </td>
+                    <td>
+                        <span class='login_text'>
+                            <input id='login_password' type='password' size='16' />
+                        </span>
+                    </td>
+                </tr>
+                <tr><td><br/></td><td/></tr>
+                <tr class='color_1'>
+                    <td colspan='2' align='center'>
+                        <span class='login_text' style='margin-right: 20px;'>
+                        <input type='submit' value='&common.login;'  id='login_button'/>
+                        </span>
+                        <span class='login_text' style='margin-left: 20px;'>
+                            <input type='submit' id='login_cancel_button' value='&common.cancel;'/>
+                        </span>
+                    </td>
+                </tr>
+            </tbody>
+        </table>
+    </form>
 
 	<table id='change_pw_table' class='data_grid hide_me' style='margin-left: 20px;' width='95%'>
 		<thead>



More information about the open-ils-commits mailing list