For now, you could put something like this in server/skin/custom.js to re-configure the display:
try {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefs = Components.classes['@mozilla.org/preferences-service;1'].getService(Components.interfaces['nsIPrefBranch']);
prefs.setCharPref(
'oils.bib_brief.alternate_copy_summary.dynamic_grid_replacement.data',
js2JSON([
['title', 'edition', 'editor'],
['author', 'pubdate', 'edit_date'],
['call_number', 'tcn', 'create_date']
])
);
} catch(E) {
dump('Error in custom.js trying to set oils.bib_brief.alternate_copy_summary.dynamic_grid_replacement.data: ' + E + '\n');
}
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
Signed-off-by: Bill Erickson <berick@esilibrary.com>
var docid;
-function my_init(orientation) {
+function bib_brief_init(mode) {
try {
ui_init(); // JSAN, etc.
- if (! orientation) { orientation = 'horizontal'; }
+ if (! mode) { mode = 'horizontal'; }
JSAN.use('OpenILS.data');
g.data = new OpenILS.data();
try {
g.meta = req2.getResultObject()[0];
set_caption();
- dynamic_grid_replacement(orientation);
+ dynamic_grid_replacement(mode);
bib_brief_overlay({
'mvr' : g.mods,
'bre' : g.meta
g.error.sdump('D_TRACE','my_init() for cat_bib_brief.xul');
}
-function dynamic_grid_replacement(orientation) {
+function dynamic_grid_replacement(mode) {
netscape.security.PrivilegeManager.enablePrivilege("UniversalXPConnect");
var prefs = Components.classes[
'@mozilla.org/preferences-service;1'
Components.interfaces['nsIPrefBranch']
);
if (! prefs.prefHasUserValue(
- 'oils.bib_brief.'+orientation+'.dynamic_grid_replacement.data'
+ 'oils.bib_brief.'+mode+'.dynamic_grid_replacement.data'
)
) {
- return;
+ return false;
}
var gridData = JSON2js(
prefs.getCharPref(
- 'oils.bib_brief.'+orientation+'.dynamic_grid_replacement.data'
+ 'oils.bib_brief.'+mode+'.dynamic_grid_replacement.data'
)
);
var grid = document.getElementById('bib_brief_grid');
- if (!grid) { return; }
+ if (!grid) { return false; }
JSAN.use('util.widgets');
row.appendChild(textbox);
}
}
+ return true;
}
<?xul-overlay href="/xul/server/cat/bib_brief_overlay.xul"?>
<window id="cat_bib_brief_win"
- onload="try { my_init(); font_helper(); persist_helper(); unhide_add_volumes_button(); } catch(E) { alert(E); }"
+ onload="try { bib_brief_init(); font_helper(); persist_helper(); unhide_add_volumes_button(); } catch(E) { alert(E); }"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
<?xul-overlay href="/xul/server/cat/bib_brief_overlay_vertical.xul"?>
<window id="cat_bib_brief_win"
- onload="try { my_init('vertical'); font_helper(); persist_helper(); } catch(E) { alert(E); }"
+ onload="try { bib_brief_init('vertical'); font_helper(); persist_helper(); } catch(E) { alert(E); }"
xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
<!-- ///////////////////////////////////////////////////////////////////////////////////////////////////////////// -->
// Should get back .mvr, .copy, .volume, .transit, .circ, .hold
}
- if (typeof bib_brief_overlay == 'function') bib_brief_overlay( { 'mvr' : details.mvr, 'acp' : details.copy } );
+ if (typeof dynamic_grid_replacement == 'function') {
+ dynamic_grid_replacement('alternate_copy_summary');
+ }
+ if (typeof bib_brief_overlay == 'function') {
+ bib_brief_overlay({
+ 'mvr' : details.mvr,
+ 'acp' : details.copy
+ });
+ }
set("stat_cat_entries", '');
set("age_protect", '');
<scripts id="openils_util_scripts"/>
<script type="text/javascript" src="/xul/server/main/JSAN.js"/>
+ <script type="text/javascript" src="/xul/server/cat/bib_brief.js"/>
<script type="text/javascript" src="alternate_copy_summary.js"/>
<messagecatalog id="circStrings" src="/xul/server/locale/<!--#echo var='locale'-->/circ.properties"/>
staff.cat.bib_brief.pubdate.accesskey=
staff.cat.bib_brief.bib_call_number.label=Bib Call #:
staff.cat.bib_brief.bib_call_number.accesskey=
+staff.cat.bib_brief.call_number.label=Item Call #:
+staff.cat.bib_brief.ib_call_number.accesskey=
staff.cat.bib_brief.tcn.label=TCN:
staff.cat.bib_brief.tcn.accesskey=
staff.cat.bib_brief.mvr_doc_id.label=Record ID: