[open-ils-commits] r15709 - branches/rel_1_6_0/Open-ILS/xul/staff_client/server/cat (dbs)
svn at svn.open-ils.org
svn at svn.open-ils.org
Fri Mar 5 10:49:42 EST 2010
Author: dbs
Date: 2010-03-05 10:49:39 -0500 (Fri, 05 Mar 2010)
New Revision: 15709
Modified:
branches/rel_1_6_0/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_0/Open-ILS/xul/staff_client/server/cat/z3950.js
===================================================================
--- branches/rel_1_6_0/Open-ILS/xul/staff_client/server/cat/z3950.js 2010-03-05 15:40:21 UTC (rev 15708)
+++ branches/rel_1_6_0/Open-ILS/xul/staff_client/server/cat/z3950.js 2010-03-05 15:49:39 UTC (rev 15709)
@@ -345,18 +345,28 @@
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');
- 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('label',services[j][0]);
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