From 5f96230a758b09c49869cf116f2b0d230bad39cc Mon Sep 17 00:00:00 2001 From: phasefx Date: Fri, 4 Aug 2006 09:13:54 +0000 Subject: [PATCH] dirty hack around changing local chrome, for quick record buckets git-svn-id: svn://svn.open-ils.org/ILS/trunk@5289 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- .../chrome/content/main/constants.js | 1 + .../server/cat/record_buckets.xul | 20 ++++++++++++++++--- 2 files changed, 18 insertions(+), 3 deletions(-) diff --git a/Open-ILS/xul/staff_client/chrome/content/main/constants.js b/Open-ILS/xul/staff_client/chrome/content/main/constants.js index cb5568e459..d50b631aab 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -208,6 +208,7 @@ const urls = { 'XUL_PRE_CAT' : '/xul/server/circ/pre_cat_fields.xul', 'XUL_PRINT_LIST_TEMPLATE_EDITOR' : '/xul/server/circ/print_list_template_editor.xul', 'XUL_RECORD_BUCKETS' : '/xul/server/cat/record_buckets.xul', + 'XUL_RECORD_BUCKETS_QUICK' : '/xul/server/cat/record_buckets_quick.xul', 'XUL_REMOTE_BROWSER' : '/xul/server/util/rbrowser.xul', 'XUL_SPINE_LABEL' : '/xul/server/cat/spine_labels.xul', 'XUL_STANDALONE' : 'chrome://open_ils_staff_client/content/circ/offline.xul', diff --git a/Open-ILS/xul/staff_client/server/cat/record_buckets.xul b/Open-ILS/xul/staff_client/server/cat/record_buckets.xul index a27fc25452..65232360fe 100644 --- a/Open-ILS/xul/staff_client/server/cat/record_buckets.xul +++ b/Open-ILS/xul/staff_client/server/cat/record_buckets.xul @@ -21,7 +21,7 @@ @@ -35,18 +35,32 @@ function my_init() { try { netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect"); - if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); } + + /* ugly hack so we don't have to upgrade the chrome for quick buckets */ + if (typeof xulG == 'undefined') location.href = String(location.href).replace(/record_buckets.xul/,'record_buckets_quick.xul'); + + if (typeof JSAN == 'undefined') { throw( "The JSAN library object is missing."); } JSAN.errorLevel = "die"; // none, warn, or die JSAN.addRepository('/xul/server/'); JSAN.use('util.error'); g.error = new util.error(); g.error.sdump('D_TRACE','my_init() for record_buckets.xul'); + JSAN.use('OpenILS.data'); g.data = new OpenILS.data(); g.data.init({'via':'stash'}); g.cgi = new CGI(); + var record_ids = []; + if (g.cgi.param('record_ids')) record_ids = record_ids.concat( JSON2js( g.cgi.param('record_ids') ) ); + if (typeof window.xuLG == 'object' && typeof window.xulG.record_ids != 'undefined') + record_ids = record_ids.concat( window.xulG.record_ids ); + if (typeof g.data.rb_temp_record_ids != 'undefined' && g.data.rb_temp_record_ids != null) { + record_ids = record_ids.concat( JSON2js( g.data.rb_temp_record_ids ) ); + g.data.rb_temp_record_ids = undefined; g.data.stash('rb_temp_record_ids'); + } + JSAN.use('cat.record_buckets'); g.record_buckets = new cat.record_buckets(); g.record_buckets.init( { - 'record_ids' : JSON2js( g.cgi.param('record_ids') ), + 'record_ids' : record_ids, } ); -- 2.43.2