From a960063f5dcdbb088685f9de5962af593c8d33e5 Mon Sep 17 00:00:00 2001 From: phasefx Date: Thu, 15 Apr 2010 15:38:41 +0000 Subject: [PATCH] Have Patron Merge interface honor horizontal patron summary setting git-svn-id: svn://svn.open-ils.org/ILS/trunk@16241 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/xul/staff_client/server/patron/util.js | 43 +++++++++++++++++++------ 1 file changed, 34 insertions(+), 9 deletions(-) diff --git a/Open-ILS/xul/staff_client/server/patron/util.js b/Open-ILS/xul/staff_client/server/patron/util.js index 224ed9bf3..9b0ce7c2e 100644 --- a/Open-ILS/xul/staff_client/server/patron/util.js +++ b/Open-ILS/xul/staff_client/server/patron/util.js @@ -753,6 +753,8 @@ patron.util.merge = function(record_ids) { try { netscape.security.PrivilegeManager.enablePrivilege('UniversalXPConnect UniversalBrowserWrite'); JSAN.use('util.error'); error = new util.error(); + JSAN.use('OpenILS.data'); var data = new OpenILS.data(); data.stash_retrieve(); + var horizontal_interface = String( data.hash.aous['ui.circ.patron_summary.horizontal'] ) == 'true'; var top_xml = ''; top_xml += '' + $("patronStrings").getString('staff.patron.usr_buckets.merge_records.merge_lead') + ''; top_xml += ''; @@ -762,24 +764,47 @@ patron.util.merge = function(record_ids) { + $("patronStrings").getString('staff.patron.usr_buckets.merge_records.cancel_button.accesskey') +'" name="fancy_cancel"/>'; var xml = '
'; - xml += ''; - for (var i = 0; i < record_ids.length; i++) { + xml += '
'; + + function table_cell_with_lead_button(id) { + var xml = ''; xml += ''; + xml += id + '); x.disabled = false; } catch(E) { alert(E); }">'; + xml += '' + $("patronStrings").getFormattedString('staff.patron.usr_buckets.merge_records.lead_record_number',[id]) + ''; + return xml; + } + + var iframe_css; + if (!horizontal_interface) { + xml += ''; + for (var i = 0; i < record_ids.length; i++) { + xml += table_cell_with_lead_button( record_ids[i] ); + } + xml += ''; + iframe_css = 'min-height: 1000px; min-width: 300px;'; + } else { + iframe_css = 'min-height: 200px; min-width: 1000px;'; } - xml += ''; for (var i = 0; i < record_ids.length; i++) { - xml += '
'; - xml += '' + $("patronStrings").getFormattedString('staff.patron.usr_buckets.merge_records.lead_record_number',[record_ids[i]]) + '