mirror of
https://github.com/pierre42100/ComunicWeb
synced 2025-06-19 20:35:16 +00:00
Improved connection between big and small conversation windows
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -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;
|
||||
|
Reference in New Issue
Block a user