[open-ils-commits] ***SPAM*** [GIT] Evergreen ILS branch rel_2_5 updated. cdac86e1201d94b610678cdcf84e0e93107fdc05

Evergreen Git git at git.evergreen-ils.org
Wed Nov 20 10:50:32 EST 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_5 has been updated
       via  cdac86e1201d94b610678cdcf84e0e93107fdc05 (commit)
       via  95cbc4d3cc154fe3a503a261d3146b63fa3b491a (commit)
       via  950dede4146fed9023f6fbf8d289b522bf615a6d (commit)
      from  7169398270feea25e79e4682dbde3029f7de083b (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 cdac86e1201d94b610678cdcf84e0e93107fdc05
Author: Jason Stephenson <jstephenson at mvlc.org>
Date:   Fri Nov 8 15:02:53 2013 -0500

    Replace erroneous calls to $e->retrieve_authority_record($rec_id).
    
    On lines 153 and 175 of OpenILS::Application::Cat::Authority calls
    like the above should be $e->retrieve_authority_record_entry($rec_id).
    This branch replaces the two misspelled calls with the proper ones.
    
    Signed-off-by: Jason Stephenson <jstephenson at mvlc.org>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm
index 6d86b80..717bcb4 100644
--- a/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm
+++ b/Open-ILS/src/perlmods/lib/OpenILS/Application/Cat/Authority.pm
@@ -150,7 +150,7 @@ sub retrieve_authority_record {
     my($self, $conn, $auth, $rec_id, $options) = @_;
     my $e = new_editor(authtoken=>$auth);
     return $e->die_event unless $e->checkauth;
-    my $rec = $e->retrieve_authority_record($rec_id) or return $e->event;
+    my $rec = $e->retrieve_authority_record_entry($rec_id) or return $e->event;
     $rec->clear_marc if $$options{clear_marc};
     return $rec;
 }
@@ -172,7 +172,7 @@ sub batch_retrieve_authority_record {
     my $e = new_editor(authtoken=>$auth);
     return $e->die_event unless $e->checkauth;
     for my $rec_id (@$rec_id_list) {
-        my $rec = $e->retrieve_authority_record($rec_id) or return $e->event;
+        my $rec = $e->retrieve_authority_record_entry($rec_id) or return $e->event;
         $rec->clear_marc if $$options{clear_marc};
         $conn->respond($rec);
     }

commit 95cbc4d3cc154fe3a503a261d3146b63fa3b491a
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Thu Sep 12 12:02:15 2013 -0400

    LP1093856 fix Fast Item Add with Z39.50 import
    
    The first time I tried this fix I ran afoul of
    https://bugs.launchpad.net/evergreen/+bug/787561
    
    But a second attempt worked.  So I didn't kill
    two birds with one stone, but this should take
    care of 1093856.
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/xul/staff_client/server/cat/marcedit.js b/Open-ILS/xul/staff_client/server/cat/marcedit.js
index 7694d44..eee677e 100644
--- a/Open-ILS/xul/staff_client/server/cat/marcedit.js
+++ b/Open-ILS/xul/staff_client/server/cat/marcedit.js
@@ -991,6 +991,7 @@ function fastItemAdd_attempt(doc_id) {
         if (!document.getElementById('fastItemAdd_barcode').value) { return; }
         window.xulG.fast_add_item( doc_id, document.getElementById('fastItemAdd_callnumber').value, document.getElementById('fastItemAdd_barcode').value );
         document.getElementById('fastItemAdd_barcode').value = '';
+        return true;
     } catch(E) {
         alert('fastItemAdd_attempt: ' + E);
     }
@@ -998,11 +999,19 @@ function fastItemAdd_attempt(doc_id) {
 
 function save_attempt(xml_string) {
     try {
-        var result = window.xulG.save.func( xml_string );   
+        var result = window.xulG.save.func( xml_string );
+        // I'd prefer to pass on_complete on through to fast_item_add,
+        // but with the way these window scopes get destroyed with
+        // tab replacement, maybe not a good idea
+        var replace_on_complete = false;
         if (result) {
             oils_unlock_page();
-            if (result.id) fastItemAdd_attempt(result.id);
-            if (typeof result.on_complete == 'function') result.on_complete();
+            if (result.id) {
+                replace_on_complete = fastItemAdd_attempt(result.id);
+            }
+            if (!replace_on_complete && typeof result.on_complete == 'function') {
+                result.on_complete();
+            }
         }
     } catch(E) {
         alert('save_attempt: ' + E);

commit 950dede4146fed9023f6fbf8d289b522bf615a6d
Author: Liam Whalen <whalen.ld at gmail.com>
Date:   Sun Oct 6 22:11:56 2013 -0700

    LP#1037171 Removed Expert Search paramters from subject links
    
    After performing an Expert Search, if a user visits a record and then
    clicks on one of the author, subject, or series search links within that
    record, then they are given the results of the Expert Search again
    instead of the relevant subject or author search.
    
    This is happening because the Expert Search parameters are retained in
    the URLs via the TT2 MACRO mkurl.  In particular, the tag parameter is
    used to identify an Expert Search, so if it is present in a URL, than an
    Expert Search will be attempted regardless of which other paramaters are
    in the URL.
    
    To fix this, I created two varialbes within header.tt2 above the
    definition of mkurl.  These variables group common URL paramters for
    Expert Searches and General Search parameters together.  These variables
    can be used wherever mkurl is used to strip out unneeded search
    paramters.
    
    There is a third variable that is already present within many of these
    pages named stop_parms.  While I initially tried to modify this
    variable, I found that there are some instances where the general search
    parameters should be retained while the Expert Search parameters must go.
    
    This commit uses these three variables togehter as input into the third
    arugment of the mkurl MACRO.  The third arugment specifies which
    paramtes to remove from the previous URL before making a new URL based
    on the pervious URL.
    
    I also added the query parameter to the Place Hold's hold_source_page
    URL variable.  I did this, so that the query terms would be preserved
    once the user is done placing the hold or decides to cancle the placing
    of the hold.
    
    As well, I used the new variables to remove Expert Search paramters
    from the Advanced Search links on the results and record pages.
    
    Conflicts:
    
    	Open-ILS/src/templates/opac/parts/searchbar.tt2
    
    Signed-off-by: Liam Whalen <whalen.ld at gmail.com>
    Signed-off-by: Mike Rylander <mrylander at gmail.com>

diff --git a/Open-ILS/src/templates/opac/parts/header.tt2 b/Open-ILS/src/templates/opac/parts/header.tt2
index daa26e5..9a2858c 100644
--- a/Open-ILS/src/templates/opac/parts/header.tt2
+++ b/Open-ILS/src/templates/opac/parts/header.tt2
@@ -12,6 +12,10 @@
     is_advanced = CGI.param("_adv").size;
     is_special = CGI.param("_special").size;
 
+    #variables to use to remove parameters via mkurk
+    expert_search_parms = ['tag','subfield','term','_special'];
+    general_search_parms = ['page','sort','query'];
+
     # -----------------------------------------------------------------------------
     # mkurl( destination_page, params_to_set, params_to_clear )
     #
diff --git a/Open-ILS/src/templates/opac/parts/record/authors.tt2 b/Open-ILS/src/templates/opac/parts/record/authors.tt2
index a13843d..676e0f8 100644
--- a/Open-ILS/src/templates/opac/parts/record/authors.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/authors.tt2
@@ -65,7 +65,7 @@ BLOCK build_author_links;
                 term = term _ ' ' _ sf;
             END;
         END;
-        url = mkurl(ctx.opac_root _ '/results', {query => qterm, qtype => 'author'}, ['page', 'expand']);
+        url = mkurl(ctx.opac_root _ '/results', {query => qterm, qtype => 'author'}, stop_parms.merge(expert_search_parms, general_search_parms));
         author_type = (tlabel || label) | html;
         
         # schema.org changes
diff --git a/Open-ILS/src/templates/opac/parts/record/series.tt2 b/Open-ILS/src/templates/opac/parts/record/series.tt2
index 8b29b6b..9518232 100644
--- a/Open-ILS/src/templates/opac/parts/record/series.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/series.tt2
@@ -24,7 +24,7 @@ BLOCK render_series;
                 total_term = all_terms.join(" ").replace('\s+$', '');
 
                 url = mkurl(ctx.opac_root _ '/results',
-                    { qtype=>'series', query=>total_term }, stop_parms
+                    { qtype=>'series', query=>total_term }, stop_parms.merge(expert_search_parms, general_search_parms)
                 );
                 series = series _ '<a href="' _ url _ '">' _ single_term _ '</a> ';
             END;
diff --git a/Open-ILS/src/templates/opac/parts/record/subjects.tt2 b/Open-ILS/src/templates/opac/parts/record/subjects.tt2
index 5812690..68c421b 100644
--- a/Open-ILS/src/templates/opac/parts/record/subjects.tt2
+++ b/Open-ILS/src/templates/opac/parts/record/subjects.tt2
@@ -47,7 +47,7 @@
                 all_terms.push(subfield.textContent.replace('\-', ' ').replace('[#"^$\+,\.:;&|\[\]()]', ''));
                 total_term = all_terms.join(" ").replace('\s+$', '');
             %]
-<a href="[% mkurl(ctx.opac_root _ '/results', {qtype=>'subject', query=>total_term}, stop_parms); %]">[% single_term %]</a>
+<a href="[% mkurl(ctx.opac_root _ '/results', {qtype=>'subject', query=>total_term}, stop_parms.merge(expert_search_parms, general_search_parms)) %]">[% single_term %]</a>
             [%- END;
             IF all_terms.size; "<br/>"; END;
             FOREACH link880 IN graphics;
diff --git a/Open-ILS/src/templates/opac/parts/result/table.tt2 b/Open-ILS/src/templates/opac/parts/result/table.tt2
index fd1c20f..b481b5f 100644
--- a/Open-ILS/src/templates/opac/parts/result/table.tt2
+++ b/Open-ILS/src/templates/opac/parts/result/table.tt2
@@ -297,8 +297,8 @@ END;
         )
 %]
                                                         <div class="results_aux_utils place_hold"><a
-                                                                href="[% mkurl(ctx.opac_root _ '/place_hold', 
-                                                                    {hold_target => rec.id, hold_type => 'T', hold_source_page => mkurl()}) %]" 
+                                                                href="[% mkurl(ctx.opac_root _ '/place_hold',
+                                                                    {hold_target => rec.id, hold_type => 'T', hold_source_page => mkurl()}, ['query']) %]"
                                                                     name="place_hold_link" class="no-dec"><img
                                                                 src="[% ctx.media_prefix %]/images/green_check.png"
                                                                 alt=""/><span class="result_place_hold">[% l('Place Hold') %]</span></a>
