alert('Error in volume_copy_creator.js, g.doc_id not valid');
window.close(); return;
}
- var sb = document.getElementById('summary_box'); while(sb.firstChild) sb.removeChild(sb.lastChild);
- var summary = document.createElement('iframe'); sb.appendChild(summary);
- summary.setAttribute('src',urls.XUL_BIB_BRIEF);
- summary.setAttribute('flex','1');
- get_contentWindow(summary).xulG = { 'docid' : g.doc_id };
+
+ var sb = document.getElementById('summary_box');
+ if (xul_param('no_bib_summary')) {
+ sb.hidden = true;
+ sb.nextSibling.hidden = true; /* splitter */
+ } else {
+ while(sb.firstChild) sb.removeChild(sb.lastChild);
+ var summary = document.createElement('iframe'); sb.appendChild(summary);
+ summary.setAttribute('src',urls.XUL_BIB_BRIEF);
+ summary.setAttribute('flex','1');
+ get_contentWindow(summary).xulG = { 'docid' : g.doc_id };
+ }
/***********************************************************************************************************/
/* Setup pcrud and fetch the monographic parts for this bib */
dump('Error in volume_copy_creator.js, my_init(), trying to auto-scroll to the far right: ' + E + '\n');
}
+ if (typeof xulG.volume_ui_callback_for_unified_interface == 'function') {
+ xulG.volume_ui_callback_for_unified_interface();
+ }
+
} catch(E) {
var err_msg = $("commonStrings").getFormattedString('common.exception', ['cat/volume_copy_creator.js', E]);
try { g.error.sdump('D_ERROR',err_msg); } catch(E) { dump(err_msg); dump(js2JSON(E)); }
<grippy/>
</splitter>
<vbox id="main" oils_persist="height" flex="1">
- <hbox flex="0">
- <hbox id="batch_bar">
- <label value="&staff.cat.volume_copy_creator.batch_bar;"/>
- <label class="cn_class" value="&staff.cat.volume_copy_creator.batch_bar.call_number.classification;"/>
- <hbox class="cn_class" id="batch_class"/>
- <label class="cn_prefix" value="&staff.cat.volume_copy_creator.batch_bar.call_number.prefix;"/>
- <hbox class="cn_prefix" id="batch_prefix"/>
- <label value="&staff.cat.volume_copy_creator.batch_bar.call_number.label.label;"
- accesskey="&staff.cat.volume_copy_creator.batch_bar.call_number.label.accesskey;" control="marc_cn_menulist"/>
- <hbox id="marc_cn"/>
- <label class="cn_suffix" value="&staff.cat.volume_copy_creator.batch_bar.call_number.suffix;"/>
- <hbox class="cn_suffix" id="batch_suffix"/>
- <hbox id="batch_button_box"/>
- </hbox>
- <spacer flex="1" />
- </hbox>
<groupbox flex="1" class="my_overflow">
<caption id="caption" label="&staff.cat.volume_copy_creator.label;"/>
+ <hbox flex="0">
+ <hbox id="batch_bar" flex="1">
+ <label value="&staff.cat.volume_copy_creator.batch_bar;"/>
+ <label class="cn_class" value="&staff.cat.volume_copy_creator.batch_bar.call_number.classification;"/>
+ <hbox class="cn_class" id="batch_class"/>
+ <label class="cn_prefix" value="&staff.cat.volume_copy_creator.batch_bar.call_number.prefix;"/>
+ <hbox class="cn_prefix" id="batch_prefix"/>
+ <label value="&staff.cat.volume_copy_creator.batch_bar.call_number.label.label;"
+ accesskey="&staff.cat.volume_copy_creator.batch_bar.call_number.label.accesskey;" control="marc_cn_menulist"/>
+ <hbox id="marc_cn"/>
+ <label class="cn_suffix" value="&staff.cat.volume_copy_creator.batch_bar.call_number.suffix;"/>
+ <hbox class="cn_suffix" id="batch_suffix"/>
+ <hbox id="batch_button_box"/>
+ </hbox>
+ </hbox>
<grid flex="1">
<columns> <column flex="0"/> <column flex="0"/> <column flex="1"/> </columns>
<rows id="rows">
xulG.not_modal = true;
xulG.edit = true;
+ // Volume Creator looks for these
+ xulG.no_bib_summary = true;
+ xulG.volume_ui_callback_for_unified_interface = function() {
+ on_volume_pane_load();
+ };
+
// Spawn the volume/copy creator
JSAN.use('util.browser');
var volume_pane = new util.browser();
'push_xulG' : true,
'alt_print' : false,
'browser_id' : 'volume_pane',
- 'passthru_content_params' : xulG,
- 'on_url_load' : function() {
- if ($('Create')) { // in horizontal UI variant
- // Hide the Create button in the embedded volume creator
- var f_content = get_contentWindow( $('volume_pane' ) );
- var original_btn = f_content.document.getElementById('Create');
- original_btn.hidden = true;
- $('Create').setAttribute(
- 'label',
- $('catStrings').getString('staff.cat.volume_copy_creator.create.btn.label')
- );
- $('Create').setAttribute(
- 'accesskey',
- $('catStrings').getString('staff.cat.volume_copy_creator.create.btn.accesskey')
- );
- g.stash_and_close = function(p) {
- // Wire up the method for the replacement button
- f_content.g.stash_and_close(p);
- }
- }
- }
+ 'passthru_content_params' : xulG
}
);
}
}
+function on_volume_pane_load() {
+ try {
+ var f_content = get_contentWindow( $('volume_pane' ) );
+
+ // horizontal UI variant has its own create button
+ if ($('Create')) {
+ var original_btn = f_content.document.getElementById('Create');
+ original_btn.hidden = true;
+ $('Create').setAttribute(
+ 'label',
+ $('catStrings').getString('staff.cat.volume_copy_creator.create.btn.label')
+ );
+ $('Create').setAttribute(
+ 'accesskey',
+ $('catStrings').getString('staff.cat.volume_copy_creator.create.btn.accesskey')
+ );
+ g.stash_and_close = function(p) {
+ // Wire up the method for the replacement button
+ f_content.g.stash_and_close(p);
+ }
+ }
+
+ // load the bib summary pane
+ var sb = document.getElementById('summary_box');
+ while(sb.firstChild) sb.removeChild(sb.lastChild);
+ var summary = document.createElement('iframe'); sb.appendChild(summary);
+ summary.setAttribute('src',urls.XUL_BIB_BRIEF);
+ summary.setAttribute('flex','1');
+ get_contentWindow(summary).xulG = { 'docid' : f_content.g.doc_id };
+ dump('f_content.g.doc_id = ' + f_content.g.doc_id + '\n');
+ } catch(E) {
+ alert('Error in volume_copy_editor.js, on_volume_pane_load(): ' + E);
+ }
+}
<script type="text/javascript" src="/xul/server/main/JSAN.js"/>
<script type="text/javascript" src="volume_copy_editor.js"/>
+ <vbox id="summary_box" oils_persist="height"/>
+ <splitter
+ collapse="before"
+ resize_before="flex"
+ resize_after="grow"
+ oils_persist="state hidden"
+ oils_persist_peers="summary_box main">
+ <grippy/>
+ </splitter>
<vbox flex="1">
<vbox id="top_pane" flex="1" oils_persist="height">
<hbox id="template_bar_holder"/>
<script type="text/javascript" src="/xul/server/main/JSAN.js"/>
<script type="text/javascript" src="volume_copy_editor.js"/>
- <hbox id="template_bar_holder"/>
+ <vbox id="summary_box" oils_persist="height"/>
+ <splitter
+ collapse="before"
+ resize_before="flex"
+ resize_after="grow"
+ oils_persist="state hidden"
+ oils_persist_peers="summary_box main">
+ <grippy/>
+ </splitter>
+ <hbox flex="0" id="template_bar_holder"/>
<hbox flex="1">
<vbox id="top_pane" flex="1" oils_persist="width">
<browser id="volume_pane" flex="1" />