MDL-39770 mod_chat: some tweaks to make it prettier to reduce screen wastage

This commit is contained in:
Andrew Davis 2013-06-24 21:36:43 +08:00
parent 07bbbcf174
commit 9035e3d24b
2 changed files with 10 additions and 5 deletions

View File

@ -37,11 +37,15 @@ M.mod_chat_ajax.init = function(Y, cfg) {
init : function(cfg) {
this.cfg = cfg;
this.cfg.req_count = this.cfg.req_count || 0;
participantswidth = 180;
if (Y.one('#input-message').get('docWidth') < 640) {
participantswidth = 120;
}
this.layout = new Y.YUI2.widget.Layout({
units : [
{position: 'right', width: 180, resize: true, gutter: '5px', scroll: true, body: 'chat-userlist', animate: false},
{position: 'bottom', height: 42, resize: false, body: 'chat-input-area', gutter: '5px', collapse: false, resize: false},
{position: 'center', body: 'chat-messages', gutter: '5px', scroll: true}
{position: 'right', width: participantswidth, resize: true, gutter: '1px', scroll: true, body: 'chat-userlist', animate: false},
{position: 'bottom', height: 42, resize: false, body: 'chat-input-area', gutter: '1px', collapse: false, resize: false},
{position: 'center', body: 'chat-messages', gutter: '0px', scroll: true}
]
});

View File

@ -5,6 +5,7 @@
.path-mod-chat #messages-list,
.path-mod-chat #users-list {list-style-type:none;padding:0;margin:0}
.path-mod-chat #chat-header {overflow: hidden;}
.path-mod-chat #chat-input-area table.generaltable td.cell {padding:1px;}
/** styles for view.php **/
#page-mod-chat-view .chatcurrentusers .chatuserdetails {vertical-align: middle;}
@ -24,8 +25,8 @@
/** YUI Overrides **/
.path-mod-chat .yui-layout-unit-top {background: #FFE39D;}
.path-mod-chat .yui-layout-unit-right {border-top: 5px solid white;background: #FFD46B;}
.path-mod-chat .yui-layout-unit-bottom {border-top: 5px solid white;background: #FFCB44;}
.path-mod-chat .yui-layout-unit-right {background: #FFD46B;}
.path-mod-chat .yui-layout-unit-bottom {background: #FFCB44;}
.path-mod-chat .yui-layout .yui-layout-hd {border:0;}
.path-mod-chat .yui-layout .yui-layout-unit div.yui-layout-bd {border:0;background: transparent;}
.path-mod-chat .yui-layout .yui-layout-unit div.yui-layout-unit-right {background: white;}