diff --git a/Open-ILS/src/templates/opac/parts/searchbar.tt2 b/Open-ILS/src/templates/opac/parts/searchbar.tt2
index e16729f..3723099 100644
--- a/Open-ILS/src/templates/opac/parts/searchbar.tt2
+++ b/Open-ILS/src/templates/opac/parts/searchbar.tt2
@@ -5,7 +5,7 @@
     [%- END %]
     <div id="search-box">
         <span class="search_catalog_lbl mobile_hide">[% l('Search the Catalog') %]</span>
-        <span class="adv_search_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/advanced') %]"
+        <span class="adv_search_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/advanced', {}, general_search_parms.merge(expert_search_parms)) %]"
             id="home_adv_search_link">[% l('Advanced Search') %]</a></span>
         <span class="browse_the_catalog_lbl"><a href="[% mkurl(ctx.opac_root _ '/browse', {}, ['fi:has_browse_entry']) %]">[% l('Browse the Catalog') %]</a></span>
     </div>
diff --git a/Open-ILS/src/templates/opac/results.tt2 b/Open-ILS/src/templates/opac/results.tt2
index 24010f9..5006800 100644
--- a/Open-ILS/src/templates/opac/results.tt2
+++ b/Open-ILS/src/templates/opac/results.tt2
@@ -25,7 +25,7 @@
                     <a href="[% mkurl(ctx.opac_root _ '/home', {$loc_name => loc_value}, 1) %]">[% l('Another Search') %]</a>
                 </div>
                 <div class="results_header_btns">
