From b80b8fa40f706b9cade5f6ee39d73e1b1f9616c9 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Tue, 14 Jan 2014 10:37:09 -0500 Subject: [PATCH] Bug 11555: Make "All" one of the default options for datatables There are many instances where librarians would like to have the ability to see all the rows in a datatable at one. It seems prudent to make this a default option for datatables, rather than change it on a case by case basis. Test Plan: 1) View the circulation history for a patron 2) Note you can select to view 10, 25, 50, or 100 entries 3) Apply this patch 4) Reload the circulation history page for a patron 5) Note the new "All" option 6) Verify the "All" option shows all the rows at once Signed-off-by: Jonathan Druart I tested the translation for "All" Signed-off-by: Galen Charlton --- .../intranet-tmpl/prog/en/includes/datatables-strings.inc | 1 + koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc | 3 ++- koha-tmpl/intranet-tmpl/prog/en/js/datatables.js | 3 ++- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables-strings.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables-strings.inc index 7e939fca5b..ead071bfbe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables-strings.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables-strings.inc @@ -13,6 +13,7 @@ var MSG_DT_PROCESSING = _("Processing..."); var MSG_DT_SEARCH = _("Search:"); var MSG_DT_ZERO_RECORDS = _("No matching records found"); + var MSG_DT_ALL = _("All"); var CONFIG_EXCLUDE_ARTICLES_FROM_SORT = _("a an the"); //]]> diff --git a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc index 703d1e3e96..44d8277fc2 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc +++ b/koha-tmpl/intranet-tmpl/prog/en/includes/datatables.inc @@ -14,7 +14,8 @@ var MSG_DT_PROCESSING = _("Processing..."); var MSG_DT_SEARCH = _("Search:"); var MSG_DT_ZERO_RECORDS = _("No matching records found"); + var MSG_DT_ALL = _("All"); var CONFIG_EXCLUDE_ARTICLES_FROM_SORT = _("a an the"); //]]> - \ No newline at end of file + diff --git a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js index c2a2cf8720..cc809c1c9a 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js +++ b/koha-tmpl/intranet-tmpl/prog/en/js/datatables.js @@ -23,7 +23,8 @@ var dataTablesDefaults = { "sSearch" : window.MSG_DT_SEARCH || "Search:", "sZeroRecords" : window.MSG_DT_ZERO_RECORDS || "No matching records found" }, - "sDom": '<"top pager"ilpf>t<"bottom pager"ip>' + "sDom": '<"top pager"ilpf>t<"bottom pager"ip>', + "aLengthMenu": [[10, 25, 50, 100, -1], [10, 25, 50, 100, window.MSG_DT_ALL || "All"]] }; -- 2.39.5