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

Evergreen Git git at git.evergreen-ils.org
Mon Sep 26 13:42:02 EDT 2011


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  f71a516945762f485ee2e7c625c8ac65bf346307 (commit)
       via  47f48c33b79bd8dec079ebc0f474ecc1d3aaf0d8 (commit)
      from  7e952b4ed88f7425be9ce9c1f7aff9a789578c66 (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 f71a516945762f485ee2e7c625c8ac65bf346307
Author: Dan Scott <dscott at laurentian.ca>
Date:   Mon Sep 26 13:34:00 2011 -0400

    TPAC: Fix for staff UI with multiple MFHD records
    
    XUL's JavaScript doesn't mind trailing commas on an array,
    but really doesn't like an array in which the elements aren't separated
    by commas :)
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/parts/js.tt2 b/Open-ILS/src/templates/opac/parts/js.tt2
index 6eaf150..9dbbeac 100644
--- a/Open-ILS/src/templates/opac/parts/js.tt2
+++ b/Open-ILS/src/templates/opac/parts/js.tt2
@@ -27,7 +27,7 @@
                     'label' : '[% summary.location %]',
                     'entryNum' : '[% loop.index %]',
                     'owning_lib' : '[% summary.owning_lib %]'
-                }
+                },
                 [% END %]
             ];
         </script>

commit 47f48c33b79bd8dec079ebc0f474ecc1d3aaf0d8
Author: Bill Erickson <berick at esilibrary.com>
Date:   Mon Sep 26 12:56:17 2011 -0400

    TPac: MFHD staff client actions integration
    
    Populdate the necessary window.mfhdDetails data for the staff client and
    fire the mfhdDrawn event
    
    Signed-off-by: Bill Erickson <berick at esilibrary.com>
    Signed-off-by: Dan Scott <dscott at laurentian.ca>

diff --git a/Open-ILS/src/templates/opac/parts/js.tt2 b/Open-ILS/src/templates/opac/parts/js.tt2
index c0b2e70..6eaf150 100644
--- a/Open-ILS/src/templates/opac/parts/js.tt2
+++ b/Open-ILS/src/templates/opac/parts/js.tt2
@@ -5,17 +5,33 @@
 
 [%- IF ctx.is_staff %]
 <script type="text/javascript" src="[% ctx.media_prefix %]/js/ui/default/opac/staff.js"></script>
-    [% IF ctx.page == 'record' AND ctx.search_result_index >= 0 %]
-    <script>
-        rdetail_next_prev_actions(
-            "[% ctx.search_result_index %]",
-            "[% ctx.hit_count %]",
-            "[% 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)}) %]"
-        );
-    </script>
+    [% IF ctx.page == 'record' %]
+        [% IF ctx.search_result_index >= 0 %]
+        <script>
+            rdetail_next_prev_actions(
+                "[% ctx.search_result_index %]",
+                "[% ctx.hit_count %]",
+                "[% 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)}) %]"
+            );
+        </script>
+        [% END %]
+        [% IF ctx.mfhd_summaries.size %]
+        <script>
+            window.mfhdDetails = [
+                [% FOR summary IN ctx.mfhd_summaries %]
+                {
+                    'id' : '[% summary.sre_id %]', 
+                    'label' : '[% summary.location %]',
+                    'entryNum' : '[% loop.index %]',
+                    'owning_lib' : '[% summary.owning_lib %]'
+                }
+                [% END %]
+            ];
+        </script>
+        [% END %]
     [% END %]
 [%- END %]
 
diff --git a/Open-ILS/web/js/ui/default/opac/staff.js b/Open-ILS/web/js/ui/default/opac/staff.js
index 5521e50..b952cef 100644
--- a/Open-ILS/web/js/ui/default/opac/staff.js
+++ b/Open-ILS/web/js/ui/default/opac/staff.js
@@ -21,8 +21,10 @@ function staff_hold_usr_input_disabler(input) {
 window.onload = function() {
     // record details page events
     var rec = location.href.match(/\/opac\/record\/(\d+)/);
-    if(rec && rec[1]) { runEvt('rdetail', 'recordRetrieved', rec[1]); }
-    // fire other events the staff client is expecting...
+    if(rec && rec[1]) { 
+        runEvt('rdetail', 'recordRetrieved', rec[1]); 
+        runEvt('rdetail', 'MFHDDrawn');
+    }
 }
 
 function rdetail_next_prev_actions(index, count, prev, next, start, end) {

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

Summary of changes:
 Open-ILS/src/templates/opac/parts/js.tt2 |   38 +++++++++++++++++++++--------
 Open-ILS/web/js/ui/default/opac/staff.js |    6 +++-
 2 files changed, 31 insertions(+), 13 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list