From 93739dd4e3245c7dbe972b4e9b7f1127e6c6a7b0 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 10 Jul 2013 12:29:23 -0400 Subject: [PATCH] Bug 10558 [Follow-up] Convert records table in manage-marc-import.pl to ajax DataTable This patch makes improvements to the default DataTables CSS and corrects a couple of errors in the original patch. CSS for the "full numbers" type pagination, used by this and the quotes editor, has been cleaned up and made more visually consistent with the brief pagination style. Also changed: - removed some hard-coded paths containing "http://staff.kohadev..." - Added a column header to the column showing record match details. This provides both information and a clearer target for clicking to resort - Expanding the default table pager controls for this page and the quotes editor (for consistency) Signed-off-by: Kyle M Hall --- koha-tmpl/intranet-tmpl/prog/en/css/datatables.css | 45 ++++++++++++-------- .../prog/en/modules/tools/manage-marc-import.tt | 9 ++-- .../intranet-tmpl/prog/en/modules/tools/quotes.tt | 1 + 3 files changed, 33 insertions(+), 22 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css b/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css index 92e1768..8e6b867 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/datatables.css @@ -58,12 +58,12 @@ div.dataTables_info { div.dataTables_length, div.dataTables_filter { border-left : 1px solid #FFF; + border-right : 1px solid #AAAAAA; } div.dataTables_filter { line-height : 1.9em; } div.dataTables_paginate { - background-color : #F4F4F4; padding : 0; } @@ -73,42 +73,49 @@ div.dataTables_paginate { border-left : 1px solid #FFF; display : block; float : left; - line-height:1.6em; - padding: .3em .7em; + line-height:1.9em; + padding : 0.4em 0.7em; cursor: pointer; } .paging_full_numbers a.paginate_button { + background-color : #FFF; + background-repeat: no-repeat; color : #0000CC; } .paging_full_numbers a.paginate_button.first { + background-color: transparent; background-image : url('../../img/first.png'); - background-repeat: no-repeat; - background-position : 1% center; - padding-left : 2em; + background-position : 3px center; + padding-left : 23px; } .paging_full_numbers a.paginate_button.previous { + background-color: transparent; background-image : url('../../img/prev.png'); - background-repeat: no-repeat; - background-position : 1% center; - padding-left : 2em; + background-position : 3px center; + padding-left : 23px; } .paging_full_numbers a.paginate_button.next { + background-color: transparent; background-image : url('../../img/next.png'); - background-repeat: no-repeat; - background-position : 96% center; - padding-right : 2em; + background-position : 93% center; + padding-right : 25px; } .paging_full_numbers a.paginate_button.last { + background-color: transparent; background-image : url('../../img/last.png'); - background-repeat: no-repeat; - background-position : 96% center; - border-right : 1px solid #686868; - padding-right : 2em; + background-position : 93% center; + border-right : 0; + padding-right : 25px; } div.bottom.pager .paging_full_numbers a.paginate_button.last { border-right-width : 0; } + +div.bottom.pager div:first-child { + border-left : 0; +} + .paging_full_numbers a.paginate_active { background-color : #FFFFEA; color : #000; @@ -203,8 +210,10 @@ div.dataTables_paginate.paging_four_button { .dataTables_processing { background-color: white; - border: 1px solid #DDDDDD; - color: #999999; + border: 1px solid #999; + -webkit-box-shadow: 2px 2px 3px 1px rgba(0, 0, 0, 0.2); + box-shadow: 2px 2px 3px 1px rgba(0, 0, 0, 0.2); + color: #333; font-size: 14px; height: 30px; left: 50%; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt index 57faa85..08d90b5 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt @@ -36,6 +36,7 @@ $(document).ready(function(){ "bServerSide": true, "sAjaxSource": 'batch_records_ajax.pl', "sPaginationType": "full_numbers", + "sDom": '<"top pager"iflp>rt<"bottom pager"flp><"clear">', "aoColumns": [ { "mDataProp": "import_record_id" }, { "mDataProp": "citation" }, @@ -64,13 +65,13 @@ $(document).ready(function(){ + aData['match_id'] + " (" + _("score") + "=" + aData['score'] - + '):' + '' + aData['match_citation'] + '' ); } $('td:eq(5)', nRow).html( - '' + aData['matched'] + '' ); }, @@ -372,8 +373,8 @@ Page # Citation Status - Match? -   + Match type + Match details Record diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt index 493c34b..6801001 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/quotes.tt @@ -22,6 +22,7 @@ "bProcessing" : true, "bPaginate" : true, "sPaginationType" : "full_numbers", + "sDom": '<"top pager"iflp>rt<"bottom pager"flp><"clear">', "sAjaxSource" : "/cgi-bin/koha/tools/quotes/quotes_ajax.pl", "aoColumns" : [ { "sWidth": "3%" }, -- 1.7.2.5