Bugzilla – Attachment 42266 Details for
Bug 14621
Messaging preferences table needs to be sorted
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 14621 - Messaging preferences table needs to be sorted
Bug-14621---Messaging-preferences-table-needs-to-b.patch (text/plain), 1.40 KB, created by
Chris Cormack
on 2015-09-03 04:17:18 UTC
(
hide
)
Description:
Bug 14621 - Messaging preferences table needs to be sorted
Filename:
MIME Type:
Creator:
Chris Cormack
Created:
2015-09-03 04:17:18 UTC
Size:
1.40 KB
patch
obsolete
>From cfa5b4cfb59af7bfc305e2b9087f6b91a51cfbb7 Mon Sep 17 00:00:00 2001 >From: Lari Taskula <larit@student.uef.fi> >Date: Thu, 30 Jul 2015 18:34:49 +0300 >Subject: [PATCH] Bug 14621 - Messaging preferences table needs to be sorted > >I have been working with messaging preferences and I noticed a weird issue in Firefox on Ubuntu. > >On messaging preferences page, the table is unsorted and the content in rows are generated randomly >on every page refresh. When you select/deselect checkboxes and refresh the page (without posting the changes), >Firefox will remember your choices. Now the issue is that when the table is unsorted and the rows keep >changing on page refresh, Firefox has trouble remembering your choices. This makes it appear as if the >checkboxes are magically changing values on each page refresh. > >Here is a patch that prevents this problem by sorting the messaging settings. > >Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz> >--- > C4/Members/Messaging.pm | 3 +++ > 1 file changed, 3 insertions(+) > >diff --git a/C4/Members/Messaging.pm b/C4/Members/Messaging.pm >index be65d3d..76a3dad 100644 >--- a/C4/Members/Messaging.pm >+++ b/C4/Members/Messaging.pm >@@ -217,6 +217,9 @@ END_SQL > } > > my @return = values %$choices; >+ >+ @return = sort { $a->{message_attribute_id} <=> $b->{message_attribute_id} } @return; >+ > # warn( Data::Dumper->Dump( [ \@return ], [ 'return' ] ) ); > return \@return; > } >-- >2.5.1
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 14621
:
41494
|
42266
|
42273