Declared update settings function

This commit is contained in:
Pierre 2017-06-17 17:32:21 +02:00
parent 5c6588513e
commit 844c3f7e82
2 changed files with 20 additions and 2 deletions

View File

@ -247,10 +247,10 @@ ComunicWeb.components.conversations.chatWindows = {
* @return {Boolean} True for a success
*/
submitUpdateForm: function(conversation){
console.log(conversation);
//Then, get informations about the input
var newValues = {
conversationID: conversation.infos.ID,
following: conversation.settingsForm.followConversationInput.checked,
}
@ -276,6 +276,9 @@ ComunicWeb.components.conversations.chatWindows = {
conversation.settingsForm.createButton.disabled = "true";
//Peform a request through the interface
ComunicWeb.components.conversations.interface.updateSettings(newValues, function(result){
console.log("Function callback !!!!!!!!!!!!!!", result);
});
//Success
return true;

View File

@ -66,7 +66,7 @@ ComunicWeb.components.conversations.interface = {
*
* @param {Object} infos Informations about the conversation to create
* * @info {Array} users A list of the members of the conversation
* * @info {Boolan} follow Defines if the current user wants to follow the conversation or not
* * @info {Boolean} follow Defines if the current user wants to follow the conversation or not
* * @info {Mixed} conversationName The name of the conversation
* @param {Function} afterCreate What to do once the conversation is created
* @return {Boolean} True for a success
@ -99,6 +99,21 @@ ComunicWeb.components.conversations.interface = {
return true;
},
/**
* Update conversation settings
*
* @param {infos} infos Informations about the conversation to update
* @info {Integer} conversationID The ID of the conversation to update
* @info {Boolean} following Specify if the user is following the conversation or not
* @info {String} name Specify a new name for the conversation
* @info {array} members Specify the new list of members for the conversation
* @param {function} callback The function callback
* @return {Boolean} True for a success
*/
updateSettings: function(infos, callback){
console.log("PLEASE IMPLEMENT ME ON NEXT DEVELOPPEMENT FUNCTION");
},
/**
* Get informations about a unique conversation
*