[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. 4f0b0ec1c62ed1107e83ae31718030444508e43f
Evergreen Git
git at git.evergreen-ils.org
Tue Jan 29 16:22:05 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_2 has been updated
via 4f0b0ec1c62ed1107e83ae31718030444508e43f (commit)
from 47b17025cbc82a9435b68323b29a6768ff7645ad (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 4f0b0ec1c62ed1107e83ae31718030444508e43f
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 6874719..da3d795 100644
--- a/Open-ILS/xul/staff_client/server/serial/pattern_wizard.js
+++ b/Open-ILS/xul/staff_client/server/serial/pattern_wizard.js
@@ -544,6 +544,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);
@@ -581,7 +588,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(
@@ -591,7 +598,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
+ ]
+ );
}, []
);
};
@@ -895,7 +907,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