Index: openacs-4/packages/chat/tcl/chat-ajax-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/tcl/chat-ajax-procs.tcl,v diff -u -r1.24 -r1.25 --- openacs-4/packages/chat/tcl/chat-ajax-procs.tcl 19 Nov 2018 14:32:29 -0000 1.24 +++ openacs-4/packages/chat/tcl/chat-ajax-procs.tcl 19 Nov 2018 16:35:12 -0000 1.25 @@ -21,7 +21,6 @@ chat_room instproc render {} { :get_parameters - template::head::add_css -href /chat/resources/chat.css return [::chat::Chat login \ -chat_id $chat_id \ -mode $mode \ Index: openacs-4/packages/chat/www/chat.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/chat/www/chat.tcl,v diff -u -r1.21 -r1.22 --- openacs-4/packages/chat/www/chat.tcl 19 Nov 2018 14:32:29 -0000 1.21 +++ openacs-4/packages/chat/www/chat.tcl 19 Nov 2018 16:35:12 -0000 1.22 @@ -53,8 +53,6 @@ ad_script_abort } -template::head::add_css -href resources/chat.css - set chat_frame [::chat::Chat login \ -chat_id $room_id] Index: openacs-4/packages/xowiki/tcl/chat-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/tcl/chat-procs.tcl,v diff -u -r1.39 -r1.40 --- openacs-4/packages/xowiki/tcl/chat-procs.tcl 19 Nov 2018 14:12:17 -0000 1.39 +++ openacs-4/packages/xowiki/tcl/chat-procs.tcl 19 Nov 2018 16:35:12 -0000 1.40 @@ -387,6 +387,11 @@ set context id=$chat_id&s=$session_id set base_url ${path}ajax/chat?${context} + # This will point to chat/resources/chat.css for a chat instance + # and to /resources.chat.css for a plain xowiki + # chat + template::head::add_css -href ${path}resources/chat.css + if {$mode eq ""} { # # The parameter "mode" was not specified, we try to guess the Index: openacs-4/packages/xowiki/www/resources/chat.css =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/xowiki/www/resources/Attic/chat.css,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/xowiki/www/resources/chat.css 19 Nov 2018 16:35:12 -0000 1.1 @@ -0,0 +1,202 @@ +* { + box-sizing: border-box; +} + +/* Chat container */ +#xowiki-chat-container { + height: 70vh; + width: 100%; + position: relative; +} + +/* Users and messages container */ +#xowiki-chat { + height: 100%; + width: 100%; + margin-bottom: 1%; + overflow: hidden; + display: flex; + background-color: white; +} + +#xowiki-chat-fs { + height: 100vh; + width: 100%; + overflow: hidden; + display: flex; + background-color: white; + position: fixed; + top: 0; + right: 0; + bottom: 0; + left: 0; + z-index: 1031; +} + +/* Users block */ +#xowiki-chat-users { + border: 1px solid #ddd; + border-left: none; + overflow: auto; + order: 2; + display: flex; + flex-direction: column; + min-width: 240px; +} + +#xowiki-chat-users .xowiki-chat-user-link { + text-decoration: none; +} + +#xowiki-chat-users .xowiki-chat-user-block { + padding: 18px 10px 18px 16px; + border-bottom: 1px solid #ddd; +} + +#xowiki-chat-users .xowiki-chat-user-block:hover { + background-color: rgb(235,235,235); +} + +#xowiki-chat-users .xowiki-chat-user-pic { + width: 45px; + height: 45px; + border-radius: 50%; + border: 2px solid; + padding: 3px; + margin-right: 15px; +} + +#xowiki-chat-users .xowiki-chat-user-pic-wrap { + float: left; +} + +#xowiki-chat-users .xowiki-chat-user { + font-weight: bold; +} + +#xowiki-chat-users .xowiki-chat-timestamp { + color: rgb(152,152,152); +} + +/* Messages block */ +#xowiki-chat-messages-and-form { + width: 100%; + border: 1px solid #ddd; + display: flex; + flex-direction: column; + order: 1; + justify-content: flex-end; +} + +#xowiki-chat-messages { + padding: 10px; + height: 100%; + overflow: auto; + order: 1; +} + +#xowiki-chat-messages .xowiki-chat-user-block { + float: left; +} + +#xowiki-chat-messages .xowiki-chat-user-block-me { + float: left; +} + +#xowiki-chat-messages .xowiki-chat-user { + white-space: nowrap; +} + +#xowiki-chat-messages .xowiki-chat-message { + padding: 10px; +} + +#xowiki-chat-messages .xowiki-chat-message-me { + padding: 10px; +} + +#xowiki-chat-messages .xowiki-chat-timestamp { + color: rgb(152,152,152); + float: right; +} + +#xowiki-chat-messages .xowiki-chat-timestamp-me { + /* color: yellow; */ + color: rgb(152,152,152); + float: right; + /* font-size: 65%; */ +} + +/* Send form */ +#xowiki-chat-messages-form-block { + margin-left: 20px; + margin-right: 20px; + margin-top: 5px; + border-top: 1px solid #ddd; + padding: 10px 10px 10px 10px; + min-height: 80px; + display: flex; + align-items: center; + order: 2; +} + +#xowiki-chat-messages-form { + width: 100%; +} + +#xowiki-chat-send { + /* font-size: 24px; */ + height: 48px; + width: 100%; + padding-left: 10px; + border: 0; + outline: none; + background-color: #eceff1; + border-radius: 8px; +} + +/* Full screen trigger */ +.xowiki-chat-trigger-fs-block { + padding: 10px; +} + +.xowiki-chat-trigger-fs-link { + text-decoration: none; +} + +.xowiki-chat-trigger-fs-link:hover { + text-decoration: none !important; +} + +.xowiki-chat-trigger-fs-pic:hover { + background-color: white; + border: 1px solid white; +} + +/* Responsive design */ +@media (max-width: 1000px) { + #xowiki-chat { + flex-direction: column; + } + #xowiki-chat-fs { + flex-direction: column; + height: 100%; + } + #xowiki-chat-users { + order: 1; + border-left: 1px solid #ddd; + border-bottom: none; + flex-direction: row; + overflow-x: auto; + } + #xowiki-chat-users .xowiki-chat-user-block { + border-right: 1px solid #ddd; + border-bottom: none; + min-width: 240px; + } + #xowiki-chat-messages-and-form { + width: 100%; + order: 2; + flex: 1 1 auto; + } +}