[open-ils-commits] [GIT] Evergreen ILS branch rel_2_2 updated. 0f56e42e33f6ccbb3c4d772e1f9d1024d23b5f10

Evergreen Git git at git.evergreen-ils.org
Mon Mar 11 20:03:29 EDT 2013


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, rel_2_2 has been updated
       via  0f56e42e33f6ccbb3c4d772e1f9d1024d23b5f10 (commit)
       via  f40d901d7e95d710c9814740af12120c5641eadb (commit)
      from  c5019e4ef98378a2f63b770959c7ca29c233825f (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 0f56e42e33f6ccbb3c4d772e1f9d1024d23b5f10
Author: Dan Wells <dbw2 at calvin.edu>
Date:   Thu Feb 28 14:49:16 2013 -0500

    Don't populate the MFHD menu with distributions
    
    If a distribution has no legacy record, it shouldn't get a menu
    entry in the MFHD menus. A magic id of '-1' is used to indicate
    this case, so we need to check for that when populating
    mfhdDetails via the TPAC.
    
    Also, entryNum must be an int, not a string, because it is
    incremented prior to display. Removing the quotes solves this
    display issue.
    
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/templates/opac/parts/js.tt2 b/Open-ILS/src/templates/opac/parts/js.tt2
index fb500c7..4dfb0a4 100644
--- a/Open-ILS/src/templates/opac/parts/js.tt2
+++ b/Open-ILS/src/templates/opac/parts/js.tt2
@@ -21,12 +21,14 @@
         <script>
             window.mfhdDetails = [
                 [% FOR summary IN ctx.mfhd_summaries %]
+                    [% IF summary.sre_id != -1 %]
                 {
                     'id' : '[% summary.sre_id %]', 
                     'label' : '[% summary.location | replace("'", "\\'") %]',
-                    'entryNum' : '[% loop.index %]',
+                    'entryNum' : [% loop.index %],
                     'owning_lib' : '[% summary.owning_lib %]'
                 },
+                    [% END %]
                 [% END %]
             ];
         </script>

commit f40d901d7e95d710c9814740af12120c5641eadb
Author: Dan Scott <dscott at laurentian.ca>
Date:   Thu Sep 6 12:25:01 2012 -0400

    TPAC: Escape single quotes in MFHD record location
    
    If an MFHD record contains an 852 field with a subfield containing a
    single quote, the unescaped single quote is introduced directly into the
    value of the JavaScript hash that uses single quotes as delimiters -
    thereby generating a JS exception and preventing the staff client from
    properly populating the MFHD Editor menu.
    
    This commit escapes incoming single quotes from the MFHD location field
    to prevent that from happening. The other fields in the JS hash are
    numeric and therefore should not need escaping.
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Lebbeous Fogle-Weekley <lebbeous at esilibrary.com>
    Signed-off-by: Dan Wells <dbw2 at calvin.edu>
    Signed-off-by: Ben Shum <bshum at biblio.org>

diff --git a/Open-ILS/src/templates/opac/parts/js.tt2 b/Open-ILS/src/templates/opac/parts/js.tt2
index 72f0caa..fb500c7 100644
--- a/Open-ILS/src/templates/opac/parts/js.tt2
+++ b/Open-ILS/src/templates/opac/parts/js.tt2
@@ -23,7 +23,7 @@
                 [% FOR summary IN ctx.mfhd_summaries %]
                 {
                     'id' : '[% summary.sre_id %]', 
-                    'label' : '[% summary.location %]',
+                    'label' : '[% summary.location | replace("'", "\\'") %]',
                     'entryNum' : '[% loop.index %]',
                     'owning_lib' : '[% summary.owning_lib %]'
                 },

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

Summary of changes:
 Open-ILS/src/templates/opac/parts/js.tt2 |    6 ++++--
 1 files changed, 4 insertions(+), 2 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list