[open-ils-commits] r19747 - trunk/Open-ILS/xul/staff_client/server/main (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Tue Mar 15 07:59:04 EDT 2011


Author: phasefx
Date: 2011-03-15 07:59:04 -0400 (Tue, 15 Mar 2011)
New Revision: 19747

Modified:
   trunk/Open-ILS/xul/staff_client/server/main/ws_info.xul
Log:
Default workstation name to something sensible.

Like the computer's hostname. But not localhost.

Author: Thomas Berezansky <tsbere at mvlc.org>
Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
Signed-off-by: Jason Etheridge <jason at esilibrary.com>


Modified: trunk/Open-ILS/xul/staff_client/server/main/ws_info.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/main/ws_info.xul	2011-03-15 01:39:52 UTC (rev 19746)
+++ trunk/Open-ILS/xul/staff_client/server/main/ws_info.xul	2011-03-15 11:59:04 UTC (rev 19747)
@@ -106,11 +106,17 @@
 
             g.tb = document.getElementById('wsname');
 
+            var dnsService = Components.classes["@mozilla.org/network/dns-service;1"]
+                 .createInstance(Components.interfaces.nsIDNSService);
+
             render_menulist();
 
             document.getElementById('register_btn').disabled = false;
             document.getElementById('wsname').disabled = false;
-            document.getElementById('wsname').value = '';
+            if(dnsService.myHostName && dnsService.myHostName.toLowerCase() != 'localhost')
+                g.tb.value = dnsService.myHostName;
+            else
+                g.tb.value = '';
 
             document.getElementById('wsname').focus();
         }



More information about the open-ils-commits mailing list