Bugzilla – Attachment 13873 Details for
Bug 9130
Remove old javascript from Parcel
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9130 - Remove old javascript from Parcel
Bug-9130---Remove-old-javascript-from-Parcel.patch (text/plain), 4.24 KB, created by
Jonathan Druart
on 2012-12-04 13:56:34 UTC
(
hide
)
Description:
Bug 9130 - Remove old javascript from Parcel
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2012-12-04 13:56:34 UTC
Size:
4.24 KB
patch
obsolete
>From fc77d1ff7c8744812b07fbb05ad9a904b0c8c10d Mon Sep 17 00:00:00 2001 >From: David Cook <dcook@prosentient.com.au> >Date: Thu, 22 Nov 2012 08:09:11 +1100 >Subject: [PATCH] Bug 9130 - Remove old javascript from Parcel > >When receiving orders, the old javascript would show the following above >the tables for pending orders and received orders: > >"Only the first 5 items are displayed. Click here to show all 'X' >items." > >With the implementation of the Jquery Datatables plugin, this text and >the 4 JS functions associated with it are now pointless (since users >should be using the datatable toolbar) and problematic. > >The problem is that the Jquery toolbar says "Showing 1 to 10 of X", >while in fact it is actually only showing 5 items, because that other JS >takes place after the Jquery. > >While not a crippling bug, it's certainly irritating and misleading. > >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > .../intranet-tmpl/prog/en/modules/acqui/parcel.tt | 41 -------------------- > 1 file changed, 41 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 eade72f..2f3d0ed 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/parcel.tt >@@ -13,7 +13,6 @@ > > dt_overwrite_html_sorting_localeCompare(); > >- var rowsToCollapse = 5; > $(document).ready(function(){ > var pendingt = $("#pendingt").dataTable($.extend(true, {}, dataTablesDefaults, { > "aoColumnDefs": [ >@@ -56,10 +55,6 @@ > }); > */ > >- rowCountPending = $("#pendingt tbody.filterclass tr").length; >- rowCountReceived = $("#receivedt tbody.filterclass tr").length; >- if (rowCountPending > rowsToCollapse ) { if ( $.cookie("pendingKeepExpanded") != 1 ) { pendingCollapse(); } else { pendingExpand(); } } >- if (rowCountReceived > rowsToCollapse ) { if ( $.cookie("receivedKeepExpanded") != 1 ) { receivedCollapse(); } else { receivedExpand(); } } > }); > > // Case-insensitive version of jquery's contains function >@@ -72,42 +67,6 @@ > containsExactly: "$(a).text() == m[3]" > }); > >- >- // 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(); >- $("#pendingt").before("<p id=\"pendingcollapserow\">" + _("Only the first ") + rowsToCollapse + _(" items are displayed.") + " <a href=\"javascript:pendingExpand();\">" + _("Click here to show all ") + rowCountPending + _(" items") + "<\/a>.<\/p>"); >- >- } >- >- // Expend pending items table >- function pendingExpand() { >- $.cookie("pendingKeepExpanded", 1, { path: "/", expires: 9999 }); >- $("#pendingcollapserow").remove(); >- $("#pendingt tr").show(); >- $("#pendingt tbody.filterclass tr.orderfound").remove(); >- $("#pendingt").before("<p id=\"pendingcollapserow\">" + rowCountPending + _(" items are displayed.") + " <a href=\"javascript:pendingCollapse();\">" + _("Click here to show only the first ") + rowsToCollapse + _(" items") + "<\/a>.<\/p>"); >- } >- >- // 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>"); >- } >- >- // 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>"); >- } >- > //]]> > </script> > <script type="text/javascript"> >-- >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 9130
:
13617
|
13640
|
13866
|
13870
|
13873
|
13874
|
13875
|
13876