UltrasonicNXT has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/106884


Change subject: Stop heights adjusting on timestamp hover
......................................................................

Stop heights adjusting on timestamp hover

When hovering over timestamps on messages of a certain length, all the
messages below were being pushed down as the longer timestamp broke a
line.
Fixed with some CSS trickery

Change-Id: I1e4aeb463f92daa0a3b67f05242de8522c04299d
---
M MediaWikiChat.css
M MediaWikiChat.js
2 files changed, 14 insertions(+), 4 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/MediaWikiChat 
refs/changes/84/106884/1

diff --git a/MediaWikiChat.css b/MediaWikiChat.css
index c40ca4d..6fdf565 100644
--- a/MediaWikiChat.css
+++ b/MediaWikiChat.css
@@ -42,11 +42,21 @@
        float: right;
        margin-left: 6px;
        margin-right: 3px;
+       position: relative;
 }
 .mwchat-item-timestamp {
        color: #CCC;
        text-transform: lowercase;
 }
+.mwchat-item-timestamp.real {
+       text-align: right;
+       width: 8em;
+       position: absolute;
+       right: 0;
+       top: 0;
+       background-color: #FFF;
+       padding-bottom: 5px;
+}
 .mwchat-item-user {
        margin: 5px;
        width: 20%;
diff --git a/MediaWikiChat.js b/MediaWikiChat.js
index 1c4c9cf..f723d53 100644
--- a/MediaWikiChat.js
+++ b/MediaWikiChat.js
@@ -276,11 +276,11 @@
                        elem = $( html ).appendTo( $( '#mwchat-table' ) );
 
                        elem.hover( function() {
-                               $( this ).find( '.pretty' ).hide();
+                               $( this ).find( '.pretty' ).css( 'visibility', 
'hidden' );
                                $( this ).find( '.real' ).show();
                        }, function() {
                                $( this ).find( '.real' ).hide();
-                               $( this ).find( '.pretty' ).show();
+                               $( this ).find( '.pretty' ).css( 'visibility', 
'visible' );
                        });
 
                        elem.find( 'a' ).attr( 'target', '_blank' );
@@ -441,9 +441,9 @@
                } );
 
                $( '.mwchat-useritem' ).hover( function() {
-                       $( this ).find( '.mwchat-useritem-pmlink' ).fadeIn(200);
+                       $( this ).find( '.mwchat-useritem-pmlink' ).fadeIn( 100 
);
                }, function() {
-                       $( this ).find( '.mwchat-useritem-pmlink' 
).fadeOut(200);
+                       $( this ).find( '.mwchat-useritem-pmlink' ).fadeOut( 
100 );
                } );
        },
 

-- 
To view, visit https://gerrit.wikimedia.org/r/106884
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I1e4aeb463f92daa0a3b67f05242de8522c04299d
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/MediaWikiChat
Gerrit-Branch: master
Gerrit-Owner: UltrasonicNXT <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to