Bugzilla – Attachment 25514 Details for
Bug 10858
Browse selected biblios - OPAC
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 10858: Handle JS deactivated and cookies disabled
Bug-10858-Handle-JS-deactivated-and-cookies-disabl.patch (text/plain), 2.94 KB, created by
Jonathan Druart
on 2014-02-20 15:51:35 UTC
(
hide
)
Description:
Bug 10858: Handle JS deactivated and cookies disabled
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2014-02-20 15:51:35 UTC
Size:
2.94 KB
patch
obsolete
>From c3d33da802773c93eba930abfbe72d8f52b3953c Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Thu, 20 Feb 2014 16:48:49 +0100 >Subject: [PATCH] Bug 10858: Handle JS deactivated and cookies disabled > >If JS is deactivated, the "browse" link should not be displayed. >Same if cookies are disabled, the feature does not work. >--- > koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc | 2 +- > koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt | 11 +++++++++-- > 2 files changed, 10 insertions(+), 3 deletions(-) > >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >index b48161b..be94b4f 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/includes/opac-bottom.inc >@@ -124,7 +124,7 @@ > var MSG_ITEM_IN_CART = _("In your cart"); > var MSG_IN_YOUR_CART = _("Items in your cart: "); > var MSG_ITEM_NOT_IN_CART = _("Add to your cart"); >- var MSG_NO_RECORD_SELECTED = _("No item was selected"); >+ var MSG_NEED_COOKIE_ENABLED = _("Your browser does not accept cookies, you must accept them to browse selected results."); > [% END %] > [% IF ( Koha.Preference( 'opacuserlogin' ) == 1 ) && ( Koha.Preference( 'TagsEnabled' ) == 1 ) %] > var MSG_TAGS_DISABLED = _("Sorry, tags are not enabled on this system."); >diff --git a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >index f0863d3..6aaa422 100644 >--- a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >+++ b/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-results.tt >@@ -163,7 +163,7 @@ > </div> > [% END %] > [% IF Koha.Preference('OpacBrowseResults') %] >- <span class="details_link"><a href="#">Browse selected records</a></span> >+ <span class="details_link"></span> > [% END %] > </span> <!-- / .links --> > </div> <!-- / #selections-toolbar --> >@@ -681,10 +681,17 @@ $(document).ready(function(){ > [% END %] > enableCheckboxActions(); > }); >+ >+ $("span.details_link").html("<a href=\"#\" class=\"disabled\">"+_("Browse selected records")+"<\/a>"); > $(".details_link a").click(function(e) { > if ( $(this).hasClass("disabled") == true ) { > e.preventDefault(); >- alert(MSG_NO_RECORD_SELECTED); >+ var checkedBoxes = $(".searchresults :checkbox:checked"); >+ if ($(checkedBoxes).size() == 0) { >+ alert(MSG_NO_RECORD_SELECTED); >+ } else { >+ alert(MSG_NEED_COOKIE_ENABLED); >+ } > return false; > } > }); >-- >1.7.10.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 10858
:
20947
|
21476
|
21483
|
21646
|
21647
|
21966
|
21967
|
23541
|
23542
|
23543
|
23633
|
23781
|
23782
|
25427
|
25428
|
25429
|
25430
|
25431
|
25432
|
25433
|
25434
|
25435
|
25436
|
25450
|
25451
|
25452
|
25453
|
25454
|
25455
|
25456
|
25457
|
25512
|
25513
|
25514
|
25643
|
25644
|
25645
|
25646
|
25647
|
25648
|
25649
|
25650
|
25651
|
25652
|
25653
|
36757
|
38033
|
38405
|
39502
|
39938
|
41838
|
41839
|
41840
|
41841
|
41842
|
44903
|
56479
|
56480
|
56481
|
56482
|
67073
|
67074
|
67075
|
67076
|
67086
|
67089
|
67090
|
67092
|
67093
|
67974
|
67975
|
67976
|
67977
|
67978
|
71218
|
71219
|
71220
|
71221
|
71222
|
71223
|
91584
|
91585
|
91586
|
91587
|
91588
|
91589
|
94833