This includes removing the toggle option for TPac usage.
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Ben Shum <bshum@biblio.org>
Signed-off-by: Mike Rylander <mrylander@gmail.com>
<!ENTITY staff.client.portal.receipts.description "Edit Receipt Templates">
<!ENTITY staff.client.portal.copyright "Copyright © 2006-2012 Georgia Public Library Service, and others">
<!ENTITY staff.client.portal.poweredby "Powered by">
-<!ENTITY staff.client.portal.toggle_tpac "Toggle Template Toolkit OPAC Use">
-<!ENTITY staff.client.portal.toggle_tpac.message_on "The use of the Template Toolkit OPAC has been enabled. You may need to restart the staff client for this to take effect.">
-<!ENTITY staff.client.portal.toggle_tpac.message_off "The use of the Template Toolkit OPAC has been disabled. You may need to restart the staff client for this to take effect.">
<!ENTITY staff.client.portal.open_new_tab.description "Open in a new tab">
<!ENTITY staff.client.portal.search.button "Search">
<!ENTITY staff.item.batch.hold.groupbox_caption "Request Details">
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 ;.
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;
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/',
'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);
-}
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);
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);
- }
// ]]>
</script>
<style type="text/css">
"#" onclick=
"try { receipt_editor(false); } catch(E) { alert(E); }; return false;">&staff.client.portal.receipts;</a></td>
</tr>
-
- <tr>
- <td height="50"><img src="skin/media/images/portal/book.png" height="48" width="48"
- onclick="try { toggle_tpac(); } catch(E) { alert(E) }; return false;" alt="&staff.client.portal.toggle_tpac;" /></td>
-
- <td><a href="#"
- onclick="try { toggle_tpac(); } catch(E) { alert(E); }; return false;">&staff.client.portal.toggle_tpac;</a></td>
- </tr>
</table>
</div>
- <span style="display:none" id="tpac_toggled_on">&staff.client.portal.toggle_tpac.message_on;</span>
- <span style="display:none" id="tpac_toggled_off">&staff.client.portal.toggle_tpac.message_off;</span>
</td>
</tr>
</table>