[open-ils-commits] [GIT] Evergreen ILS branch master updated. 8584fb7013a01a1c0a6164cb709ae02474e9b404

Evergreen Git git at git.evergreen-ils.org
Mon Mar 19 11:31:52 EDT 2012


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, master has been updated
       via  8584fb7013a01a1c0a6164cb709ae02474e9b404 (commit)
       via  d56aec84eacfbc41829bcca3b0899e26e78e8fe8 (commit)
      from  3fc982940370c3123ca8af637775cd7958532c00 (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 8584fb7013a01a1c0a6164cb709ae02474e9b404
Author: Bill Erickson <berick at esilibrary.com>
Date:   Fri Mar 16 17:01:11 2012 -0400

    Layout tweak to return-to-search-results staff button
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul
index e8bfcda..0c97436 100644
--- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul
+++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul
@@ -40,9 +40,8 @@
             <button id="record_prev" accesskey="&staff.cat.opac.record_prev.accesskey;" label="&staff.cat.opac.record_prev.label;" oncommand="if (g.f_record_prev) g.f_record_prev();"/>
             <button id="record_next" accesskey="&staff.cat.opac.record_next.accesskey;" label="&staff.cat.opac.record_next.label;" oncommand="if (g.f_record_next) g.f_record_next();"/>
             <button id="record_end" accesskey="&staff.cat.opac.record_end.accesskey;" label="&staff.cat.opac.record_end.label;" oncommand="if (g.f_record_end) g.f_record_end();"/>
-            <spacer flex="1"/>
             <button id="record_back_to_results" accesskey="&staff.cat.opac.record_back_to_results.accesskey;" label="&staff.cat.opac.record_back_to_results.label;" oncommand="if (g.f_record_back_to_results) g.f_record_back_to_results();"/>
-            <spacer flex="3"/>
+            <spacer flex="1"/>
             <menubar>
                 <menu label="&staff.cat.opac.menu.label;" accesskey="&staff.cat.opac.menu.accesskey;">
                 <menupopup>

commit d56aec84eacfbc41829bcca3b0899e26e78e8fe8
Author: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
Date:   Tue Mar 13 17:18:17 2012 -0400

    Staff client: add a back-to-search-results button in the chrome that ...
    
    ... wraps the OPAC (whether JSPAC or TPAC).
    
    You don't really need this when in OPAC view, because the OPAC page
    itself will have a link that does the same thing.  However, if you're
    browsing through records in a search result set one at a time in some
    other view, say the MARC view, then this button can come in handy.
    
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Michael Peters <mrpeters at library.in.gov>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/templates/opac/parts/js.tt2 b/Open-ILS/src/templates/opac/parts/js.tt2
index a7bc567..517b230 100644
--- a/Open-ILS/src/templates/opac/parts/js.tt2
+++ b/Open-ILS/src/templates/opac/parts/js.tt2
@@ -12,7 +12,8 @@
                 "[% ctx.prev_rec_url || '' %]",
                 "[% ctx.next_rec_url || '' %]",
                 "[% mkurl(ctx.first_search_record, {page => 0}) %]",
-                "[% mkurl(ctx.last_search_record, {page => POSIX.floor(ctx.hit_count / ctx.page_size)}) %]"
+                "[% mkurl(ctx.last_search_record, {page => POSIX.floor(ctx.hit_count / ctx.page_size)}) %]",
+                "[% mkurl(ctx.opac_root _ '/results', {}, ['expand','cnoffset']) %]"
             );
         </script>
         [% END %]
diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js
index b952cef..55e5612 100644
--- a/Open-ILS/web/js/ui/default/opac/staff.js
+++ b/Open-ILS/web/js/ui/default/opac/staff.js
@@ -27,10 +27,16 @@ window.onload = function() {
     }
 }
 
