Skip to content

Commit c7a44d1

Browse files
authored
Merge pull request #123 from ebsco/publication-match-fix
Updates Publication Match Placard Script
2 parents 5b94bbd + 9473459 commit c7a44d1

6 files changed

Lines changed: 25 additions & 13 deletions

File tree

Koha/Plugin/EDS.pm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,10 @@ $PluginDir = $PluginDir.'/Koha/Plugin/EDS';
3131

3232
################# DO NOT TOUCH - CONTROLLED BY build.py
3333
our $MAJOR_VERSION = "21.11";
34-
our $SUB_VERSION = "002";
34+
our $SUB_VERSION = "003";
3535
our $VERSION = $MAJOR_VERSION . "" . $SUB_VERSION;
3636
our $SHA_ADD = "https://widgets.ebscohost.com/prod/api/koha/sha/1711.json";
37-
our $DATE_UPDATE = '2022-07-19';
37+
our $DATE_UPDATE = '2022-08-12';
3838
######################################################
3939

4040
## Here is our metadata, some keys are required, some are optional
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- DO NOT TOUCH THIS FILE - controlled by build.py -->
33
<kohaplugin>
4-
<latestversion>21.11.002</latestversion>
4+
<latestversion>21.11.003</latestversion>
55
<download>https://github.com/ebsco/edsapi-koha-plugin</download>
6-
<lastupdated>2022/07/19</lastupdated>
6+
<lastupdated>2022/08/12</lastupdated>
77
<releasenotes>
8-
<release version="21.11.002" date="2022/07/19">
9-
<note id="1" author="mabrahamson@ebsco.com">Includes updated templates for download cart and sendbasket.</note>
8+
<release version="21.11.003" date="2022/08/12">
9+
<note id="1" author="mabrahamson@ebsco.com">Fixes issue with publication placard.</note>
1010
</release>
1111
</releasenotes>
1212
</kohaplugin>

Koha/Plugin/EDS/bootstrap/includes/eds-publicationexactmatch.inc

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,14 +25,14 @@ var ftLinks="";
2525

2626
publicationExactMatchInc+='<h3><a target="_blank" href="[% publicationexactmatch.0.PublicationRecords.0.PLink %]">'+pubTitle+'</a></h3>';
2727

28-
publicationExactMatchInc+='<form onsubmit="window.parent.SearchWithinPublication(jQuery(\'#search-within-publication\').val());return false;" class="form-search">\
28+
publicationExactMatchInc+='<form onsubmit="event.preventDefault();SearchWithinPublication(jQuery(\'#search-within-publication\').val());return false;" class="form-search">\
2929
<div class="input-prepend input-append">\
3030
<div class="btn-group">\
3131
<button class="btn dropdown-toggle" data-toggle="dropdown">[% EDSLANG.eds_publicationexactmatch_INC_full_text_access %] <span class="caret"></span></button>\
3232
'+ftLinks+'\
3333
</div>\
34-
<input type="text" class="input-xlarge" id="search-within-publication" placeholder="[% EDSLANG.eds_publicationexactmatch_INC_search_within %]">\
35-
<span class="add-on" style="cursor:pointer" onclick="window.parent.SearchWithinPublication(jQuery(\'#search-within-publication\').val());"><i class="icon-search"></i></span>\
34+
<input type="text" class="input-xlarge" id="search-within-publication" onkeypress="checkChar(event);" placeholder="[% EDSLANG.eds_publicationexactmatch_INC_search_within %]">\
35+
<button style="cursor:pointer" class="btn btn-sm btn-primary" onclick="SearchWithinPublication(jQuery(\'#search-within-publication\').val());return false;" >Search</button>\
3636
</div>\
3737
</form>';
3838

@@ -56,6 +56,18 @@ function SearchWithinPublication(searchinTerm){
5656
if (searchinTerm == ''){ searchinTerm = 'FT Y OR FT N'; }
5757
window.location.href='/plugin/Koha/Plugin/EDS/opac/eds-search.pl?q=Search?query-1=AND,:{'+searchinTerm+'}|action=addfacetfilter('+encodeURIComponent('[% publicationexactmatch.0.PublicationRecords.0.Header.ResourceType %]:'+'[% publicationexactmatch.0.PublicationRecords.0.RecordInfo.BibRecord.BibEntity.Titles.0.TitleFull %]'.toLowerCase())+')&default=1';
5858
}
59-
59+
function checkChar(e)
60+
{
61+
var charCode;
62+
if(e && e.which)
63+
{
64+
charCode = e.which;
65+
}
66+
console.log(charCode);
67+
if (charCode == 13)
68+
{
69+
SearchWithinPublication(jQuery('#search-within-publication').val());
70+
}
71+
}
6072
</script>
6173
[% END %]

Koha/Plugin/EDS/js/EDSScript.tt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ edsConfig.pluginhttppath = "[% PLUGIN_HTTP_PATH %]";
4141
var searchBlockCount = 3;
4242

4343
// DO NOT TOUCH - controlled by build.py
44-
var versionEDSKoha = "21.11002";
44+
var versionEDSKoha = "21.11003";
4545
///////////////////////////////////////
4646

4747
if (document.title == "") {

version.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
{
22
"MajorVersion": "21.11",
3-
"MinorVersion": "002",
3+
"MinorVersion": "003",
44
"ReleaseNotes": [
55
{
66
"author": "mabrahamson@ebsco.com",
7-
"note": "Includes updated templates for download cart and sendbasket."
7+
"note": "Fixes issue with publication placard."
88
}
99
],
1010
"ShaAdd": "https://widgets.ebscohost.com/prod/api/koha/sha/1711.json"

0 commit comments

Comments
 (0)