[open-ils-commits] [GIT] Evergreen ILS branch rel_2_3 updated. ad4a7f49ef10bdbdbd7977b576c298ea691c927e
Evergreen Git
git at git.evergreen-ils.org
Tue Jan 29 16:07:38 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, rel_2_3 has been updated
via ad4a7f49ef10bdbdbd7977b576c298ea691c927e (commit)
from 677167d56647dd7351b41aeee4851384d05c734e (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 ad4a7f49ef10bdbdbd7977b576c298ea691c927e
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