From 9035e3d24b5ee8fd8b692854bb10876d1d51e74b Mon Sep 17 00:00:00 2001 From: Andrew Davis Date: Mon, 24 Jun 2013 21:36:43 +0800 Subject: [PATCH] MDL-39770 mod_chat: some tweaks to make it prettier to reduce screen wastage --- mod/chat/gui_ajax/module.js | 10 +++++++--- mod/chat/styles.css | 5 +++-- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/mod/chat/gui_ajax/module.js b/mod/chat/gui_ajax/module.js index 11c4d21f705..053df31028c 100644 --- a/mod/chat/gui_ajax/module.js +++ b/mod/chat/gui_ajax/module.js @@ -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} ] }); diff --git a/mod/chat/styles.css b/mod/chat/styles.css index f4468c10bae..a52e2194d9e 100644 --- a/mod/chat/styles.css +++ b/mod/chat/styles.css @@ -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;} -- 2.43.0