[Rt-commit] rt branch, 4.2/user-links-display, created. rt-4.1.8-155-gd9b6f8e

Thomas Sibley trs at bestpractical.com
Thu Apr 18 21:06:00 EDT 2013


The branch, 4.2/user-links-display has been created
        at  d9b6f8e0b0a3fe3b1df5385b38b1db55e1487b98 (commit)

- Log -----------------------------------------------------------------
commit 7b49f6d94c9ce8dd8d73dccfbcc4aa3eaebf2611
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Apr 18 17:30:32 2013 -0700

    Wrap users in a <span> of class "user" and with a data-user-id attribute
    
    Makes user references selectable for styling and provides metadata about
    the reference.

diff --git a/share/html/Elements/ShowUser b/share/html/Elements/ShowUser
index bc40e40..4ddac7b 100644
--- a/share/html/Elements/ShowUser
+++ b/share/html/Elements/ShowUser
@@ -84,6 +84,7 @@ $Address => undef
 $style => undef
 $Link => 1
 </%ARGS>
+<span class="user" <% $User && $User->id ? 'data-user-id="'.$User->id.'"' : "" |n %>>\
 % if ($Link and $User and $User->id and not $system_user{$User->id} and $session{CurrentUser}->Privileged) {
 <a href="<% RT->Config->Get("WebPath") %>/User/Summary.html?id=<% $User->id %>">\
 <% $display %>\
@@ -91,3 +92,4 @@ $Link => 1
 % } else {
 <% $display %>\
 % }
+</span>\
diff --git a/share/static/js/event-registration.js b/share/static/js/event-registration.js
index f8a2184..4a94f46 100644
--- a/share/static/js/event-registration.js
+++ b/share/static/js/event-registration.js
@@ -34,7 +34,7 @@ function ReplaceUserReferences() {
                 if (!json[uid])
                     return
                 user.removeAttr("data-replace")
-                    .html( json[uid]._html );
+                    .html( jQuery(json[uid]._html).html() );
             });
         }
     );

commit ceebce0085900ad4b86203cb60301dab4244ae66
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Apr 18 17:36:09 2013 -0700

    Tone down the visual prominence of user links in search results
    
    By setting the font-weight and color to inherit, they pick up the
    natural look of the search results instead of being bold and the color
    depending on visited status.  For aileron, this means the links are
    normal weight and always black.  Knowing if you've previously visited a
    user summary page is not terribly useful, and the dual-toned links are
    distracting in search results.  HTML in formats, such as <b>, can still
    modify the links' appearance.

diff --git a/share/html/NoAuth/css/base/collection.css b/share/html/NoAuth/css/base/collection.css
index df0381e..10b222c 100644
--- a/share/html/NoAuth/css/base/collection.css
+++ b/share/html/NoAuth/css/base/collection.css
@@ -53,3 +53,11 @@ table.collection td:first-child, table.collection th:first-child {
     margin-top: 0;
     margin-bottom: 0;
 }
+
+.collection-as-table .user a {
+    font-weight: inherit;
+}
+
+.collection-as-table .user a:visited {
+    color: inherit;
+}

commit d9b6f8e0b0a3fe3b1df5385b38b1db55e1487b98
Author: Thomas Sibley <trs at bestpractical.com>
Date:   Thu Apr 18 17:45:09 2013 -0700

    Adjust CSS layout so the full width is used for requestor accordion content
    
    Floating the user summary link forced the width of the floated element
    (the text "User Summary") to be unused by accordion content, effectively
    producing a large right margin.
    
    Use relative/absolute positioning to place the User Summary link in the
    top right corner and preserve the accordion's full width.  Additionally,
    adjust styles so the link behaves like a normal link and unlike the rest
    of the accordion header.  This helps distinguish that "User Summary"
    isn't just a static part of the header.

diff --git a/share/html/NoAuth/css/base/ticket.css b/share/html/NoAuth/css/base/ticket.css
index 5d3c232..3794ca0 100644
--- a/share/html/NoAuth/css/base/ticket.css
+++ b/share/html/NoAuth/css/base/ticket.css
@@ -45,8 +45,15 @@
 %# those contributions and any derivatives thereof.
 %#
 %# END BPS TAGGED BLOCK }}}
-#requestor-accordion h3 { clear: right }
-#requestor-accordion a.user-summary { float: right; }
+#requestor-accordion h3 {
+    position: relative;
+}
+#requestor-accordion a.user-summary {
+    position: absolute;
+    right: 0;
+    text-decoration: none;
+}
+#requestor-accordion a.user-summary:hover { text-decoration: underline }
 
 #requestor-accordion a.modify-user {
     font-size: 80%;

-----------------------------------------------------------------------


More information about the Rt-commit mailing list