From b81e6e7205cce876b93969dcfec967353ece04cd Mon Sep 17 00:00:00 2001 From: senator Date: Wed, 20 Oct 2010 15:59:55 +0000 Subject: [PATCH] Alt serials interface tweak Add a shortcut for the user to jump back from the streams interface to the distributions tab of the subscription details interface git-svn-id: svn://svn.open-ils.org/ILS/trunk@18407 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- Open-ILS/web/js/ui/default/serial/list_stream.js | 14 +++++++++++- .../web/js/ui/default/serial/list_subscription.js | 16 +++++++++++++- Open-ILS/web/js/ui/default/serial/subscription.js | 25 +++++++++++++++++----- .../web/templates/default/serial/list_stream.tt2 | 5 +---- .../templates/default/serial/list_subscription.tt2 | 10 +-------- .../web/templates/default/serial/subscription.tt2 | 6 +++--- .../xul/staff_client/chrome/content/cat/opac.js | 3 ++- 7 files changed, 55 insertions(+), 24 deletions(-) diff --git a/Open-ILS/web/js/ui/default/serial/list_stream.js b/Open-ILS/web/js/ui/default/serial/list_stream.js index e61127a928..befc46e434 100644 --- a/Open-ILS/web/js/ui/default/serial/list_stream.js +++ b/Open-ILS/web/js/ui/default/serial/list_stream.js @@ -4,8 +4,11 @@ dojo.require("dijit.form.TextBox"); dojo.require("openils.widget.AutoGrid"); dojo.require("openils.widget.ProgressDialog"); dojo.require("openils.PermaCrud"); +dojo.require("openils.CGI"); var pcrud; +var dist_id; +var cgi; function format_routing_label(routing_label) { return routing_label ? routing_label : "[None]"; @@ -27,7 +30,13 @@ function load_sdist_display() { "sdist", dist_id, { "onresponse": function(r) { if (r = openils.Util.readResponse(r)) { - dojo.byId("sdist_label_here").innerHTML = r.label(); + var link = dojo.byId("sdist_label_here"); + link.onclick = function() { + location.href = oilsBasePath + + "/eg/serial/subscription?id=" + + r.subscription() + "&tab=distributions"; + } + link.innerHTML = r.label(); load_sdist_org_unit_display(r); } } @@ -65,7 +74,10 @@ function create_many_streams(fields) { openils.Util.addOnLoad( function() { + cgi = new openils.CGI(); pcrud = new openils.PermaCrud(); + + dist_id = cgi.param("distribution"); load_sdist_display(); load_sstr_grid(); } diff --git a/Open-ILS/web/js/ui/default/serial/list_subscription.js b/Open-ILS/web/js/ui/default/serial/list_subscription.js index 206b7309f0..0f166fe9f8 100644 --- a/Open-ILS/web/js/ui/default/serial/list_subscription.js +++ b/Open-ILS/web/js/ui/default/serial/list_subscription.js @@ -2,9 +2,13 @@ dojo.require("dijit.form.Button"); dojo.require("openils.widget.AutoGrid"); dojo.require("openils.widget.OrgUnitFilteringSelect"); dojo.require("openils.BibTemplate"); +dojo.require("openils.CGI"); + +var terms; +var cgi; function format_ssub_link(id) { - return "" + id + ""; } @@ -15,6 +19,16 @@ function load_ssub_grid() { openils.Util.addOnLoad( function() { + cgi = new openils.CGI(); + + terms = { + "owning_lib": aou.orgNodeTrail( + aou.findOrgUnit(openils.User.user.ws_ou()), + true /* asId */ + ), + "record_entry": cgi.param("record_entry") || _fallback_record_entry + }; + if (terms.record_entry) new openils.BibTemplate({"record": terms.record_entry}).render(); diff --git a/Open-ILS/web/js/ui/default/serial/subscription.js b/Open-ILS/web/js/ui/default/serial/subscription.js index 9c23942e07..9ac890da0b 100644 --- a/Open-ILS/web/js/ui/default/serial/subscription.js +++ b/Open-ILS/web/js/ui/default/serial/subscription.js @@ -10,9 +10,12 @@ dojo.require("openils.widget.AutoGrid"); dojo.require("openils.widget.ProgressDialog"); dojo.require("openils.widget.HoldingCode"); dojo.require("openils.PermaCrud"); +dojo.require("openils.CGI"); var pcrud; +var cgi; var sub; +var sub_id; /* typing save: add {get,set}Value() to all HTML