ACQ : worksheet Return action focuses lineitem
authorBill Erickson <berick@esilibrary.com>
Thu, 12 Jul 2012 18:09:32 +0000 (14:09 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Tue, 24 Jul 2012 16:46:00 +0000 (12:46 -0400)
Adds a new Return button to the lineitem worksheet page which returns
the user to the previous interface with the lineitem in question
focused.  Uses a new CGI param "focus_li".

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Open-ILS/src/templates/acq/lineitem/worksheet.tt2

index 262c270..8b95e03 100644 (file)
@@ -1,8 +1,15 @@
 [% WRAPPER "base.tt2" %]
 [% ctx.page_title = "Lineitem Worksheet" %]
-<script type="text/javascript">var liId = "[% ctx.page_args.0 %]";</script>
+<script type="text/javascript">
+    var liId = "[% ctx.page_args.0 %]";
+    dojo.require('openils.CGI');
+    var cgi = new openils.CGI({url : document.referrer});
+    cgi.param('focus_li', liId);
+    var returnRef = cgi.url();
+</script>
 <h1>Lineitem Worksheet</h1>
-<br/>
+<div dojoType='dijit.form.Button' scrollOnFocus='false' onClick='location.href = returnRef'>&#x2196; Return</div>
+<br/><br/>
 <div id="acq-worksheet-contents"></div>
 <div class='hidden'>
     <div jsId='progressDialog' dojoType='openils.widget.ProgressDialog' message='Loading Worksheet...'></div>