Bugzilla – Attachment 27680 Details for
Bug 12089
Remove use of dt_add_type_uk_date()
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
[PASSED QA] Bug 12089 - [SIGNED OFF] Remove use of dt_add_type_uk_date() - JavaScript
PASSED-QA-Bug-12089---SIGNED-OFF-Remove-use-of-dta.patch (text/plain), 2.45 KB, created by
Katrin Fischer
on 2014-04-27 08:48:50 UTC
(
hide
)
Description:
[PASSED QA] Bug 12089 - [SIGNED OFF] Remove use of dt_add_type_uk_date() - JavaScript
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2014-04-27 08:48:50 UTC
Size:
2.45 KB
patch
obsolete
>From d00a43edb26703d07ea0fad5fc15c49b153c9bba Mon Sep 17 00:00:00 2001 >From: Owen Leonard <oleonard@myacpl.org> >Date: Thu, 17 Apr 2014 12:02:35 -0400 >Subject: [PATCH] [PASSED QA] Bug 12089 - [SIGNED OFF] Remove use of > dt_add_type_uk_date() - JavaScript > >This patch removes the now unused dt_add_type_uk_date function from >Koha's custom DataTables javascript file. > >To test, be sure all other patches on Bug 12089 are applied. Apply this >patch and search for instances of dt_add_type_uk_date. There should be >none. > >Signed-off-by: David Cook <dcook@prosentient.com.au> > >Works as described. > >Signed-off-by: Katrin Fischer <Katrin.Fischer.83@web.de> >Passes all tests and QA script, works as described. >No regressions found, sorting and searching in all tables >touched by these patches works ok. >--- > koha-tmpl/intranet-tmpl/prog/en/js/datatables.js | 40 ------------------------ > 1 file changed, 40 deletions(-) > >diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >index aa2dcca..c3b882c 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >+++ b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js >@@ -160,46 +160,6 @@ function dt_add_rangedate_filter(begindate_id, enddate_id, dateCol) { > ); > } > >-//Sorting for dates (uk format) >-function dt_add_type_uk_date() { >- jQuery.fn.dataTableExt.aTypes.unshift( >- function ( sData ) >- { >- if (sData.match(/(0[1-9]|[12][0-9]|3[01])\/(0[1-9]|1[012])\/(19|20|21)\d\d/)) >- { >- return 'uk_date'; >- } >- return null; >- } >- ); >- >- jQuery.fn.dataTableExt.oSort['uk_date-asc'] = function(a,b) { >- var re = /(\d{2}\/\d{2}\/\d{4})/; >- a.match(re); >- var ukDatea = RegExp.$1.split("/"); >- b.match(re); >- var ukDateb = RegExp.$1.split("/"); >- >- var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1; >- var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1; >- >- return ((x < y) ? -1 : ((x > y) ? 1 : 0)); >- }; >- >- jQuery.fn.dataTableExt.oSort['uk_date-desc'] = function(a,b) { >- var re = /(\d{2}\/\d{2}\/\d{4})/; >- a.match(re); >- var ukDatea = RegExp.$1.split("/"); >- b.match(re); >- var ukDateb = RegExp.$1.split("/"); >- >- var x = (ukDatea[2] + ukDatea[1] + ukDatea[0]) * 1; >- var y = (ukDateb[2] + ukDateb[1] + ukDateb[0]) * 1; >- >- return ((x < y) ? 1 : ((x > y) ? -1 : 0)); >- }; >-} >- > // Sorting on html contains > // <a href="foo.pl">bar</a> sort on 'bar' > function dt_overwrite_html_sorting_localeCompare() { >-- >1.8.3.2
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 12089
:
27139
|
27143
|
27223
|
27224
|
27260
|
27261
|
27507
|
27508
|
27509
|
27510
|
27511
|
27512
|
27676
|
27677
|
27678
|
27679
| 27680