install_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT NOW()
);
-INSERT INTO config.upgrade_log (version) VALUES ('0380'); -- dbs
+INSERT INTO config.upgrade_log (version) VALUES ('0381'); -- dbs
CREATE TABLE config.bib_source (
id SERIAL PRIMARY KEY,
'coust', 'description'),
'integer'
)
+ ,('cat.label.font.weight',
+ oils_i18n_gettext('cat.label.font.weight',
+ 'Cataloging: Spine and pocket label font weight', 'coust', 'label'),
+ oils_i18n_gettext('cat.label.font.weight',
+ 'Set the preferred font weight for spine and pocket labels. You can specify "normal", "bold", "bolder", or "lighter".',
+ 'coust', 'description'),
+ 'string'
+ )
;
INSERT INTO actor.org_unit_setting (org_unit, name, value) VALUES
,(1, 'cat.spine.line.width', 8)
,(1, 'cat.label.font.family', '"monospace"')
,(1, 'cat.label.font.size', 10)
+ ,(1, 'cat.label.font.weight', '"normal"')
;
--- /dev/null
+BEGIN;
+
+INSERT INTO config.upgrade_log (version) VALUES ('0381'); -- dbs
+
+INSERT INTO config.org_unit_setting_type (name, label, description, datatype)
+ VALUES
+ ('cat.label.font.weight',
+ oils_i18n_gettext('cat.label.font.weight',
+ 'Cataloging: Spine and pocket label font weight', 'coust', 'label'),
+ oils_i18n_gettext('cat.label.font.weight',
+ 'Set the preferred font weight for spine and pocket labels. You can specify "normal", "bold", "bolder", or "lighter".',
+ 'coust', 'description'),
+ 'string'
+ )
+;
+
+INSERT INTO actor.org_unit_setting (org_unit, name, value) VALUES
+ (1, 'cat.label.font.weight', '"normal"')
+;
<!ENTITY staff.cat.spine_labels.close_window.label "Close Window">
<!ENTITY staff.cat.spine_labels.close_window.accesskey "C">
<!ENTITY staff.cat.spine_labels.font_size.label "Font size (in points):">
+<!ENTITY staff.cat.spine_labels.font_weight.label 'Font weight ("normal" or "bold"):'>
<!ENTITY staff.cat.spine_labels.spine_label.label "Spine Label">
<!ENTITY staff.cat.spine_labels.spine_label.left_margin.label "Left Margin (in characters):">
<!ENTITY staff.cat.spine_labels.spine_label.label_width.label "Label Width (in characters):">
<!ENTITY staff.cat.spine_labels.spine_label.label_length.label "Label Length (in lines):">
<!ENTITY staff.cat.spine_labels.pocket_label.label "Pocket Label">
+<!ENTITY staff.cat.spine_labels.pocket_label.enabled.label "Enabled">
<!ENTITY staff.cat.spine_labels.pocket_label.middle_margin.label "Middle Margin (in characters):">
<!ENTITY staff.cat.spine_labels.pocket_label.label_width.label "Label Width (in characters):">
<!ENTITY staff.cat.spine_labels.pocket_label.label_length.label "Label Length (in lines):">
<!ENTITY staff.cat.spine_labels.pocket_label.title.label "Include Title (wraps on word at label width)">
<!ENTITY staff.cat.spine_labels.on_line.label "On line:">
+<!ENTITY staff.cat.spine_labels.pocket_label.include_author.label "Include Author">
<!ENTITY staff.cat.spine_labels.pocket_label.include_title.label "Include Title (segment after wrapping)">
<!ENTITY staff.cat.spine_labels.indent_title.label "Indent a space?">
<!ENTITY staff.cat.spine_labels.inc_call_number.label "Include Call Number">
label_cfg.font_size = g.data.hash.aous['cat.label.font.size'] || 10;
$('pt').value = label_cfg.font_size;
}
+ label_cfg.font_weight = $('font_weight').value; /* font weight */
+ if (!label_cfg.font_weight) {
+ label_cfg.font_weight = g.data.hash.aous['cat.label.font.weight'] || 'normal';
+ $('font_weight').value = label_cfg.font_weight;
+ }
label_cfg.font_family = g.data.hash.aous['cat.label.font.family'] || 'monospace';
label_cfg.pocket_width = Number($('plw').value) || 28; /* pocket label width */
label_cfg.pocket_length = Number($('pll').value) || 9; /* pocket label length */
var tb = document.createElement('textbox'); hb2.appendChild(tb);
tb.value = '';
tb.setAttribute('class','plain');
- tb.setAttribute('style','font-family: ' + label_cfg.font_family + '; font-size: ' + label_cfg.font_size);
+ tb.setAttribute('style',
+ 'font-family: ' + label_cfg.font_family
+ + '; font-size: ' + label_cfg.font_size
+ + '; font-weight: ' + label_cfg.font_weight
+ );
tb.setAttribute('size',label_cfg.spine_width+1);
tb.setAttribute('maxlength',label_cfg.spine_width);
tb.setAttribute('name','spine');
if ($('pl').checked && j < label_cfg.pocket_length) {
var tb2 = document.createElement('textbox'); hb2.appendChild(tb2);
tb2.value = '';
- tb2.setAttribute('class','plain'); tb2.setAttribute('style','font-family: ' + label_cfg.font_family + '; font-size: ' + label_cfg.font_size);
+ tb2.setAttribute('class','plain');
+ tb2.setAttribute('style',
+ 'font-family: ' + label_cfg.font_family
+ + '; font-size: ' + label_cfg.font_size
+ + '; font-weight: ' + label_cfg.font_weight
+ );
tb2.setAttribute('size',label_cfg.pocket_width+1); tb2.setAttribute('maxlength',label_cfg.pocket_width);
tb2.setAttribute('name','pocket');
if ($('title').checked && $('title_line').value == j + 1 && instanceOf(volume.record(),mvr)) {
$('pt').value = pt;
}
var ff = g.data.hash.aous['cat.spine.font.family'] || 'monospace';
+ var fw = $('font_weight').value; /* font weight */
+ if (!fw) {
+ fw = g.data.hash.aous['cat.label.font.weight'] || 'normal';
+ }
var lm = Number($('lm').value); /* left margin */
if (!lm) {
lm = g.data.hash.aous['cat.spine.line.margin'] || 11;
var plw = Number($('plw').value) || 28; var pll = Number($('pll').value) || 9; /* pocket label width and length */
var html = "<html><head>";
html += "<link type='text/css' rel='stylesheet' href='" + xulG.url_prefix('/xul/server/skin/print.css') + "'></link>"
- html += "<link type='text/css' rel='stylesheet' href='data:text/css,pre{font-family:" + ff + ";font-size:" + pt + "pt;}'></link>";
+ html += "<link type='text/css' rel='stylesheet' href='data:text/css,pre{font-family:" + ff + ";font-size:" + pt + "pt; font-weight: " + fw + ";}'></link>";
html += "<title>Spine Labels</title></head><body>\n";
var nl = document.getElementsByAttribute('name','template');
for (var i = 0; i < nl.length; i++) {
accesskey="&staff.cat.spine_labels.close_window.accesskey;" oncommand="window.close()"/>
</hbox>
- <hbox>
- <label value="&staff.cat.spine_labels.font_size.label;" control="pt"/>
- <textbox id="pt" value="" onchange="this.setAttribute('value',this.value)" oils_persist="value" context="clipboard"/>
- </hbox>
+ <grid><columns><column/><column/></columns><rows>
+ <row>
+ <label value="&staff.cat.spine_labels.font_size.label;" control="pt"/>
+ <textbox id="pt" value="" onchange="this.setAttribute('value',this.value)" oils_persist="value" context="clipboard"/>
+ </row>
+ <row>
+ <label value="&staff.cat.spine_labels.font_weight.label;" control="font_weight"/>
+ <textbox id="font_weight" value="" onchange="this.setAttribute('value',this.value)" oils_persist="value" context="clipboard"/>
+ </row>
+ </rows></grid>
<grid><columns><column/><column/><column/><column/></columns><rows>
<row> <label class="header" value="&staff.cat.spine_labels.spine_label.label;"/><spacer/> </row>
<row> <label value="&staff.cat.spine_labels.spine_label.left_margin.label;" control="lm"/><textbox id="lm" value="" onchange="this.setAttribute('value',this.value)" oils_persist="value" context="clipboard"/> </row>
<row> <label value="&staff.cat.spine_labels.spine_label.label_width.label;" control="lw"/><textbox id="lw" value="" onchange="this.setAttribute('value',this.value)" oils_persist="value" context="clipboard"/> </row>
<row> <label value="&staff.cat.spine_labels.spine_label.label_length.label;" control="ll"/><textbox id="ll" value="" onchange="this.setAttribute('value',this.value)" oils_persist="value" context="clipboard"/> </row>
- <row> <label class="header" value="&staff.cat.spine_labels.pocket_label.label;"/><checkbox id="pl" checked="false" oils_persist="checked" label="Enabled"/> </row>
+ <row> <label class="header" value="&staff.cat.spine_labels.pocket_label.label;"/><checkbox id="pl" checked="false" oils_persist="checked" label="&staff.cat.spine_labels.pocket_label.enabled.label;"/> </row>
<row> <label value="&staff.cat.spine_labels.pocket_label.middle_margin.label;" control="mm"/><textbox id="mm" value="2" onchange="this.setAttribute('value',this.value)" oils_persist="value" context="clipboard"/> </row>
<row> <label value="&staff.cat.spine_labels.pocket_label.label_width.label;" control="plw"/><textbox id="plw" value="28" onchange="this.setAttribute('value',this.value)" oils_persist="value" context="clipboard"/> </row>
<row> <label value="&staff.cat.spine_labels.pocket_label.label_length.label;" control="pll"/><textbox id="pll" value="9" onchange="this.setAttribute('value',this.value)" oils_persist="value" context="clipboard"/> </row>
</row>
<row> <spacer/><checkbox id="title_r_indent" checked="true" oils_persist="checked" label="&staff.cat.spine_labels.indent_title.label;"/> </row>
<row>
- <checkbox id="author" checked="true" oils_persist="checked" label="Include Author"/>
+ <checkbox id="author" checked="true" oils_persist="checked" label="&staff.cat.spine_labels.pocket_label.include_author.label;"/>
<hbox>
<label value="&staff.cat.spine_labels.on_line.label;"/>
<textbox id="author_line" value="3" oils_persist="value" onchange="this.setAttribute('value',this.value)" context="clipboard"/>