From f14774383b913e8012bf21552daad945d77c188a Mon Sep 17 00:00:00 2001 From: Mark Tompsett Date: Mon, 11 Jul 2016 18:59:43 -0400 Subject: [PATCH] Bug 3311: Follow-up to add alerts and colour corrections This should deal with comment #12. I agree the coloring was poor. Used 'message' instead of 'alert' for information one. The whole width thing is a CSS thing that I'd rather not touch. And having tested on my phone, I totally understand the request for alerts. Those have been added. --- .../prog/en/modules/reports/catalogue_stats.tt | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt index 0ef130a..75158e6 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reports/catalogue_stats.tt @@ -12,13 +12,23 @@ return; } else if (Line) { - divParameterWarning.html('

' + _("Warning:") + ' ' + _("A column value must be selected.") + '

'); + var message = _("A column value must be selected."); + alert(message); + divParameterWarning.html('

' + _("Warning:") + ' ' + message + '

'); } else if (Column) { - divParameterWarning.html('

' + _("Warning:") + ' ' + _("A row value must be selected.") + '

'); + var message = _("A row value must be selected."); + alert(message); + divParameterWarning.html('

' + _("Warning:") + ' ' + message + '

'); } else { - divParameterWarning.html('

' + _("Warning:") + ' ' + _("Both row and column values must be selected.") + '

'); + var message = _("Both row and column values must be selected."); + alert(message); + divParameterWarning.html('

' + _("Warning:") + ' ' + message + '

'); + } + if (divParameterWarning.hasClass('message')) { + divParameterWarning.removeClass('message'); + divParameterWarning.addClass('alert'); } return false; } @@ -117,7 +127,11 @@ [% END %] [% ELSE %] -
+ [% IF invalid_parameters %] +
+ [% ELSE %] +
+ [% END %] [% SWITCH invalid_parameters %] [% CASE 'line+column' %]

-- 2.1.4