[open-ils-commits] [GIT] Evergreen ILS branch master updated. fbded261a9e82a9135e9e346ceee6cfa3c6e087a
Evergreen Git
git at git.evergreen-ils.org
Tue Jan 29 16:06:40 EST 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, master has been updated
via fbded261a9e82a9135e9e346ceee6cfa3c6e087a (commit)
from 5a47a857c5994f1251341391fd4123148f22c441 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit fbded261a9e82a9135e9e346ceee6cfa3c6e087a
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date: Mon Jan 21 14:54:55 2013 -0500
Serials: Caption/pattern wizard use enum fields for chronology when no enum
MFHD spec says that when there are no ‡a - ‡f enumeration captions, any
chronology captions should move back from their usual ‡i - ‡m places
back into enumeration space.
The predictions engine we already have deals with this better than with
the wrong patterns we were creating before, e.g.:
853 20 ‡81 ‡i(year) ‡j(month) ‡wm
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Signed-off-by: Dan Wells <dbw2 at calvin.edu>
diff --git a/Open-ILS/xul/staff_client/server/serial/pattern_wizard.js b/Open-ILS/xul/staff_client/server/serial/pattern_wizard.js
index 68c58d3..6842562 100644
--- a/Open-ILS/xul/staff_client/server/serial/pattern_wizard.js
+++ b/Open-ILS/xul/staff_client/server/serial/pattern_wizard.js
@@ -545,6 +545,13 @@ function ChronEditor() {
}
};
+ /* When a caption and pattern has no enumeration, the chronology
+ * fields should go into the enumeration fields. */
+ this._shift_to_enum = function(subfield) {
+ /* i -> a, j -> b, ... */
+ return String.fromCharCode(subfield.charCodeAt(0) - 8);
+ };
+
this.remove_row = function(subfield) {
if (this._test_removability(subfield)) {
hard_empty(this.rows[subfield].element);
@@ -582,7 +589,7 @@ function ChronEditor() {
(this.active ? show : hide)("chron_editor_here");
};
- this.compile = function() {
+ this.compile = function(enum_used) {
if (!this.active) return [];
return this.subfields.filter(
@@ -592,7 +599,12 @@ function ChronEditor() {
var caption = self.rows[subfield].fields.caption.value;
if (!self.rows[subfield].fields.display_in_holding.checked)
caption = "(" + caption + ")";
- return result.concat([subfield, caption]);
+ return result.concat(
+ [
+ (enum_used ? subfield : self._shift_to_enum(subfield)),
+ caption
+ ]
+ );
}, []
);
};
@@ -896,7 +908,7 @@ function Wizard() {
];
code = code.concat(this.enum_editor.compile());
- code = code.concat(this.chron_editor.compile());
+ code = code.concat(this.chron_editor.compile(this.enum_editor.active));
code = code.concat("w", this.field_w.value);
-----------------------------------------------------------------------
Summary of changes:
.../staff_client/server/serial/pattern_wizard.js | 18 +++++++++++++++---
1 files changed, 15 insertions(+), 3 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list