From 7d7094518de4e03f078d0500ad26745cdc2ae3cc Mon Sep 17 00:00:00 2001 From: Hector Castro Date: Fri, 13 May 2016 23:40:25 -0600 Subject: [PATCH] Bug 16456: Add Font Awesome icons to some buttons in Tools module, section Patrons and circulation Add Font Awesome Icons to section Patrons and circulation in Tools module To test goto: -Patron list -> my_list_saved -> Add patrons -> Remove selected patrons, Clear all, Select all -Comments -> Approve, Delete, Unapprove -Tags -> Apply filter(s), Test, Approved, Reject, Select all, Clear all, Select all pending. Set syspref TagsModeration to Require. -Verify that all tools work as expected NOTE: The Tag and Comments tools has been revised to fit with others interfaces in Koha. Bug ammended according with QA comment 5 Bug rebased because bug 16005 --- koha-tmpl/intranet-tmpl/js/autocomplete/patrons.js | 2 +- .../prog/en/modules/patron_lists/list.tt | 6 +- .../prog/en/modules/reviews/reviewswaiting.tt | 4 +- .../intranet-tmpl/prog/en/modules/tags/review.tt | 96 ++++++++++++-------- 4 files changed, 64 insertions(+), 44 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/js/autocomplete/patrons.js b/koha-tmpl/intranet-tmpl/js/autocomplete/patrons.js index 909162b..ef61f0e 100644 --- a/koha-tmpl/intranet-tmpl/js/autocomplete/patrons.js +++ b/koha-tmpl/intranet-tmpl/js/autocomplete/patrons.js @@ -33,7 +33,7 @@ function patron_autocomplete(params) { } function AddPatron( patron_name, value, container, input_name ) { - div = "
" + patron_name + " ( " + MSG_REMOVE_PATRON + " )
"; + div = "
" + patron_name + " ( " + MSG_REMOVE_PATRON + " )
"; $(container).append( div ); $(container).parent().show( 800 ); diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt index d4df15e..187c7da 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/list.tt @@ -102,8 +102,8 @@ $(document).ready(function() {
- Select all | - Clear all | + Select all | + Clear all |
@@ -152,7 +152,7 @@ $(document).ready(function() { - +
diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/reviews/reviewswaiting.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/reviews/reviewswaiting.tt index b609d83..65cb829 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/reviews/reviewswaiting.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/reviews/reviewswaiting.tt @@ -53,8 +53,8 @@ [% review.review |html %] - [% IF ( status ) %]Unapprove[% ELSE %]Approve[% END %] | - Delete + [% IF ( status ) %] Unapprove[% ELSE %] Approve[% END %] + Delete [% END %] diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt index 430a2a5..15a7dd1 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tags/review.tt @@ -74,11 +74,11 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } var success_test_call = function() { $('#test_button').prop('disabled', false); - $('#test_button').attr("value",_("Test")); + $('#test_button').html("" +_(" Test")); }; $(document).ready(function() { $('.ajax_buttons' ).css({visibility:"visible"}); - $("p.check").html(""+_("Select:")+" <\/strong>"+_("All")+"<\/a> "+_("Pending")+"<\/a> "+_("None")+"<\/a>"); + $("p.check").html(""); $("#CheckAll").click(function(){ $(".checkboxed").checkCheckboxes(); return false; @@ -96,27 +96,47 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } // window.alert(_("Click detected on ") + event.target + ": " + $(event.target).html); if ($(event.target).is('.ok')) { $.ajax({ - "data": {ok: $(event.target).attr("title")}, - "success": count_approve // success_approve + data: {ok: $(event.target).attr("title")}, + success: count_approve // success_approve }); - $(event.target).next(".rej").prop('disabled', false).attr("value",_("Reject")).css("color","#000"); - $(event.target).attr( "value",_("Approved")).prop('disabled', true).css("color","#666"); + $(event.target).next(".rej").prop('disabled', false).css("color","#000"); + $(event.target).next(".rej").html("" + _(" Reject")); + $(event.target).prop('disabled', true).css("color","#666"); + $(event.target).html("" + _(" Approved")); + var getelement = $(event.target).attr("title"); + var gettitle = "span[data-title|=" + getelement + "]"; + $(gettitle).text(_("Approved")); + if ($(gettitle).attr("class") == "pending"){ + $(gettitle).toggleClass("pending approved"); + } else { + $(gettitle).toggleClass("rejected approved"); + } return false; // cancel submit } if ($(event.target).is('.rej')) { $.ajax({ - "data": {rej: $(event.target).attr("title")}, - "success": count_reject // success_reject + data: {rej: $(event.target).attr("title")}, + success: count_reject // success_reject }); - $(event.target).prev(".ok").prop('disabled', false).attr("value",_("Approve")).css("color","#000"); - $(event.target).attr( "value",_("Rejected")).prop('disabled', true).css("color","#666"); + $(event.target).prev(".ok").prop('disabled', false).css("color","#000"); + $(event.target).prev(".ok").html("" + _(" Approve")); + $(event.target).prop('disabled', true).css("color","#666"); + $(event.target).html("" + _(" Rejected")); + var getelement = $(event.target).attr("title"); + var gettitle = "span[data-title|=" + getelement + "]"; + $(gettitle).text(_("Rejected")); + if ($(gettitle).attr("class") == "pending"){ + $(gettitle).toggleClass("pending rejected"); + } else { + $(gettitle).toggleClass("approved rejected"); + } return false; // cancel submit } if ($(event.target).is('#test_button')) { - $(event.target).attr( "value",_("Testing...")).prop('disabled', true); + $(event.target).text(_("Testing...")).prop('disabled', true); $.ajax({ - "data": {test: $('#test').attr("value")}, - "success": success_test_call // success_reject + data: {test: $('#test').attr("value")}, + success: success_test_call // success_reject }); return false; // cancel submit } @@ -239,11 +259,11 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } [% IF ( tagloo.approved == -1 ) %] - Rejected + Rejected [% ELSIF ( tagloo.approved == 1 ) %] - Approved + Approved [% ELSE %] - Pending + Pending [% END %] [% tagloo.term %] @@ -253,11 +273,11 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } [% IF ( tagloo.approved ) %] @@ -265,8 +285,8 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } [% ELSE %] [% UNLESS ( filter_approved_pending ) %] [% END %] @@ -280,8 +300,8 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } [% END %] [% IF ( tagloop ) %]
- - + +
[% END %] @@ -289,18 +309,18 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; }

Terms summary

    -
  • Approved: - [% approved_count %] -
  • -
  • Rejected: - [% rejected_count %] -
  • -
  • Pending: - [% unapproved_count %] -
  • -
  • Total: - [% approved_total %] -
  • +
  • Approved: + [% approved_count %] +
  • +
  • Rejected: + [% rejected_count %] +
  • +
  • Pending: + [% unapproved_count %] +
  • +
  • Total: + [% approved_total %] +
 
@@ -309,7 +329,7 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
Enter a word or phrase to check against approved/rejected lists:
-
+
[% IF ( test_term ) %] [% IF ( verdict_ok ) %] @@ -360,7 +380,7 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; }
[% INCLUDE 'date-format.inc' %]
-
+
-- 1.7.10.4