Improved connection between big and small conversation windows

This commit is contained in:
2019-05-16 18:40:39 +02:00
parent 30743601a9
commit cd8280ae01
6 changed files with 39 additions and 12 deletions

View File

@ -145,11 +145,16 @@ function log(message){
* Open a conversation specified by its ID
*
* @param {number} id The ID of the conversation to open
* @param {bool} fullscreen Specify whether the conversation has to
* appear in full screen or not
*/
function openConversation(id){
ComunicWeb.components.conversations.manager.addConversation({
conversationID: id
});
function openConversation(id, fullscreen = false){
if(!fullscreen)
ComunicWeb.components.conversations.manager.addConversation({
conversationID: id
});
else
openPage("conversations/" + id);
}
/**

View File

@ -45,6 +45,7 @@ function createElem(nodeType, appendTo){
* @info {boolean} disabled Set whether the field should be disabled or not (input only)
* @info {HTMLElement[]} children Children for the new object
* @info {Function} onclick
* @info {Function} ondblclick
* @return {HTMLElement} The newly created element
*/
function createElem2(infos){
@ -132,6 +133,9 @@ function createElem2(infos){
if(infos.onclick)
newElem.addEventListener("click", infos.onclick);
if(infos.ondblclick)
newElem.addEventListener("dblclick", infos.ondblclick);
//Return newly created element
return newElem;