[open-ils-commits] r15706 - branches/rel_1_6/Open-ILS/xul/staff_client/server/cat (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Mar 5 10:06:18 EST 2010
Author: dbs
Date: 2010-03-05 10:06:16 -0500 (Fri, 05 Mar 2010)
New Revision: 15706
Modified:
branches/rel_1_6/Open-ILS/xul/staff_client/server/cat/z3950.js
Log:
Backport Warren Layton's patch for sorting Z39.50 servers from rel_1_6 (r14015)
Modified: branches/rel_1_6/Open-ILS/xul/staff_client/server/cat/z3950.js
===================================================================
--- branches/rel_1_6/Open-ILS/xul/staff_client/server/cat/z3950.js 2010-03-04 22:11:29 UTC (rev 15705)
+++ branches/rel_1_6/Open-ILS/xul/staff_client/server/cat/z3950.js 2010-03-05 15:06:16 UTC (rev 15706)
@@ -345,27 +345,18 @@
if (typeof robj.ilsevent != 'undefined') throw(robj);
obj.services = robj;
var x = document.getElementById('service_rows');
- var services = new Array();
for (var i in obj.services) {
- var label;
- if (obj.services[i].label) {
- label = obj.services[i].label;
- } else if (obj.services[i].name) {
- label = obj.services[i].name;
- } else {
- label = i;
- }
- var j = [label, i];
- services.push(j);
- }
- services.sort();
- for (var j=0; j < services.length; j++) {
- var i = services[j][1];
try {
if (i == 'native-evergreen-catalog') continue;
var r = document.createElement('row'); x.appendChild(r);
var cb = document.createElement('checkbox');
- cb.setAttribute('label',services[j][0]);
+ if (obj.services[i].label) {
+ cb.setAttribute('label',obj.services[i].label);
+ } else if (obj.services[i].name) {
+ cb.setAttribute('label',obj.services[i].name);
+ } else {
+ cb.setAttribute('label',i);
+ }
cb.setAttribute('tooltiptext',i + ' : ' + obj.services[i].db + '@' + obj.services[i].host + ':' + obj.services[i].port);
cb.setAttribute('mytype','service_class'); cb.setAttribute('service',i);
cb.setAttribute('id',i+'_service'); r.appendChild(cb);
More information about the open-ils-commits
mailing list