Created conversations page

This commit is contained in:
Pierre
2018-05-13 14:06:32 +02:00
parent 1a922704ed
commit 1d9ae0dadd
7 changed files with 166 additions and 0 deletions

View File

@ -0,0 +1,54 @@
/**
* Conversations list pane
*
* @author Pierre HUBERT
*/
ComunicWeb.pages.conversations.listPane = {
/**
* Display the list of conversation
*
* @param {HTMLElement} target The target of the page
*/
display: function(target){
//Create the box
var listBox = createElem2({
appendTo: target,
type: "div",
class: "box box-solid"
});
//Box header
var boxHeader = createElem2({
appendTo: listBox,
type: "div",
class: "box-header with-border"
});
//Box title
createElem2({
appendTo: boxHeader,
type: "h3",
class: "box-title",
innerHTML: "Conversations"
});
//Box body
var boxBody = createElem2({
appendTo: listBox,
type: "div",
class: "box-body no-padding"
});
//Loading message
var loadingMsg = createElem2({
appendTo: boxBody,
type: "div",
class: "conv-list-loading-msg",
innerHTML: "Loading, please wait..."
});
}
}

View File

@ -0,0 +1,44 @@
/**
* Conversation page main script file
*
* @author Pierre HUBERT
*/
ComunicWeb.pages.conversations.main = {
/**
* Open settings page
*
* @param {object} args Optionnal arguments
* @param {HTMLElement} target The target for the page
*/
open: function(args, target){
//Conversation page is organized like an array with two columns
//Left column : the list of conversations
//Rigth column : the message of the currently opened conversation
//Create a row
var row = createElem2({
appendTo: target,
type: "div",
class: "row conversations-page-container"
});
//Left area: The list of conversations
var leftArea = createElem2({
appendTo: row,
type: "div",
class: "col-md-3"
});
//Right area : The conversations
var rightArea = createElem2({
appendTo: row,
type: "div",
class: "col-md-9"
});
//Display the list of conversation
ComunicWeb.pages.conversations.listPane.display(leftArea);
}
}