Bugzilla – Attachment 9372 Details for
Bug 8028
Make table collapsing on parcel.pl sticky
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 8028 - Make table collapsing on parcel.pl sticky
Bug-8028---Make-table-collapsing-on-parcelpl-stick.patch (text/plain), 3.36 KB, created by
Kyle M Hall
on 2012-04-30 15:36:23 UTC
(
hide
)
Description:
Bug 8028 - Make table collapsing on parcel.pl sticky
Filename:
MIME Type:
Creator:
Kyle M Hall
Created:
2012-04-30 15:36:23 UTC
Size:
3.36 KB
patch
obsolete
>From ef5302b37c0e5d8bb530dc596008dba75ce866a2 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 28 Mar 2012 13:00:54 -0400 >Subject: [PATCH] Bug 8028 - Make table collapsing on parcel.pl sticky > >The tables on parcel.pl default to show only the first >five items in the table, and librarians must click the >a link to display all the items. Every time the page is >reloaded, the table gets re-collapsed, and the librarian >must again click the link. Parcel.pl should remember >which way the table is set and keep it that way until >it is changed again. > >This is accomplished by adding two cookies for this page, >one for each table. This cookie stores the state of the >table ( collapsed, or uncollapsed ) and sets each table >to the correct state on each page load. >--- > .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 8 ++++++-- > 1 files changed, 6 insertions(+), 2 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >index a5d3e1a..9945177 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >@@ -24,8 +24,8 @@ > > rowCountPending = $("#pendingt tbody.filterclass tr").length; > rowCountReceived = $("#receivedt tbody.filterclass tr").length; >- if (rowCountPending > rowsToCollapse) { pendingCollapse(); } >- if (rowCountReceived > rowsToCollapse) { receivedCollapse(); } >+ if (rowCountPending > rowsToCollapse && $.cookie("pendingKeepExpanded") != 1 ) { pendingCollapse(); } >+ if (rowCountReceived > rowsToCollapse && $.cookie("receivedKeepExpanded") != 1 ) { receivedCollapse(); } else { receivedExpand(); } > }); > > // Case-insensitive version of jquery's contains function >@@ -41,6 +41,7 @@ > > // Collapse pending items table > function pendingCollapse() { >+ $.cookie("pendingKeepExpanded", 0, { path: "/", expires: 9999 }); > $("#pendingcollapserow").remove(); > $("#pendingt tr").show(); > $("#pendingt tbody.filterclass tr:gt(" + (rowsToCollapse-1) + ")").hide(); >@@ -50,6 +51,7 @@ > > // Expend pending items table > function pendingExpand() { >+ $.cookie("pendingKeepExpanded", 1, { path: "/", expires: 9999 }); > $("#pendingcollapserow").remove(); > $("#pendingt tr").show(); > $("#pendingt tbody.filterclass tr.orderfound").remove(); >@@ -58,6 +60,7 @@ > > // Collapse already received items table > function receivedCollapse() { >+ $.cookie("receivedKeepExpanded", 0, { path: "/", expires: 9999 }); > $("#receivedcollapserow").remove(); > $("#receivedt tbody.filterclass tr:gt(" + (rowsToCollapse-1) + ")").hide(); > $("#receivedt").before("<p id=\"receivedcollapserow\">" + _("Only the first ") + rowsToCollapse + _(" items are displayed.") + "<a href=\"javascript:receivedExpand();\">" + _("Click here to show all ") + rowCountReceived + _(" items") + "<\/a>.<\/p>"); >@@ -65,6 +68,7 @@ > > // Expand already received items table > function receivedExpand() { >+ $.cookie("receivedKeepExpanded", 1, { path: "/", expires: 9999 }); > $("#receivedcollapserow").remove(); > $("#receivedt tr").show(); > $("#receivedt").before("<p id=\"receivedcollapserow\">" + _("All ") + rowCountReceived + _(" items are displayed.") + "<a href=\"javascript:receivedCollapse();\">" + _("Click here to show only the first ") + rowsToCollapse + _(" items") + "<\/a>.<\/p>"); >-- >1.7.2.5
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 8028
:
9372
|
10797
|
10878
|
10926
|
12059