-function rdetail_next_prev_actions(index, count, prev, next, start, end) {
-    /*  we get the relative URL from the template:  recid?query_args...
+function rdetail_next_prev_actions(index, count, prev, next, start, end, results) {
+    /*  we mostly get the relative URL from the template:  recid?query_args...
         replace the recid and args on location.href to get the new URL  */
-    function fullurl(url) { return location.href.replace(/\/\d+\??.*/, '/' + url); }
+    function fullurl(url) {
+        if (url.match(/eg\/opac\/results/)) {
+            return location.href.replace(/eg\/opac\/.+$/, url);
+        } else {
+            return location.href.replace(/\/\d+\??.*/, '/' + url);
+        }
+    }
 
     if (index > 0) {
         if(prev) 
@@ -46,6 +52,8 @@ function rdetail_next_prev_actions(index, count, prev, next, start, end) {
             window.rdetailEnd = function() { location.href = fullurl(end); }
     }
 
+    window.rdetailBackToResults = function() { location.href = fullurl(results); };
+
     ol = window.onload;
     window.onload = function() {
         if(ol) ol(); 
diff --git a/Open-ILS/web/opac/locale/en-US/lang.dtd b/Open-ILS/web/opac/locale/en-US/lang.dtd
index 3561e30..a20ea1f 100644
--- a/Open-ILS/web/opac/locale/en-US/lang.dtd
+++ b/Open-ILS/web/opac/locale/en-US/lang.dtd
@@ -311,6 +311,8 @@
 <!ENTITY staff.cat.opac.menu.label "Actions for this Record">
 <!ENTITY staff.cat.opac.opac_view.accesskey "O">
 <!ENTITY staff.cat.opac.opac_view.label "OPAC View">
+<!ENTITY staff.cat.opac.record_back_to_results.accesskey "H">
+<!ENTITY staff.cat.opac.record_back_to_results.label "Search Results">
 <!ENTITY staff.cat.opac.record_end.accesskey "E">
 <!ENTITY staff.cat.opac.record_end.label "End">
 <!ENTITY staff.cat.opac.record_next.accesskey "N">
diff --git a/Open-ILS/web/opac/skin/default/js/rdetail.js b/Open-ILS/web/opac/skin/default/js/rdetail.js
index c4f1616..55a1837 100644
--- a/Open-ILS/web/opac/skin/default/js/rdetail.js
+++ b/Open-ILS/web/opac/skin/default/js/rdetail.js
@@ -42,6 +42,7 @@ var rdetailPrev = null;
 var rdetailNext = null;
 var rdetailStart = null;
 var rdetailEnd = null;
+var rdetailBackToResults = null;
 
 var mfhdDetails = [];
 var orgHiding = false;
@@ -108,6 +109,7 @@ function rdetailSetPaging(ids) {
 		rdetailNext = function() { _rdetailNav(nextRecord); };
 		rdetailEnd = function() { _rdetailNav(cachedRecords.ids[cachedRecords.ids.length-1]); };
 	}
+    rdetailBackToResults = function() { location.href = prevRResults(); };
 
 	runEvt('rdetail', 'nextPrevDrawn', i, cachedRecords.ids.length);
 }
diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
index 4bd3128..52c84ef 100644
--- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
+++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
@@ -422,9 +422,12 @@ function set_opac() {
                     }
                 );
                 
-                g.f_record_start = null; g.f_record_prev = null; g.f_record_next = null; g.f_record_end = null;
+                g.f_record_start = null; g.f_record_prev = null;
+                g.f_record_next = null; g.f_record_end = null;
+                g.f_record_back_to_results = null;
                 $('record_start').disabled = true; $('record_next').disabled = true;
                 $('record_prev').disabled = true; $('record_end').disabled = true;
+                $('record_back_to_results').disabled = true;
                 $('record_pos').setAttribute('value','');
 
                 win.attachEvt("rdetail", "nextPrevDrawn",
@@ -458,6 +461,17 @@ function set_opac() {
                             }
                             $('record_end').disabled = false;
                         }
+                        if (win.rdetailBackToResults) {
+                            g.f_record_back_to_results = function() {
+                                g.view_override = g.view;
+                                win.rdetailBackToResults();
+                                if (g.view != "opac") {
+                                    set_opac();
+                                    opac_wrapper_set_help_context();
+                                }
+                            }
+                            $('record_back_to_results').disabled = false;
+                        }
                     }
                 );
 
diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul
index 2d775d3..e8bfcda 100644
--- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul
+++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.xul
@@ -41,6 +41,8 @@
             <button id="record_next" accesskey="&staff.cat.opac.record_next.accesskey;" label="&staff.cat.opac.record_next.label;" oncommand="if (g.f_record_next) g.f_record_next();"/>
             <button id="record_end" accesskey="&staff.cat.opac.record_end.accesskey;" label="&staff.cat.opac.record_end.label;" oncommand="if (g.f_record_end) g.f_record_end();"/>
             <spacer flex="1"/>
+            <button id="record_back_to_results" accesskey="&staff.cat.opac.record_back_to_results.accesskey;" label="&staff.cat.opac.record_back_to_results.label;" oncommand="if (g.f_record_back_to_results) g.f_record_back_to_results();"/>
+            <spacer flex="3"/>
             <menubar>
                 <menu label="&staff.cat.opac.menu.label;" accesskey="&staff.cat.opac.menu.accesskey;">
                 <menupopup>

-----------------------------------------------------------------------

Summary of changes:
 Open-ILS/src/templates/opac/parts/js.tt2           |    3 ++-
 Open-ILS/web/js/ui/default/opac/staff.js           |   14 +++++++++++---
 Open-ILS/web/opac/locale/en-US/lang.dtd            |    2 ++
 Open-ILS/web/opac/skin/default/js/rdetail.js       |    2 ++
 .../xul/staff_client/chrome/content/cat/opac.js    |   16 +++++++++++++++-
 .../xul/staff_client/chrome/content/cat/opac.xul   |    1 +
 6 files changed, 33 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list