From: phasefx Date: Tue, 15 Mar 2011 11:59:04 +0000 (+0000) Subject: Default workstation name to something sensible. X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=602c578c43926ea2fd81f826b6d43b1248a95d16;p=evergreen%2Ftadl.git Default workstation name to something sensible. Like the computer's hostname. But not localhost. Author: Thomas Berezansky Signed-off-by: Thomas Berezansky Signed-off-by: Jason Etheridge git-svn-id: svn://svn.open-ils.org/ILS/trunk@19747 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- diff --git a/Open-ILS/xul/staff_client/server/main/ws_info.xul b/Open-ILS/xul/staff_client/server/main/ws_info.xul index 1bd51bf18b..40ab695542 100644 --- a/Open-ILS/xul/staff_client/server/main/ws_info.xul +++ b/Open-ILS/xul/staff_client/server/main/ws_info.xul @@ -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(); }