From 0f6caa757861945f4ced5bb95608aabffed9316b Mon Sep 17 00:00:00 2001 From: Dan Wells Date: Fri, 8 Mar 2013 17:55:52 -0500 Subject: [PATCH] Move serials interfaces closer together Back in (I believe) 2.2, we brought the dijit issuance editor into the serial control interface with two goals: having less code in more places, and easing the transition to an eventual unified interface which would likely be more widget-based. That experiment was well received, so this commit takes things a large step further in that direction. Basically, we are embedding the alternate subscription editing interface into the serial control scaffolding, which ultimately amounts to giving you some of the benefits of both. You get the more modern and maintainable code from the alternate interfaces, but keep the context-awareness and familiar navigation of the non-alternate serial control. That said, this change is not meant to be the last word in serials, but rather a way to at least come closer together while we still continue to learn what structures provide the best experience. Finally, some feature additions were necessary to the alternate serials code in order to make this change as seamless as possible. In some cases, the new feature only works in the embedded version, but a new 'context' variable makes that simple to adjust as we move forward. Changes include: - note editors on subscriptions and distributions - labeled dropdown for distribution summary options - and legacy record entry linkages Signed-off-by: Dan Wells Signed-off-by: Lebbeous Fogle-Weekley --- Open-ILS/src/templates/serial/subscription.tt2 | 78 ++++++++++++++++++++ .../templates/serial/subscription/distribution.tt2 | 10 +-- .../src/templates/serial/subscription/issuance.tt2 | 2 + Open-ILS/web/js/ui/default/serial/subscription.js | 82 +++++++++++++++++++--- .../ui/default/serial/subscription/distribution.js | 60 ++++++++++++++++ .../xul/staff_client/server/serial/manage_subs.js | 18 +++-- .../xul/staff_client/server/serial/ssub_editor.xul | 27 +------ 7 files changed, 234 insertions(+), 43 deletions(-) create mode 100644 Open-ILS/web/js/ui/default/serial/subscription/distribution.js diff --git a/Open-ILS/src/templates/serial/subscription.tt2 b/Open-ILS/src/templates/serial/subscription.tt2 index bfe0f08729..5d91795774 100644 --- a/Open-ILS/src/templates/serial/subscription.tt2 +++ b/Open-ILS/src/templates/serial/subscription.tt2 @@ -1,5 +1,12 @@ +[% USE CGI; %] [% WRAPPER "base.tt2" %] @@ -7,6 +14,7 @@ + + +
+ + [%- ELSE -%]
[% INCLUDE "serial/subscription/distribution.tt2" %] diff --git a/Open-ILS/src/templates/serial/subscription/distribution.tt2 b/Open-ILS/src/templates/serial/subscription/distribution.tt2 index 8a3c886107..f20a9d38fc 100644 --- a/Open-ILS/src/templates/serial/subscription/distribution.tt2 +++ b/Open-ILS/src/templates/serial/subscription/distribution.tt2 @@ -3,13 +3,15 @@
[% l('Distributions') %]
[% l('View/Edit Notes') %] + [% l('Refresh Grid') %] + onClick="if (cgi.param('context') != 'scv') sub_grid._fresh = false; dist_grid.showCreateDialog();"> [% l('New Distribution') %] + onClick="if (cgi.param('context') != 'scv') sub_grid._fresh = false; dist_grid.deleteSelected();"> [% l('Delete Selected') %]
@@ -20,8 +22,8 @@ dojoType="openils.widget.AutoGrid" style="height: 550px;" fieldOrder="['subscription','label','holding_lib']" - suppressFields="['record_entry','subscription','receive_call_number','bind_call_number','bind_unit_template']" - suppressEditFields="['record_entry','receive_call_number','bind_call_number','bind_unit_template']" + suppressFields="['subscription','receive_call_number','bind_call_number','bind_unit_template']" + suppressEditFields="['receive_call_number','bind_call_number','bind_unit_template']" onPostSubmit="attempt_reload_opac" fmClass="sdist" query="{id: '*'}" diff --git a/Open-ILS/src/templates/serial/subscription/issuance.tt2 b/Open-ILS/src/templates/serial/subscription/issuance.tt2 index 1519c121f2..aaa0ee8cb1 100644 --- a/Open-ILS/src/templates/serial/subscription/issuance.tt2 +++ b/Open-ILS/src/templates/serial/subscription/issuance.tt2 @@ -10,10 +10,12 @@ onclick="iss_grid.deleteSelected();">[% l('Delete Selected') %]
+[%- IF CGI.param('context') != 'scv' -%]
[% l('Generate Predictions') %]
+[%- END -%]
- - - - - - - - - -