peers dialog: preselect first item; fix message display

This commit is contained in:
rlx 2016-01-16 15:12:33 +05:30
parent 89873f0c4d
commit 30f6f6860f

View file

@ -136,6 +136,7 @@ oml.ui.peersPanel = function() {
.css({height: '16px'})
.bindEvent({
select: function(data) {
Ox.print('SELECT:', data)
if (data.ids.length) {
selectItem($list);
renderUser({section: data.ids[0]});
@ -335,6 +336,19 @@ oml.ui.peersPanel = function() {
})
.appendTo($form);
Ox.Input({
readonly: true,
label: Ox._('Message'),
labelWidth: 128,
style: 'squared',
value: user.message || '',
width: 480
})
.css({
marginTop: '8px'
})
.appendTo($form);
}
Ox.Label({
@ -356,7 +370,6 @@ oml.ui.peersPanel = function() {
labelWidth: 128,
placeholder: Ox._('none'),
style: 'squared',
value: user.message || '',
width: 480
})
.css({
@ -592,7 +605,10 @@ oml.ui.peersPanel = function() {
}
that.updateElement = function() {
updateUsers();
updateUsers(function() {
selectItem($lists[0], 'invitations');
renderUser({section: 'invitations'});
});
return that;
};