1
0
mirror of https://github.com/pierre42100/ComunicWeb synced 2025-07-20 18:05:27 +00:00

Fixed typo

This commit is contained in:
Pierre
2018-03-25 09:43:39 +02:00
parent cf3207ddc9
commit cca7b536b2
25 changed files with 129 additions and 129 deletions

@@ -16,7 +16,7 @@ ComunicWeb.components.comments.form = {
//Check if we are creating a new comment of or reseting an existing one
if(target.className != "comment-creation-form"){
//Create form contener
//Create form container
var commentForm = createElem2({
appendTo: target,
type: "form",

@@ -43,8 +43,8 @@ ComunicWeb.components.comments.ui = {
*/
_process_comments: function(infos, usersInfos, postID, target){
//Create comments contener
var contener = createElem2({
//Create comments container
var container = createElem2({
appendTo: target,
type: "div",
class: "box-comments post-comments"
@@ -52,12 +52,12 @@ ComunicWeb.components.comments.ui = {
//Process the list of comments
for(i in infos){
this._show_comment(infos[i], usersInfos['user-' + infos[i].userID], contener);
this._show_comment(infos[i], usersInfos['user-' + infos[i].userID], container);
}
//Add comment creation form (if possible)
if(signed_in()){
ComunicWeb.components.comments.form.display(postID, contener)
ComunicWeb.components.comments.form.display(postID, container)
}
},
@@ -95,10 +95,10 @@ ComunicWeb.components.comments.ui = {
*/
_show_comment: function(infos, user, target){
//Create comment contener (if required)
//Create comment container (if required)
if(target.className != "box-comment"){
var commentContener = createElem2({
var commentContainer = createElem2({
appendTo: target,
type: "div",
class: "box-comment"
@@ -106,16 +106,16 @@ ComunicWeb.components.comments.ui = {
}
//Empty comment contener
//Empty comment container
else {
emptyElem(target);
var commentContener = target;
var commentContainer = target;
}
//Add user image
createElem2({
appendTo: commentContener,
appendTo: commentContainer,
type: "img",
class: "img-circle imgs-sm",
src: user.accountImage
@@ -123,13 +123,13 @@ ComunicWeb.components.comments.ui = {
//Create comment text
var commentText = createElem2({
appendTo: commentContener,
appendTo: commentContainer,
type: "div",
class: "comment-text"
});
//Add username
var userNameContener = createElem2({
var userNameContainer = createElem2({
appendTo: commentText,
type: "span",
class: "username",
@@ -137,15 +137,15 @@ ComunicWeb.components.comments.ui = {
});
//Add right elements
var rightContener = createElem2({
appendTo: userNameContener,
var rightContainer = createElem2({
appendTo: userNameContainer,
type: "span",
class: "text-muted pull-right"
});
//Add comment creation date
createElem2({
appendTo: rightContener,
appendTo: rightContainer,
type: "span",
innerHTML: ComunicWeb.common.date.timeDiffToStr(infos.time_sent) + " ago"
});
@@ -155,7 +155,7 @@ ComunicWeb.components.comments.ui = {
//Create a button to update the comment
var editCommentLink = createElem2({
appendTo: rightContener,
appendTo: rightContainer,
type: "a",
class: "edit-comment-link"
});
@@ -170,14 +170,14 @@ ComunicWeb.components.comments.ui = {
editCommentLink.onclick = function(){
//Open comment editor
ComunicWeb.components.comments.editor.open(infos, commentContener);
ComunicWeb.components.comments.editor.open(infos, commentContainer);
}
//Create a button to delete the comment
var deleteCommentLink = createElem2({
appendTo: rightContener,
appendTo: rightContainer,
type: "a",
class: "delete-comment-link"
});
@@ -198,12 +198,12 @@ ComunicWeb.components.comments.ui = {
return;
//Hide the comment
commentContener.style.visibility = "hidden";
commentContainer.style.visibility = "hidden";
//Delete the comment
ComunicWeb.components.comments.interface.delete(infos.ID, function(response){
commentContener.style.visibility = "visible";
commentContainer.style.visibility = "visible";
//Check for errors
if(response.error){
@@ -212,8 +212,8 @@ ComunicWeb.components.comments.ui = {
}
//Delete the comment node
emptyElem(commentContener);
commentContener.remove();
emptyElem(commentContainer);
commentContainer.remove();
});
});
@@ -237,14 +237,14 @@ ComunicWeb.components.comments.ui = {
//Add comment image (if any)
if(infos.img_url != null){
var commentImageContener = createElem2({
var commentImageContainer = createElem2({
appendTo: commentText,
type: "div",
class: "comment-img-contener"
class: "comment-img-container"
});
var commentImageLink = createElem2({
appendTo: commentImageContener,
appendTo: commentImageContainer,
type: "a",
href: infos.img_url
});

@@ -24,7 +24,7 @@ ComunicWeb.components.conversations.chatWindows = {
//Create a conversation window
var conversationWindow = this.create({
target: byId(ComunicWeb.components.conversations.manager.__conversationsContenerID),
target: byId(ComunicWeb.components.conversations.manager.__conversationsContainerID),
conversationID: conversationID,
});
@@ -75,7 +75,7 @@ ComunicWeb.components.conversations.chatWindows = {
//Debug
//Create messages contener
//Create messages container
infosBox.messagesArea = createElem2({
appendTo: infosBox.boxBody,
type: "div",
@@ -120,8 +120,8 @@ ComunicWeb.components.conversations.chatWindows = {
*/
addMessageform: function(infosBox){
//Create form contener
var conversationFormContener = createElem2({
//Create form container
var conversationFormContainer = createElem2({
appendTo: infosBox.boxFooter,
type: "form",
class: "create-message-form"
@@ -129,7 +129,7 @@ ComunicWeb.components.conversations.chatWindows = {
//Create input group
var inputGroup = createElem2({
appendTo: conversationFormContener,
appendTo: conversationFormContainer,
type: "div",
class: "input-group"
});
@@ -209,7 +209,7 @@ ComunicWeb.components.conversations.chatWindows = {
//Add required elements to infosBox
infosBox.sendMessageForm = {
formRoot: conversationFormContener,
formRoot: conversationFormContainer,
sendButton: sendButton,
inputText: inputText,
textarea2: textarea2,

@@ -7,9 +7,9 @@
ComunicWeb.components.conversations.manager = {
/**
* @var {String} The ID of the conversation contener
* @var {String} The ID of the conversation container
*/
__conversationsContenerID: "conversationsElem",
__conversationsContainerID: "conversationsElem",
/**
* Display conversations manager
@@ -19,7 +19,7 @@ ComunicWeb.components.conversations.manager = {
display: function(){
//Try to get conversation manager
var conversationsContainerElem = byId(this.__conversationsContenerID);
var conversationsContainerElem = byId(this.__conversationsContainerID);
//Check if element exists or not
if(conversationsContainerElem){
@@ -33,7 +33,7 @@ ComunicWeb.components.conversations.manager = {
//Create conversations manager element
var conversationsContainerElem = createElem("div");
conversationsContainerElem.id = this.__conversationsContenerID;
conversationsContainerElem.id = this.__conversationsContainerID;
//Insert the element at the right place
var pageTarget = byId("pageTarget");

@@ -55,12 +55,12 @@ ComunicWeb.components.conversations.unreadDropdown = {
});
//Add conversations list
var conversationsListContener = createElem2({
var conversationsListContainer = createElem2({
appendTo: dropdownMenu,
type: "li"
});
var conversationsList = createElem2({
appendTo: conversationsListContener,
appendTo: conversationsListContainer,
type: "ul",
class: "menu"
});

@@ -162,7 +162,7 @@ ComunicWeb.components.friends.listModal = {
*/
_show_read_only: function(target, ids, user){
//Create the friends list contener
//Create the friends list container
var list = createElem2({
appendTo: target,
type: "div",
@@ -182,7 +182,7 @@ ComunicWeb.components.friends.listModal = {
ids.forEach(id => {
//Display the user
const userContener = createElem2({
const userContainer = createElem2({
appendTo: list,
type: "div",
class: "friend"
@@ -190,7 +190,7 @@ ComunicWeb.components.friends.listModal = {
//Create user link
const userLink = createElem2({
appendTo: userContener,
appendTo: userContainer,
type: "a"
});

@@ -15,13 +15,13 @@ ComunicWeb.components.friends.ui = {
*/
show_personnal_friend: function(target, friend, user){
//Create friend contener, if required
//Create friend container, if required
if(target.className == "friend"){
var friendContener = target;
emptyElem(friendContener);
var friendContainer = target;
emptyElem(friendContainer);
}
else
var friendContener = createElem2({
var friendContainer = createElem2({
appendTo: target,
type: "div",
class: "friend"
@@ -32,7 +32,7 @@ ComunicWeb.components.friends.ui = {
//Create user link
const userLink = createElem2({
appendTo: friendContener,
appendTo: friendContainer,
type: "a"
});
@@ -64,7 +64,7 @@ ComunicWeb.components.friends.ui = {
//Create actions area
var actionsOnFriendArea = createElem2({
appendTo: friendContener,
appendTo: friendContainer,
type: "div",
class: "friends-actions"
});
@@ -112,12 +112,12 @@ ComunicWeb.components.friends.ui = {
}
if(!accept){
friendContener.remove();
friendContainer.remove();
}
else {
//Update friendship informations
ComunicWeb.components.friends.actions.refresh_single_personnal(friendID, friendContener);
ComunicWeb.components.friends.actions.refresh_single_personnal(friendID, friendContainer);
}
});
@@ -165,7 +165,7 @@ ComunicWeb.components.friends.ui = {
}
//Update friendship informations
ComunicWeb.components.friends.actions.refresh_single_personnal(friendID, friendContener);
ComunicWeb.components.friends.actions.refresh_single_personnal(friendID, friendContainer);
});
}
@@ -199,7 +199,7 @@ ComunicWeb.components.friends.ui = {
ComunicWeb.common.notificationSystem.showNotification("Could not update posts creation status !", "danger");
//Update friendship informations
ComunicWeb.components.friends.actions.refresh_single_personnal(friendID, friendContener);
ComunicWeb.components.friends.actions.refresh_single_personnal(friendID, friendContainer);
});
}
@@ -209,7 +209,7 @@ ComunicWeb.components.friends.ui = {
//Offer to delete friendship
const deleteLink = createElem2({
appendTo: friendContener,
appendTo: friendContainer,
type: "a",
innerHTML: "<i class='fa fa-trash'></i>"
});
@@ -225,11 +225,11 @@ ComunicWeb.components.friends.ui = {
return;
//Try to delete the friend from the list
friendContener.style.visibility = "hidden";
friendContainer.style.visibility = "hidden";
ComunicWeb.components.friends.interface.remove_friend(friendID, function(result){
//Make friend contener visible
friendContener.style.visibility = "visible";
//Make friend container visible
friendContainer.style.visibility = "visible";
//Check for errors
if(result.error){
@@ -238,7 +238,7 @@ ComunicWeb.components.friends.ui = {
}
//Delete the element
friendContener.remove();
friendContainer.remove();
});

@@ -72,12 +72,12 @@ ComunicWeb.components.notifications.dropdown = {
});
//Add notifications list
var notificationsListContener = createElem2({
var notificationsListContainer = createElem2({
appendTo: dropdownMenu,
type: "li"
});
var notificationsList = createElem2({
appendTo: notificationsListContener,
appendTo: notificationsListContainer,
type: "ul",
class: "menu"
});

@@ -88,15 +88,15 @@ ComunicWeb.components.notifications.ui = {
};
//Create the notification object
var notificationContener = createElem2({
var notificationContainer = createElem2({
appendTo: target,
type: "li",
class: "notification-contener"
class: "notification-container"
});
//Create notification link
var notificationLink = createElem2({
appendTo: notificationContener,
appendTo: notificationContainer,
type: "a"
});
notificationLink.onclick = action;

@@ -96,7 +96,7 @@ ComunicWeb.components.posts.edit = {
var updateDiv = createElem2({
appendTo: modalBody,
type: "div",
class: "editor-contener"
class: "editor-container"
});
//Create update editor

@@ -44,36 +44,36 @@ ComunicWeb.components.posts.form = {
$(inputMessageDiv).wysiwyg();
//Add the different post types
var postTypesContener = createElem2({
var postTypesContainer = createElem2({
appendTo: boxBody,
type: "div",
class: "post-types"
});
//Text
var textType = this._add_post_type(postTypesContener, "text", lang("_post_type_text"));
var textType = this._add_post_type(postTypesContainer, "text", lang("_post_type_text"));
textType.checked = true;
//Image
var imageType = this._add_post_type(postTypesContener, "image", "<i class='fa fa-picture-o'></i> <span class='hidden-xs'>"+lang("_post_type_image")+"</span>");
var imageType = this._add_post_type(postTypesContainer, "image", "<i class='fa fa-picture-o'></i> <span class='hidden-xs'>"+lang("_post_type_image")+"</span>");
//Youtube
var youtubeType = this._add_post_type(postTypesContener, "youtube", "<i class='fa fa-youtube-play'></i> <span class='hidden-xs'>"+lang("_post_type_youtube")+"</span>");
var youtubeType = this._add_post_type(postTypesContainer, "youtube", "<i class='fa fa-youtube-play'></i> <span class='hidden-xs'>"+lang("_post_type_youtube")+"</span>");
//Movie
var movieType = this._add_post_type(postTypesContener, "movie", "<i class='fa fa-file-movie-o'></i> <span class='hidden-xs'>"+lang("_post_type_movie")+"</span>");
var movieType = this._add_post_type(postTypesContainer, "movie", "<i class='fa fa-file-movie-o'></i> <span class='hidden-xs'>"+lang("_post_type_movie")+"</span>");
//Link
var linkType = this._add_post_type(postTypesContener, "link", "<i class='fa fa-link'></i> <span class='hidden-xs'>"+lang("_post_type_link")+"</span>");
var linkType = this._add_post_type(postTypesContainer, "link", "<i class='fa fa-link'></i> <span class='hidden-xs'>"+lang("_post_type_link")+"</span>");
//PDF
var pdfType = this._add_post_type(postTypesContener, "pdf", "<i class='fa fa-file-pdf-o'></i> <span class='hidden-xs'>"+lang("_post_type_pdf")+"</span>");
var pdfType = this._add_post_type(postTypesContainer, "pdf", "<i class='fa fa-file-pdf-o'></i> <span class='hidden-xs'>"+lang("_post_type_pdf")+"</span>");
//Countdown timer
var countdownType = this._add_post_type(postTypesContener, "countdown", "<i class='fa fa-clock-o'></i> <span class='hidden-xs'>"+lang("_post_type_countdown")+"</span>");
var countdownType = this._add_post_type(postTypesContainer, "countdown", "<i class='fa fa-clock-o'></i> <span class='hidden-xs'>"+lang("_post_type_countdown")+"</span>");
//Survey
var surveyType = this._add_post_type(postTypesContener, "survey", "<i class='fa fa-pie-chart'></i> <span class='hidden-xs'>"+lang("_post_type_survey")+"</span>");
var surveyType = this._add_post_type(postTypesContainer, "survey", "<i class='fa fa-pie-chart'></i> <span class='hidden-xs'>"+lang("_post_type_survey")+"</span>");
@@ -255,7 +255,7 @@ ComunicWeb.components.posts.form = {
countdownType.onclick = changesHandler;
surveyType.onclick = changesHandler;
//Right contener
//Right container
var rightDiv = createElem2({
appendTo: boxBody,
type: "div",
@@ -263,24 +263,24 @@ ComunicWeb.components.posts.form = {
})
//Add visibility level choice
var visibility_choices_contener = createElem2({
var visibility_choices_container = createElem2({
appendTo: rightDiv,
type: "div",
class: "post-visiblity-contener"
class: "post-visiblity-container"
});
//Private post
var privateLevel = ComunicWeb.components.posts.visibilityLevels.private;
var privateInput = this._add_visiblity_choice(visibility_choices_contener, "private", privateLevel.name, privateLevel.icon);
var privateInput = this._add_visiblity_choice(visibility_choices_container, "private", privateLevel.name, privateLevel.icon);
//Friends-visible post
var friendsLevel = ComunicWeb.components.posts.visibilityLevels.friends;
var friendsInput = this._add_visiblity_choice(visibility_choices_contener, "friends", friendsLevel.name, friendsLevel.icon);
var friendsInput = this._add_visiblity_choice(visibility_choices_container, "friends", friendsLevel.name, friendsLevel.icon);
friendsInput.checked = true;
//Worldwide post
var publicLevel = ComunicWeb.components.posts.visibilityLevels.public;
this._add_visiblity_choice(visibility_choices_contener, "public", publicLevel.name, publicLevel.icon);
this._add_visiblity_choice(visibility_choices_container, "public", publicLevel.name, publicLevel.icon);
//Add send button
var sendButton = createElem2({
@@ -459,7 +459,7 @@ ComunicWeb.components.posts.form = {
}
//Get the visibility level
var visibilityLevel = visibility_choices_contener.querySelector("input:checked").value;
var visibilityLevel = visibility_choices_container.querySelector("input:checked").value;
datas.append("visibility", visibilityLevel);
//Lock the send button
@@ -495,14 +495,14 @@ ComunicWeb.components.posts.form = {
*/
_add_post_type: function(target, value, label){
var postTypeContener = createElem2({
var postTypeContainer = createElem2({
appendTo: target,
type: "label",
class: "post-form-choice"
});
var input = createElem2({
appendTo: postTypeContener,
appendTo: postTypeContainer,
type: "input",
elemType: "radio",
name: "post_type",
@@ -510,7 +510,7 @@ ComunicWeb.components.posts.form = {
});
createElem2({
appendTo: postTypeContener,
appendTo: postTypeContainer,
type: "span",
innerHTML: label
});
@@ -530,14 +530,14 @@ ComunicWeb.components.posts.form = {
_add_visiblity_choice: function(target, value, title, icon){
//Visibility label
var visibility_contener = createElem2({
var visibility_container = createElem2({
appendTo: target,
type: "label",
});
//Create input
var visibilityInput = createElem2({
appendTo: visibility_contener,
appendTo: visibility_container,
type: "input",
elemType: "radio",
name: "post_visibility",
@@ -546,7 +546,7 @@ ComunicWeb.components.posts.form = {
//Create icon
var visibility_label = createElem2({
appendTo: visibility_contener,
appendTo: visibility_container,
type: "span",
innerHTML: "<i class='fa " + icon + "'></i>"
});

@@ -285,7 +285,7 @@ ComunicWeb.components.posts.ui = {
//In case of video
else if(infos.kind == "movie"){
var videoContener = createElem2({
var videoContainer = createElem2({
appendTo: postRoot,
type: "div",
class: "post-video"
@@ -293,7 +293,7 @@ ComunicWeb.components.posts.ui = {
//Create video element
var video = createElem2({
appendTo: videoContener,
appendTo: videoContainer,
type: "video",
class: "video-js vjs-default-skin"
});
@@ -439,7 +439,7 @@ ComunicWeb.components.posts.ui = {
class: "post-survey-question"
});
//Answer contener
//Answer container
var surveyResponse = createElem2({
appendTo: postRoot,
type: "div",
@@ -449,7 +449,7 @@ ComunicWeb.components.posts.ui = {
var row = createElem2({
appendTo: postRoot,
type: "div",
class: "row post-survey-chart-contener"
class: "row post-survey-chart-container"
});
//Create canvas column
@@ -459,8 +459,8 @@ ComunicWeb.components.posts.ui = {
class: "col-md-8"
});
//Chart contener
var chartContener = createElem2({
//Chart container
var chartContainer = createElem2({
appendTo: leftColumn,
type: "div",
class: "chart-responsive"
@@ -468,7 +468,7 @@ ComunicWeb.components.posts.ui = {
//Create canvas
var canvas = createElem2({
appendTo: chartContener,
appendTo: chartContainer,
type: "canvas",
});
canvas.style.height = "150px";