From ed08306923b5df049e841b613a5ca19db652a883 Mon Sep 17 00:00:00 2001 From: taggon Date: Mon, 17 Oct 2011 09:05:49 +0000 Subject: [PATCH] issue 530 : Improved inconvenient UI of member list. git-svn-id: http://xe-core.googlecode.com/svn/branches/1.5.0@9666 201d5d3c-b55e-5fd7-737f-ddc643e51545 --- modules/admin/tpl/js/admin.js | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/modules/admin/tpl/js/admin.js b/modules/admin/tpl/js/admin.js index 15982cb55..684c50eab 100644 --- a/modules/admin/tpl/js/admin.js +++ b/modules/admin/tpl/js/admin.js @@ -125,22 +125,26 @@ jQuery(function($){ .each(function(){ var $this = $(this), text = $this.text(); var reg_mail = /^([\w\-\.]+?)@(([\w-]+\.)+[a-z]{2,})$/ig; - $this.data('originalText', text); if(reg_mail.test(text)) { - $this.data('maskedText', RegExp.$1+'...'); + $this + .html(text.replace(/(@.+)$/, '...$1')) + .find('>.ellipsis') + .css({position:'absolute',zIndex:1}) + .hover( + function(){ $(this).next('.cover').mouseover() }, + function(){ $(this).next('.cover').mouseout() } + ) + .end() + .find('>.cover') + .css({zIndex:2,opacity:0}) + .hover( + function(){ $(this).css('opacity',1).prev('span').css('visibility','hidden') }, + function(){ $(this).css('opacity',0).prev('span').css('visibility','visible') } + ) + .end(); } - - $this.text( $this.data('maskedText') ); }) - .mouseover(function(){ - $(this).text( $(this).data('originalText') ); - }) - .mouseout(function(){ - $(this).text( $(this).data('maskedText') ); - }) - .focus(function(){ $(this).mouseover(); }) - .blur(function(){ $(this).mouseout(); }); }; $('.masked').xeMask(); });