Bugzilla – Attachment 51497 Details for
Bug 16456
Add Font Awesome icons to some buttons in Tools module, section Patrons and circulation
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16456: Add Font Awesome icons to some buttons in Tools module, section Patrons and circulation
Bug-16456-Add-Font-Awesome-icons-to-some-buttons-i.patch (text/plain), 16.26 KB, created by
Héctor Eduardo Castro Avalos
on 2016-05-14 05:37:33 UTC
(
hide
)
Description:
Bug 16456: Add Font Awesome icons to some buttons in Tools module, section Patrons and circulation
Filename:
MIME Type:
Creator:
Héctor Eduardo Castro Avalos
Created:
2016-05-14 05:37:33 UTC
Size:
16.26 KB
patch
obsolete
>From 5d84154f42a159c1e9feb1e96a7b6f1491603815 Mon Sep 17 00:00:00 2001 >From: Hector Castro <hector.hecaxmmx@gmail.com> >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 and, unapprove >-Tags -> Apply filter(s), Test, Approved, Reject, Select all, Clear all, > Select all pending. Set 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 >--- > koha-tmpl/intranet-tmpl/js/autocomplete/patrons.js | 2 +- > .../prog/en/modules/patron_lists/list.tt | 8 +- > .../prog/en/modules/reviews/reviewswaiting.tt | 4 +- > .../intranet-tmpl/prog/en/modules/tags/review.tt | 98 +++++++++++++--------- > 4 files changed, 67 insertions(+), 45 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 = "<div id='borrower_" + value + "'>" + patron_name + " ( <a href='#' class='removePatron'> " + MSG_REMOVE_PATRON + " </a> ) <input type='hidden' name='" + input_name + "' value='" + value + "' /></div>"; >+ div = "<div id='borrower_" + value + "'>" + patron_name + " ( <a href='#' class='removePatron'><i class='fa fa-trash' aria-hidden='true'></i> " + MSG_REMOVE_PATRON + " </a> ) <input type='hidden' name='" + input_name + "' value='" + value + "' /></div>"; > $(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 fb6415c..ef6832e 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,10 +102,10 @@ $(document).ready(function() { > <form action="list.pl" id="remove_patrons" method="post"> > > <div id="searchheader"> >- <span class="checkall"><a id="CheckAll" href="#">Select all</a></span> | >- <span class="clearall"><a id="CheckNone" href="#">Clear all</a></span> | >+ <span class="checkall"><a id="CheckAll" href="#"><i class="fa fa-check"></i> Select all</a></span> | >+ <span class="clearall"><a id="CheckNone" href="#"><i class="fa fa-remove"></i> Clear all</a></span> | > <div class="btn-group"> >- <button class="btn btn-mini list-remove" type="submit"><i class="fa fa-times-circle"></i> Remove selected</button> >+ <button class="btn btn-mini list-remove" type="submit"><i class="fa fa-trash" aria-hidden="true"></i> Remove selected</button> > </div> > </div> > >@@ -152,7 +152,7 @@ $(document).ready(function() { > </table> > > <input type="hidden" name="patron_list_id" value="[% list.patron_list_id %]" /> >- <input type="submit" value="Remove selected patrons" /> >+ <button type="submit" class="btn btn-small"><i class="fa fa-trash" aria-hidden="true"></i> Remove selected patrons</button> > </form> > > </div> >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 %] > </td> > <td> >- [% IF ( status ) %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=unapprove&reviewid=[% review.reviewid %]">Unapprove</a>[% ELSE %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=approve&reviewid=[% review.reviewid %]">Approve</a>[% END %] | >- <a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=delete&reviewid=[% review.reviewid %]">Delete</a> >+ [% IF ( status ) %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=unapprove&reviewid=[% review.reviewid %]" class="btn btn-mini"><i class="fa fa-remove"></i> Unapprove</a>[% ELSE %]<a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=approve&reviewid=[% review.reviewid %]" class="btn btn-mini"><i class="fa fa-check"></i> Approve</a>[% END %] >+ <a href="/cgi-bin/koha/reviews/reviewswaiting.pl?op=delete&reviewid=[% review.reviewid %]" class="btn btn-mini"><i class="fa fa-trash" aria-hidden="true"></i> Delete</a> > </td> > </tr> > [% END %]</tbody> >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..9dc83a8 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("<i class='fa fa-check-square-o' aria-hidden='true'></i>" +_(" Test")); > }; > $(document).ready(function() { > $('.ajax_buttons' ).css({visibility:"visible"}); >- $("p.check").html("<strong>"+_("Select:")+" <\/strong><a id=\"CheckAll\" href=\"/cgi-bin/koha/tags/review.pl\">"+_("All")+"<\/a> <a id=\"CheckPending\" href=\"/cgi-bin/koha/tags/review.pl\">"+_("Pending")+"<\/a> <a id=\"CheckNone\" href=\"/cgi-bin/koha/tags/review.pl\">"+_("None")+"<\/a>"); >+ $("p.check").html("<div id='searchheader'><a id=\"CheckAll\" href=\"/cgi-bin/koha/tags/review.pl\"><i class='fa fa-check'></i>"+_(" Select all")+"<\/a> | <a id=\"CheckPending\" href=\"/cgi-bin/koha/tags/review.pl\"><i class='fa fa-clock-o'></i>"+_(" Select all pending")+"<\/a> | <a id=\"CheckNone\" href=\"/cgi-bin/koha/tags/review.pl\"><i class='fa fa-remove'></i>"+_(" Clear all")+"<\/a></div>"); > $("#CheckAll").click(function(){ > $(".checkboxed").checkCheckboxes(); > return false; >@@ -96,27 +96,49 @@ 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("<i class='fa fa-remove'></i>" + _(" Reject")); >+ $(event.target).prop('disabled', true).css("color","#666"); >+ $(event.target).html("<i class='fa fa-check'></i>" + _(" Approved")); >+ var getelement = $(event.target).attr("title"); >+ var gettitle = "span[data-title|=" + getelement + "]"; >+ if ($(gettitle).attr("class") == "pending"){ >+ $(gettitle).text("Approved"); >+ $(gettitle).toggleClass("pending approved"); >+ } else { >+ $(gettitle).text("Approved"); >+ $(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("<i class='fa fa-check'></i>" + _(" Approve")); >+ $(event.target).prop('disabled', true).css("color","#666"); >+ $(event.target).html("<i class='fa fa-remove'></i>" + _(" Rejected")); >+ var getelement = $(event.target).attr("title"); >+ var gettitle = "span[data-title|=" + getelement + "]"; >+ if ($(gettitle).attr("class") == "pending"){ >+ $(gettitle).text("Rejected"); >+ $(gettitle).toggleClass("pending rejected"); >+ } else { >+ $(gettitle).text("Rejected"); >+ $(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 +261,11 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } > </td> > <td> > [% IF ( tagloo.approved == -1 ) %] >- <span class="rejected">Rejected</span> >+ <span class="rejected" data-title="[% tagloo.term %]">Rejected</span> > [% ELSIF ( tagloo.approved == 1 ) %] >- <span class="approved">Approved</span> >+ <span class="approved" data-title="[% tagloo.term %]">Approved</span> > [% ELSE %] >- <span class="pending">Pending</span> >+ <span class="pending" data-title="[% tagloo.term %]">Pending</span> > [% END %] > </td> > <td><a href="/cgi-bin/koha/tags/list.pl?tag=[% tagloo.term|uri %]">[% tagloo.term %]</a> >@@ -253,11 +275,11 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } > [% IF ( tagloo.approved ) %] > <td class="actions"><span class="ajax_buttons" style="visibility:hidden"> > [% IF ( tagloo.approved == -1 ) %] >- <input class="ok" type="submit" title="[% tagloo.term %]" value="Approve" name="approve" /> >- <input class="rej" disabled="disabled" type="submit" title="[% tagloo.term %]" value="Rejected" name="reject" /> >+ <button class="ok btn btn-mini" type="submit" title="[% tagloo.term %]" value="Approve" name="approve"><i class="fa fa-check"></i> Approve</button> >+ <button class="rej btn btn-mini" disabled="disabled" type="submit" title="[% tagloo.term %]" value="Rejected" name="reject"><i class="fa fa-remove"></i> Rejected</button> > [% ELSE %] >- <input class="ok" disabled="disabled" type="submit" title="[% tagloo.term %]" value="Approved" name="approve" /> >- <input class="rej" type="submit" title="[% tagloo.term %]" value="Reject" name="reject" /> >+ <button class="ok btn btn-mini" disabled="disabled" type="submit" title="[% tagloo.term %]" value="Approved" name="approve"><i class="fa fa-check"></i> Approved</button> >+ <button class="rej btn btn-mini" type="submit" title="[% tagloo.term %]" value="Reject" name="reject"><i class="fa fa-remove"></i> Reject</button> > [% END %] > </span> > </td> >@@ -265,8 +287,8 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } > </td> > [% ELSE %] > <td class="actions"><span class="ajax_buttons" style="visibility:hidden"> >- <input class="ok" type="submit" title="[% tagloo.term %]" value="Approve" name="approve" /> >- <input class="rej" type="submit" title="[% tagloo.term %]" value="Reject" name="reject" /> >+ <button class="ok btn btn-mini" type="submit" title="[% tagloo.term %]" value="Approve" name="approve"><i class="fa fa-check"></i> Approve</button> >+ <button class="rej btn btn-mini" type="submit" title="[% tagloo.term %]" value="Reject" name="reject"><i class="fa fa-remove"></i> Reject</button> > </span> > </td> > [% UNLESS ( filter_approved_pending ) %]<td> </td>[% END %] >@@ -280,8 +302,8 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } > </table> > [% END %] > [% IF ( tagloop ) %]<fieldset class="action"> >- <input type="submit" value="Approve" id="approve_button" name="op-approve" /> >- <input type="submit" value="Reject" id="reject_button" name="op-reject" /> >+ <button type="submit" value="Approve" class="btn btn-small" id="approve_button" name="op-approve"><i class="fa fa-check"></i> Approve</button> >+ <button type="submit" value="Reject" class="btn btn-small" id="reject_button" name="op-reject"><i class="fa fa-remove"></i> Reject</button> > </fieldset>[% END %] > </form> > </div> >@@ -289,18 +311,18 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } > <fieldset class="brief"> > <h4>Terms summary</h4> > <ul> >- <li><a href="/cgi-bin/koha/tags/review.pl?approved=1">Approved</a>: >- <span id="terms_summary_approved_count">[% approved_count %]</span> >- </li> >- <li><a href="/cgi-bin/koha/tags/review.pl?approved=-1">Rejected</a>: >- <span id="terms_summary_rejected_count">[% rejected_count %]</span> >- </li> >- <li><a href="/cgi-bin/koha/tags/review.pl?approved=0">Pending</a>: >- <span id="terms_summary_unapproved_count">[% unapproved_count %]</span> >- </li> >- <li><a href="/cgi-bin/koha/tags/review.pl?approved=all">Total</a>: >- <span id="terms_summary_approved_total">[% approved_total %]</span> >- </li> >+ <li><a href="/cgi-bin/koha/tags/review.pl?approved=1">Approved</a>: >+ <span id="terms_summary_approved_count">[% approved_count %]</span> >+ </li> >+ <li><a href="/cgi-bin/koha/tags/review.pl?approved=-1">Rejected</a>: >+ <span id="terms_summary_rejected_count">[% rejected_count %]</span> >+ </li> >+ <li><a href="/cgi-bin/koha/tags/review.pl?approved=0">Pending</a>: >+ <span id="terms_summary_unapproved_count">[% unapproved_count %]</span> >+ </li> >+ <li><a href="/cgi-bin/koha/tags/review.pl?approved=all">Total</a>: >+ <span id="terms_summary_approved_total">[% approved_total %]</span> >+ </li> > </ul> > <span id="terms_summary_status"> </span> > </fieldset> >@@ -309,7 +331,7 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } > <div class="description">Enter a word or phrase to check against approved/rejected lists: </div> > <form method="post" action="/cgi-bin/koha/tags/review.pl"> > <input type="text" size="14" name="test" id="test" /> >- <fieldset class="action"><input type="submit" value="Test" id="test_button" name="op-test" /></fieldset> >+ <fieldset class="action"><button type="submit" value="Test" class="btn btn-small" id="test_button" name="op-test"><i class="fa fa-check-square-o" aria-hidden="true"></i> Test</button></fieldset> > <div id="verdict"> > [% IF ( test_term ) %] > [% IF ( verdict_ok ) %] >@@ -360,7 +382,7 @@ tr > td input,td input[type="submit"] { font-size: 85%; padding: 1px; } > <div class="hint">[% INCLUDE 'date-format.inc' %]</div> > </li> > </ol> >- <fieldset class="action"><input type="submit" value="Apply filter(s)" /></fieldset> >+ <fieldset class="action"><button type="submit" class="btn btn-small"><i class="fa fa-filter" aria-hidden="true"></i> Apply filter(s)</button></fieldset> > </fieldset> > </form> > </div> >-- >2.1.4
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16456
:
51249
|
51250
|
51251
|
51258
|
51497
|
51498
|
51499
|
51500
|
51501
|
52091
|
52092
|
52159
|
52162
|
52247
|
52251
|
52361
|
52362