Bugzilla – Attachment 58114 Details for
Bug 11274
Sent Notices Tab Not Working Correctly
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 11274 Sent Notices Tab Not Working Correctly
Bug-11274-Sent-Notices-Tab-Not-Working-Correctly.patch (text/plain), 2.52 KB, created by
Jonathan Druart
on 2016-12-12 12:12:48 UTC
(
hide
)
Description:
Bug 11274 Sent Notices Tab Not Working Correctly
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-12-12 12:12:48 UTC
Size:
2.52 KB
patch
obsolete
>From 8a45a2a6bb2687d85a15931de6d43682d2b84c4d Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Mon, 21 Nov 2016 08:26:13 -0500 >Subject: [PATCH] Bug 11274 Sent Notices Tab Not Working Correctly > >This patch implements the notices toggle event using a different method. >Using on() lets us bind the event to a parent element, allowing the >event to attach to elements which may not exist on the page yet. > >Test plan the same as original patch: > >1) have a patron with more then 20 notices sent >2) go to patron profile -> notices >-> without patch, the showing/hidding of notices content does work >correctly only on first loaded page >-> with patch, it should work correctly everywhere - try to use >paginator, searching, ordering.... > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > .../intranet-tmpl/prog/en/modules/members/notices.tt | 20 ++++++++++---------- > 1 file changed, 10 insertions(+), 10 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt >index 662a72e..0d8b7d5 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/notices.tt >@@ -16,18 +16,18 @@ > "sPaginationType": "four_button" > })); > >- $(".notice").hide(); >- $(".notice-title").click(function(e){ >- $(this).closest("tr").children().children(".notice").toggle(); >- e.preventDefault(); >- }); >- >+ $("#noticestable").on("click", ".notice-title", function(e){ >+ e.preventDefault(); >+ var rowid = $(this).data("noticeid"); >+ $("#notice"+rowid).toggle(); >+ }); >+ > }); > //]]> > </script> > <style type="text/css"> >- p.notice { display: none; } >- a.notice-title { font-weight: bold; display: block; } >+ .notice { display: none; } >+ .notice-title { font-weight: bold; display: block; } > </style> > </head> > <body id="pat_notices" class="pat"> >@@ -57,8 +57,8 @@ > [% FOREACH QUEUED_MESSAGE IN QUEUED_MESSAGES %] > <tr> > <td> >- <a class="notice-title" href="#">[% QUEUED_MESSAGE.subject %]</a> >- <div class="notice"> >+ <a class="notice-title" data-noticeid="[% QUEUED_MESSAGE.message_id %]" href="#">[% QUEUED_MESSAGE.subject %]</a> >+ <div id="notice[% QUEUED_MESSAGE.message_id %]" class="notice"> > [% QUEUED_MESSAGE.content FILTER html_line_break %] > </div> > </td> >-- >2.9.3
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 11274
:
57226
|
57673
|
57679
|
57854
| 58114