-                    <a href="[% mkurl(ctx.opac_root _ '/advanced') %]">[% l('Advanced Search') %]</a>
+                    <a href="[% mkurl(ctx.opac_root _ '/advanced',{}, general_search_parms.merge(expert_search_parms)) %]">[% l('Advanced Search') %]</a>
                 </div>
                 <div id="refine_hits" class="results_header_btns result_block_visible"><a onclick="getFacety();">[% l('Refine these results') %]</a></div>
                 <div id="return_to_hits" class="results_header_btns"><a onclick="getResulty();">[% l('Back to results') %]</a></div>

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

Summary of changes:
 .../lib/OpenILS/Application/Cat/Authority.pm       |    4 ++--
 Open-ILS/src/templates/opac/parts/header.tt2       |    4 ++++
 .../src/templates/opac/parts/record/authors.tt2    |    2 +-
 .../src/templates/opac/parts/record/series.tt2     |    2 +-
 .../src/templates/opac/parts/record/subjects.tt2   |    2 +-
 Open-ILS/src/templates/opac/parts/result/table.tt2 |    4 ++--
 Open-ILS/src/templates/opac/parts/searchbar.tt2    |    2 +-
 Open-ILS/src/templates/opac/results.tt2            |    2 +-
 Open-ILS/xul/staff_client/server/cat/marcedit.js   |   15 ++++++++++++---
 9 files changed, 25 insertions(+), 12 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list