mirror of
https://github.com/smogon/pokemon-showdown-client.git
synced 2026-05-05 21:16:26 -05:00
Highlight active PM
This commit is contained in:
parent
0c7c2db875
commit
e1040e6529
|
|
@ -8,7 +8,9 @@
|
|||
'keydown textarea': 'keyPress',
|
||||
'click .username': 'clickUsername',
|
||||
'click .closebutton': 'closePM',
|
||||
'click .pm-window': 'clickPMBackground'
|
||||
'click .pm-window': 'clickPMBackground',
|
||||
'focus textarea': 'onFocusPM',
|
||||
'blur textarea': 'onBlurPM'
|
||||
},
|
||||
initialize: function() {
|
||||
// left menu
|
||||
|
|
@ -78,7 +80,13 @@
|
|||
this.$pmBox.find('.pm-window-'+userid).hide();
|
||||
},
|
||||
focusPM: function(name) {
|
||||
this.openPM(name).find('textarea[name=message]').focus();
|
||||
this.openPM(name).prependTo(this.$pmBox).find('textarea[name=message]').focus();
|
||||
},
|
||||
onFocusPM: function(e) {
|
||||
$(e.currentTarget).closest('.pm-window').addClass('focused');
|
||||
},
|
||||
onBlurPM: function(e) {
|
||||
$(e.currentTarget).closest('.pm-window').removeClass('focused');
|
||||
},
|
||||
keyPress: function(e) {
|
||||
if (e.keyCode === 13 && !e.shiftKey) { // Enter
|
||||
|
|
|
|||
|
|
@ -289,7 +289,7 @@ body {
|
|||
margin-bottom: 12px;
|
||||
}
|
||||
.pm-window h3 {
|
||||
background: #f8f8f8;
|
||||
background: rgba(248,248,248,.8);
|
||||
color: #777777;
|
||||
margin: 0;
|
||||
padding: 2px 5px;
|
||||
|
|
@ -297,6 +297,7 @@ body {
|
|||
border: 1px solid #AAAAAA;
|
||||
border-top-left-radius: 5px;
|
||||
border-top-right-radius: 5px;
|
||||
cursor: default;
|
||||
}
|
||||
.pm-window h3 .closebutton {
|
||||
float: right;
|
||||
|
|
@ -325,6 +326,15 @@ body {
|
|||
.pm-window.collapsed .pm-log-add {
|
||||
display: none;
|
||||
}
|
||||
.pm-window.focused h3,
|
||||
.pm-window.focused .pm-log,
|
||||
.pm-window.focused .pm-log.add {
|
||||
border-color: #555555;
|
||||
}
|
||||
.pm-window.focused h3 {
|
||||
background: #f8f8f8;
|
||||
color: #222222;
|
||||
}
|
||||
|
||||
.tiny-layout .leftmenu,
|
||||
.tiny-layout .rightmenu,
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user