[open-ils-commits] r8263 -
trunk/Open-ILS/xul/staff_client/server/cat
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Dec 21 02:08:54 EST 2007
Author: phasefx
Date: 2007-12-21 01:47:03 -0500 (Fri, 21 Dec 2007)
New Revision: 8263
Modified:
trunk/Open-ILS/xul/staff_client/server/cat/z3950.js
trunk/Open-ILS/xul/staff_client/server/cat/z3950.xul
Log:
hardcode native evergreen catalog as a virtual z-source, and show 0 records found if no .count field
Modified: trunk/Open-ILS/xul/staff_client/server/cat/z3950.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/z3950.js 2007-12-21 06:18:07 UTC (rev 8262)
+++ trunk/Open-ILS/xul/staff_client/server/cat/z3950.js 2007-12-21 06:47:03 UTC (rev 8263)
@@ -199,7 +199,7 @@
for (var i = 0; i < nl.length; i++) { nl[i].disabled = true; }
var attrs = {};
for (var j = 0; j < obj.active_services.length; j++) {
- for (var i in obj.services[obj.active_services[j]].attrs) {
+ if (obj.services[obj.active_services[j]]) for (var i in obj.services[obj.active_services[j]].attrs) {
var attr = obj.services[obj.active_services[j]].attrs[i];
if (! attrs[i]) {
attrs[i] = { 'labels' : {} };
@@ -264,6 +264,8 @@
}
}
+ document.getElementById('native-evergreen-catalog_service').addEventListener('command',handle_switch,false);
+
var robj = obj.network.simple_request(
'RETRIEVE_Z3950_SERVICES',
[ ses() ]
@@ -294,6 +296,7 @@
password.setAttribute('type','password'); r.appendChild(password);
if (typeof robj[i].auth != 'undefined') password.hidden = ! get_bool( robj[i].auth );
}
+ obj.services[ 'native-evergreen-catalog' ] = { 'attrs' : { 'author' : {}, 'title' : {} } };
setTimeout(
function() {
if (obj.creds.hosts[ obj.data.server_unadorned ]) {
@@ -335,7 +338,7 @@
var x = obj.creds.hosts[ obj.data.server_unadorned ].services[ obj.active_services[i] ].default_attr;
if (x) { focus_me = x; break; }
}
- for (var i in obj.services[ obj.active_services[i] ].attr) { or_focus_me = i; }
+ if (ob.services[ obj.active_services[i] ]) for (var i in obj.services[ obj.active_services[i] ].attr) { or_focus_me = i; }
}
if (! focus_me) focus_me = or_focus_me;
var xx = document.getElementById(focus_me+'_input'); if (xx) xx.focus();
@@ -466,7 +469,7 @@
} else {
x = document.createElement('description'); obj.controller.view.result_message.appendChild(x);
x.appendChild(
- document.createTextNode( results[i].count + ' records found')
+ document.createTextNode( (results[i].count ? results[i].count : 0) + ' records found')
);
}
if (results[i].records) {
Modified: trunk/Open-ILS/xul/staff_client/server/cat/z3950.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/z3950.xul 2007-12-21 06:18:07 UTC (rev 8262)
+++ trunk/Open-ILS/xul/staff_client/server/cat/z3950.xul 2007-12-21 06:47:03 UTC (rev 8263)
@@ -100,6 +100,11 @@
<label value="Username"/>
<label value="Password"/>
</row>
+ <row>
+ <checkbox id="native-evergreen-catalog_service" mytype="service_class" service="native-evergreen-catalog" label="Local Catalog" tooltiptext="Evergreen Native Catalog" />
+ <textbox id="native-evergreen-catalog_username" hidden="true"/>
+ <textbox id="native-evergreen-catalog_password" type="password" hidden="true"/>
+ </row>
</rows>
</grid>
</groupbox>
More information about the open-ils-commits
mailing list