From 80a71c1689da09c274b5d36f4be335a73b464f1d Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Wed, 19 Nov 2014 14:31:31 -0500 Subject: [PATCH] Bug 13302 [Revised] Use CSS3 ellipsis for email address in staff client patron sidebar MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This patch replaces the email address text overflow solution implemented by Bug 3256 with a CSS3 technique: text-overflow: ellipsis https://developer.mozilla.org/en-US/docs/Web/CSS/text-overflow To test, apply the patch and clear your browser cache. Edit the primary email address of a patron so that it is very long. View that patron in the staff client (on the checkout or details page, for instance) and confirm that the email address is truncated with "..." Confirm that the link and the title attribute of the link contain the correct, full email address. Revision uses a percentage instead of a fixed width for email display in the sidebar to accommodate varying sidebar widths. Also added: Handling of all email addresses displayed on the patron detail page. Although email addresses in the body of that page were not in the scope of the original patch, it's a good improvement to include those as well. Signed-off-by: Owen Leonard Signed-off-by: Marc Véron Signed-off-by: Jonathan Druart Signed-off-by: Brendan Gallagher brendan@bywatersolutions.com --- .../prog/en/css/staff-global.css | 19 +++++++++--------- .../prog/en/modules/members/moremember.tt | 10 ++++----- koha-tmpl/intranet-tmpl/prog/img/elipsis.gif | Bin 51 -> 0 bytes 3 files changed, 14 insertions(+), 15 deletions(-) delete mode 100644 koha-tmpl/intranet-tmpl/prog/img/elipsis.gif diff --git a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css index ca1e18ffb9..58a1d1596c 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css +++ b/koha-tmpl/intranet-tmpl/prog/en/css/staff-global.css @@ -1447,17 +1447,16 @@ h1#logo a { vertical-align: middle; } -li.email a { - display:block; - overflow:hidden; - width:13em; -} li.email { - background: #FFF url(../../img/elipsis.gif) right bottom no-repeat; - font-size : 87%; - overflow:hidden; - padding :0 10px 0 0; - width:13em; + overflow: hidden; + text-overflow: ellipsis; + white-space: nowrap; +} + +.patronbriefinfo li.email { + font-size : 87%; + padding : 0 10px 0 0; + width: 90%; } .empty { diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt index adaedb5731..a9ce12aebe 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/members/moremember.tt @@ -136,7 +136,7 @@ function validate1(date) { › [% IF ( unknowuser ) %]Patron does not exist[% ELSE %]Patron details for [% INCLUDE 'patron-title.inc' %][% END %] -
+
@@ -210,7 +210,7 @@ function validate1(date) {
    [% IF ( I ) %] [% IF ( phonepro ) %]
  1. Organization phone: [% phonepro %]
  2. [% END %] - [% IF ( emailpro ) %]
  3. Organization email: [% emailpro %]
  4. [% END %] + [% IF ( emailpro ) %][% END %] [% ELSE %] [% IF ( phone ) %]
  5. Primary phone: [% phone %]
  6. [% END %] [% IF ( phonepro ) %]
  7. Secondary phone: [% phonepro %]
  8. [% END %] @@ -223,8 +223,8 @@ function validate1(date) { [% END %] [% IF ( fax ) %]
  9. Fax: [% fax %]
  10. [% END %] [% UNLESS ( I ) %] - [% IF ( email ) %]
  11. Primary email:[% email %]
  12. [% END %] - [% IF ( emailpro ) %]
  13. Secondary email: [% emailpro %]
  14. [% END %] + [% IF ( email ) %][% END %] + [% IF ( emailpro ) %][% END %] [% END %] [% IF ( initials ) %]
  15. Initials: [% initials %]
  16. [% END %] [% IF ( dateofbirth ) %]
  17. Date of birth:[% dateofbirth | $KohaDates %] ([% age %] years)
  18. [% END %] @@ -402,7 +402,7 @@ function validate1(date) {
  19. ZIP/Postal code: [% B_zipcode %]
  20. [% IF ( B_country ) %]
  21. Country: [% B_country %]
  22. [% END %] [% IF ( B_phone ) %]
  23. Phone: [% B_phone %]
  24. [% END %] - [% IF ( B_email ) %]
  25. Email: [% B_email %]
  26. [% END %] + [% IF ( B_email ) %][% END %] [% IF ( contactnote ) %]
  27. Contact note: [% contactnote %]
  28. [% END %]
diff --git a/koha-tmpl/intranet-tmpl/prog/img/elipsis.gif b/koha-tmpl/intranet-tmpl/prog/img/elipsis.gif deleted file mode 100644 index 15ed1563d711f23e69e669c800a96921a0e0e1d2..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 51 zcmZ?wbhEHb