Bugzilla – Attachment 16632 Details for
Bug 9882
Use DataTables on batch modifications pages
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9882 - Use DataTables on batch modifications pages
Bug-9882---Use-DataTables-on-batch-modifications-p.patch (text/plain), 6.47 KB, created by
Owen Leonard
on 2013-03-21 13:53:39 UTC
(
hide
)
Description:
Bug 9882 - Use DataTables on batch modifications pages
Filename:
MIME Type:
Creator:
Owen Leonard
Created:
2013-03-21 13:53:39 UTC
Size:
6.47 KB
patch
obsolete
>From 6215b5ceca809a2087f0165567a60d3844414e7e Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 21 Mar 2013 09:31:39 -0400 >Subject: [PATCH] Bug 9882 - Use DataTables on batch modifications pages >Content-Type: text/plain; charset="utf-8" > >The batch modification pages (edit and delete) use the old tablesorter >plugin. They should use DataTables instead. This patch makes the >following changes: > >- Remove tablesorter plugin from batchMod.tt where it was unused. >- Replace tablesorter assets with DataTables assets on batch edit and > batch delete pages. >- Replace tablesorter code with DataTables code in batchMod.js, which > provides table sorting functionality for both batch templates. >- Move position of batchMod.js script inclusion so that DataTables > assets are loaded first. >- Remove inline table sorting code from batch edit page since it is > provided by batchMod.js > >To test, load barcodes on both the batch edit and batch delete pages. >Test JavaScript-based functionality on each results page: > >- Check/Uncheck all >- Hide/show columns >- Table sorting on a variety of different kinds of data columns > >Batch operations should complete normally. >There should be no JavaScript error on the batch operation "landing >page" (batchMod.tt). >--- > .../intranet-tmpl/prog/en/js/pages/batchMod.js | 11 +++++++---- > .../prog/en/modules/tools/batchMod-del.tt | 7 +++++-- > .../prog/en/modules/tools/batchMod-edit.tt | 8 +++++--- > .../prog/en/modules/tools/batchMod.tt | 9 --------- > 4 files changed, 17 insertions(+), 18 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/pages/batchMod.js b/koha-tmpl/intranet-tmpl/prog/en/js/pages/batchMod.js >index ed0d92f..73be545 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/pages/batchMod.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/pages/batchMod.js >@@ -97,10 +97,13 @@ function hideAllColumns(){ > > $(document).ready(function() { > hideColumns(); >- $("#itemst").tablesorter({ >- widgets : ['zebra'], >- headers: {0:{sorter: false}} >- }); >+ $("#itemst").dataTable($.extend(true, {}, dataTablesDefaults, { >+ "sDom": 't', >+ "aoColumnDefs": [ >+ { "aTargets": [ 0 ], "bSortable": false, "bSearchable": false } >+ ], >+ "bPaginate": false >+ })); > $("#selectallbutton").click(function(){ > $("#itemst").checkCheckboxes(); > return false; >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt >index e3f6b29..32aeb95 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-del.tt >@@ -3,7 +3,11 @@ > [% INCLUDE 'doc-head-close.inc' %] > <script type="text/javascript" src="[% themelang %]/js/background-job-progressbar.js"></script> > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/pages/batchMod.css" /> >-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> >+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >+<script type="text/javascript" src="[% themelang %]/js/pages/batchMod.js"></script> >+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> >+[% INCLUDE 'datatables-strings.inc' %] >+<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script> > <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> > <script type="text/javascript"> > //<![CDATA[ >@@ -16,7 +20,6 @@ for( x=0; x<allColumns.length; x++ ){ > } > //]]> > </script> >-<script type="text/javascript" src="[% themelang %]/js/pages/batchMod.js"></script> > <!--[if IE]> > <style type="text/css">#selections { display: none; }</style> > <![endif]--> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >index c65277a..d4b5e10 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod-edit.tt >@@ -4,7 +4,11 @@ > <script type="text/javascript" src="[% themelang %]/js/background-job-progressbar.js"></script> > <script type="text/javascript" src="[% themelang %]/js/cataloging.js"></script> > <link rel="stylesheet" type="text/css" href="[% themelang %]/css/pages/batchMod.css" /> >-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> >+<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" /> >+<script type="text/javascript" src="[% themelang %]/js/pages/batchMod.js"></script> >+<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.dataTables.min.js"></script> >+[% INCLUDE 'datatables-strings.inc' %] >+<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script> > <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.checkboxes.min.js"></script> > <script type="text/javascript"> > //<![CDATA[ >@@ -16,7 +20,6 @@ for( x=0; x<allColumns.length; x++ ){ > allColumns[x] = Number(allColumns[x]) + 2; > } > $(document).ready(function(){ >- $("#itemst").tablesorter({ widgets : ['zebra'], headers: {0:{sorter: false}} }); > $("#selectallbutton").click(function() { > $("#itemst").find("input:checkbox").each(function() { > $(this).attr("checked", "checked"); >@@ -43,7 +46,6 @@ $(document).ready(function(){ > }); > //]]> > </script> >-<script type="text/javascript" src="[% themelang %]/js/pages/batchMod.js"></script> > <!--[if IE]> > <style type="text/css">#selections { display: none; }</style> > <![endif]--> >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod.tt >index df6fa57..1319913 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/batchMod.tt >@@ -1,15 +1,6 @@ > [% INCLUDE 'doc-head-open.inc' %] > <title>Koha › Tools › [% IF ( del ) %]Batch item deletion[% ELSE %]Batch item modification[% END %] </title> > [% INCLUDE 'doc-head-close.inc' %] >-<script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script> >-<script type="text/JavaScript" language="JavaScript"> >-//<![CDATA[ >- $(document).ready(function() { >- $("#itemst").tablesorter(); >- >- }); >-//]]> >-</script> > </head> > <body id="tools_batchMod" class="tools"> > [% INCLUDE 'header.inc' %] >-- >1.7.9.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 9882
:
16632
|
16702
|
17065