From daf129f2f24132a271b8d1ca7725744856fece06 Mon Sep 17 00:00:00 2001 From: Liz Rea Date: Tue, 3 Nov 2015 12:20:25 +1300 Subject: [PATCH] bug 15112: Make greybox consistent size across label/card creator MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Also fixes minor issue with buttons stacking on patroncards/edit-batch and labels/label-manage To test: Export a batch every way you can: multiple together from label/label-manage individual items from labels/label-edit-batch selected items from labels/label-edit-batch export full batch from labels/label-edit-batch multiple together from patroncards/manage individual cards from patroncards/manage individual cards from patroncards/edit-batch selected cards from patroncards/edit-batch export full batch from patroncards/edit-batch Also notice that before this patch, the delete and export buttons were stacking on the table rows, and that now they are not doing that anymore. It may take a force refresh to see the behaviour and the change. Signed-off-by: Marc Véron Signed-off-by: Katrin Fischer Signed-off-by: Tomas Cohen Arazi --- .../prog/en/modules/labels/label-edit-batch.tt | 9 +++++---- .../intranet-tmpl/prog/en/modules/labels/label-manage.tt | 2 +- .../prog/en/modules/patroncards/edit-batch.tt | 7 ++++--- .../intranet-tmpl/prog/en/modules/patroncards/manage.tt | 4 ++-- 4 files changed, 12 insertions(+), 10 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt index 6f2bbade19..362ea8cd5f 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-edit-batch.tt @@ -90,10 +90,10 @@ alert(_("Please select at least one label to export.")); return; // no batch selected } - return GB_showCenter('Export labels', "/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id %]&" + getstr, 700, 800); + return GB_showCenter('Export labels', "/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id %]&" + getstr, 400, 800); } else if (mode == 'batch') { - return GB_showCenter('Export labels', "/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id %]", 700, 800); + return GB_showCenter('Export labels', "/cgi-bin/koha/labels/label-print.pl?batch_id=[% batch_id %]", 400, 800); } else { // some pass-thru error trapping just in case... @@ -118,9 +118,10 @@ $(document).ready(function() { $("#batcht").dataTable($.extend(true, {}, dataTablesDefaults, { + "autoWidth": false, "aoColumnDefs": [ { "sType": "anti-the", "aTargets" : [ "anti-the" ] }, - { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false } + { "aTargets": [ -1, -2 ], "bSortable": false, "bSearchable": false }, ], "aaSorting": [[ 0, "asc" ]], "sPaginationType": "four_button" @@ -245,7 +246,7 @@ [% FOREACH text_field IN table_loo.text_fields %] [% IF ( text_field.select_field ) %] - Delete Export + Delete Export
[% ELSE %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt index dfa17de79a..6a89aaf556 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/labels/label-manage.tt @@ -38,7 +38,7 @@ alert(_("Please select at least one batch to export.")); return; // no batch selected } - return GB_showCenter('Export Labels', "/cgi-bin/koha/labels/label-print.pl?" + getstr, 700, 800); + return GB_showCenter('Export Labels', "/cgi-bin/koha/labels/label-print.pl?" + getstr, 400, 800); }; function selected_layout(op) { var selected = new Array; diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt index 32e6924d6e..d53b8438f1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/edit-batch.tt @@ -89,10 +89,10 @@ alert(_("Please select at least one card to export.")); return; // no batch selected } - return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]&" + getstr, 700, 800); + return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]&" + getstr, 400, 800); } else if (mode == 'batch') { - return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]", 700, 800); + return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?batch_id=[% batch_id %]", 400, 800); } else { // some pass-thru error trapping just in case... @@ -121,7 +121,8 @@ { "aTargets": [ -2, -1 ], "bSortable": false, "bSearchable": false } ], "aaSorting": [[ 0, "asc" ]], - "sPaginationType": "four_button" + "sPaginationType": "four_button", + "autoWidth": false })); $("#additems").click(function(){ Add(); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt index 7641a4869c..0812da4b02 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/manage.tt @@ -86,7 +86,7 @@ alert(_("Please select at least one batch to export.")); return; // no batch selected } - return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?" + getstr, 700, 800); + return GB_showCenter(_("Export patron cards"), "/cgi-bin/koha/patroncards/print.pl?" + getstr, 400, 800); }; function selected_layouts(op) { if (document.layouts.action.length) { @@ -187,7 +187,7 @@ [% IF ( text_field.select_field ) %] Edit - [% IF ( print ) %] Export[% END %] + [% IF ( print ) %] Export[% END %] Delete [% IF ( print ) %][% END %] -- 2.39.5