From f483d430ad87ddacce775322b48284087cd62ac1 Mon Sep 17 00:00:00 2001 From: Thomas Berezansky Date: Mon, 17 Sep 2012 10:02:13 -0400 Subject: [PATCH] Disable JSPac in staff client This includes removing the toggle option for TPac usage. Signed-off-by: Thomas Berezansky Signed-off-by: Ben Shum Signed-off-by: Mike Rylander --- Open-ILS/web/opac/locale/en-US/lang.dtd | 3 --- .../xul/staff_client/chrome/content/cat/opac.js | 11 ++------- .../staff_client/chrome/content/main/constants.js | 26 ++++----------------- .../xul/staff_client/defaults/preferences/prefs.js | 3 --- Open-ILS/xul/staff_client/server/index.xhtml | 27 ---------------------- 5 files changed, 7 insertions(+), 63 deletions(-) diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd index 6f2543d7b5..0f6b2fe328 100644 --- a/Open-ILS/web/opac/locale/en-US/lang.dtd +++ b/Open-ILS/web/opac/locale/en-US/lang.dtd @@ -3645,9 +3645,6 @@ - - - diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js index a59d44f5a1..a9b9f5a001 100644 --- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js +++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js @@ -604,17 +604,10 @@ function set_opac() { content_params.get_barcode = xulG.get_barcode; content_params.get_barcode_and_settings = xulG.get_barcode_and_settings; - var secure_opac = true; // default to secure - var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']); - if (prefs.prefHasUserValue('oils.secure_opac')) { - secure_opac = prefs.getBoolPref('oils.secure_opac'); - } - dump('secure_opac = ' + secure_opac + '\n'); - if (opac_url) { - content_params.url = xulG.url_prefix( opac_url, secure_opac ); + content_params.url = xulG.url_prefix( opac_url, true ); } else { - content_params.url = xulG.url_prefix( 'browser', secure_opac ); + content_params.url = xulG.url_prefix( 'browser', true ); } if (g.data.adv_pane) { // For fun, we can have no extra params, extra params with &, or extra params with ;. 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 8ec44a8fe3..3556c8c2fd 100644 --- a/Open-ILS/xul/staff_client/chrome/content/main/constants.js +++ b/Open-ILS/xul/staff_client/chrome/content/main/constants.js @@ -25,13 +25,6 @@ if (!LOCALE) { LOCALE = 'en-US'; } -var use_tpac = false; -try { - use_tpac = pref.getBoolPref('oils.use_tpac'); -} catch (E) { - dump("Failed to get TPac preference: " + E + "\n"); -} - const MODE_RDONLY = 0x01; const MODE_WRONLY = 0x02; const MODE_CREATE = 0x08; @@ -379,12 +372,12 @@ var api = { var urls = { - 'opac' : 'oils://remote/opac/' + LOCALE + '/skin/default/xml/advanced.xml?nps=1', - 'opac_rdetail' : 'oils://remote/opac/' + LOCALE + '/skin/default/xml/rdetail.xml?r=', - 'opac_rresult' : 'oils://remote/opac/' + LOCALE + '/skin/default/xml/rresult.xml', - 'opac_rresult_metarecord' : 'oils://remote/opac/' + LOCALE + '/skin/default/xml/rresult.xml?m=', + 'opac' : 'oils://remote/eg/opac/advanced', + 'opac_rdetail' : 'oils://remote/eg/opac/record/', + 'opac_rresult' : 'oils://remote/eg/opac/results', + 'opac_rresult_metarecord' : 'oils://remote/eg/opac/results?metarecord=', 'org_tree' : '/opac/common/js/' + LOCALE + '/OrgTree.js', - 'browser' : 'oils://remote/opac/' + LOCALE + '/skin/default/xml/advanced.xml?nps=1', + 'browser' : 'oils://remote/eg/opac/advanced', 'fieldmapper' : '/opac/common/js/fmall.js', 'xsl_marc2html' : '/opac/extras/xsl/oilsMARC21slim2HTML.xsl', 'ac_jacket_small' : '/opac/extras/ac/jacket/small/', @@ -525,12 +518,3 @@ var urls = { 'EG_TRIGGER_EVENTS' : 'oils://remote/eg/actor/user/event_log', 'XUL_SEARCH_PREFS' : 'chrome://open_ils_staff_client/content/main/search_prefs.xul' } - -if(use_tpac) { - urls['opac'] = 'oils://remote/eg/opac/advanced'; - urls['opac_rdetail'] = 'oils://remote/eg/opac/record/'; - urls['opac_rresult'] = 'oils://remote/eg/opac/results'; - urls['opac_rresult_metarecord'] = 'oils://remote/eg/opac/results?metarecord='; - urls['browser'] = urls.opac; - pref.setBoolPref('oils.secure_opac',true); -} diff --git a/Open-ILS/xul/staff_client/defaults/preferences/prefs.js b/Open-ILS/xul/staff_client/defaults/preferences/prefs.js index 6352b6e04e..0613a13ddf 100644 --- a/Open-ILS/xul/staff_client/defaults/preferences/prefs.js +++ b/Open-ILS/xul/staff_client/defaults/preferences/prefs.js @@ -27,9 +27,6 @@ pref("open-ils.menu.toolbar.mode", ""); pref("open-ils.menu.toolbar.labelbelow", false); pref("open-ils.toolbar.defaultnewtab", false); -// Template Toolkit Opac Enabled in Staff Client -pref("oils.use_tpac", false); - // Copy location name first in copy editor pref("oils.copy_editor.copy_location_name_first", false); diff --git a/Open-ILS/xul/staff_client/server/index.xhtml b/Open-ILS/xul/staff_client/server/index.xhtml index 03bc29cf36..fafe2a1ea7 100644 --- a/Open-ILS/xul/staff_client/server/index.xhtml +++ b/Open-ILS/xul/staff_client/server/index.xhtml @@ -248,23 +248,6 @@ else xulG.set_tab(loc, {}, content_params); } - function toggle_tpac(mode) { - var use_tpac = false; - var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']); - try { - use_tpac = prefs.getBoolPref('oils.use_tpac'); - } catch (E) { - dump('Failed to get current use_tpac setting - Assuming false: ' + E); - } - use_tpac = !use_tpac; - prefs.setBoolPref('oils.use_tpac', use_tpac); - var message = document.getElementById('tpac_toggled_on'); - if(!use_tpac) { - message = document.getElementById('tpac_toggled_off'); - } - message = message.textContent; - alert(message); - } // ]]>