mirror of
https://github.com/Lastorder-DC/rhymix.git
synced 2026-01-14 00:39:57 +09:00
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
This commit is contained in:
parent
eb34f3c566
commit
ed08306923
1 changed files with 16 additions and 12 deletions
|
|
@ -125,22 +125,26 @@ jQuery(function($){
|
||||||
.each(function(){
|
.each(function(){
|
||||||
var $this = $(this), text = $this.text();
|
var $this = $(this), text = $this.text();
|
||||||
var reg_mail = /^([\w\-\.]+?)@(([\w-]+\.)+[a-z]{2,})$/ig;
|
var reg_mail = /^([\w\-\.]+?)@(([\w-]+\.)+[a-z]{2,})$/ig;
|
||||||
$this.data('originalText', text);
|
|
||||||
|
|
||||||
if(reg_mail.test(text)) {
|
if(reg_mail.test(text)) {
|
||||||
$this.data('maskedText', RegExp.$1+'...');
|
$this
|
||||||
|
.html(text.replace(/(@.+)$/, '<span class="ellipsis">...</span><span class="cover">$1</span>'))
|
||||||
|
.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();
|
$('.masked').xeMask();
|
||||||
});
|
});
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue