[Fedora-directory-commits] esc/src/app/xul/esc/chrome/content/esc GenericAuth.js, 1.3, 1.4

Jack Magne (jmagne) fedora-directory-commits at redhat.com
Tue May 8 00:24:11 UTC 2007


Author: jmagne

Update of /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv8081

Modified Files:
	GenericAuth.js 
Log Message:
Give input field focus.



Index: GenericAuth.js
===================================================================
RCS file: /cvs/dirsec/esc/src/app/xul/esc/chrome/content/esc/GenericAuth.js,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- GenericAuth.js	27 Sep 2006 17:31:51 -0000	1.3
+++ GenericAuth.js	8 May 2007 00:24:09 -0000	1.4
@@ -529,6 +529,7 @@
     }
 
     var i = 0;
+    var first_box = 1;
 
     for(i = 0 ; i < len ; i ++)
     {
@@ -594,6 +595,11 @@
                if(field)
                {
                     row.appendChild(field);
+                    if(first_box)
+                    {
+                        field.focus();
+                        first_box = 0;
+                    }
                }
 
            }
@@ -602,19 +608,20 @@
 
     }
 
-    var last_row = AddRowToGrid(grid);
-
-    if(last_row)
+    var ui_hbox = document.createElement("hbox");
+    if(ui_hbox)
     {
-         AddSpacerToNode(last_row,"1","min-height: 20px");
-         AddSpacerToNode(last_row,"1","min-height: 20px");
-        var button = AddButton("","Submit"); 
+        box.appendChild(ui_hbox);
+        AddSpacerToNode(ui_hbox,"1","");
+        var button = AddButton("",getBundleString("authSubmit")); 
         if(button)
+        {
             button.setAttribute("oncommand" , "FormSubmit();");
-
+            button.setAttribute("accesskey", getBundleString("authSubmitAccessKey"));
+        }
 
         if(button)
-            last_row.appendChild(button);
+            ui_hbox.appendChild(button);
     } 
 }
 




More information about the Fedora-directory-commits mailing list