2017-01-08 14:54:25 +00:00
|
|
|
/**
|
|
|
|
* Comunic WebApp schema
|
|
|
|
*
|
|
|
|
* @author Pierre HUBERT
|
|
|
|
*/
|
2017-05-25 11:50:32 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* ComunicWeb main object
|
|
|
|
*/
|
2017-01-08 14:54:25 +00:00
|
|
|
var ComunicWeb = {
|
|
|
|
|
2017-05-22 16:06:17 +00:00
|
|
|
/**
|
|
|
|
* Configuration inclusion
|
|
|
|
*/
|
|
|
|
__config: ComunicConfig,
|
|
|
|
|
2017-05-24 15:13:38 +00:00
|
|
|
/**
|
|
|
|
* List of available pages
|
|
|
|
*/
|
|
|
|
pagesList:{},
|
|
|
|
|
2017-05-22 16:06:17 +00:00
|
|
|
/**
|
|
|
|
* Common functions
|
|
|
|
*/
|
|
|
|
common:{
|
|
|
|
/**
|
|
|
|
* Application system functions
|
|
|
|
*/
|
|
|
|
system:{
|
2017-05-25 13:46:38 +00:00
|
|
|
/**
|
|
|
|
* Initializate the application
|
|
|
|
*/
|
2017-06-14 09:46:10 +00:00
|
|
|
init: function(openPage){},
|
2017-05-25 13:46:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Restart the application
|
|
|
|
*/
|
|
|
|
restart: function(){},
|
2017-06-14 09:46:10 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Reset the application
|
|
|
|
*/
|
|
|
|
reset: function(complete, openPage){},
|
2017-05-22 16:06:17 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* API functions
|
|
|
|
*/
|
|
|
|
api: {
|
|
|
|
/**
|
|
|
|
* Make an API request
|
|
|
|
*/
|
|
|
|
makeAPIrequest: function(apiURI, params, requireLoginTokens, nextAction){},
|
2018-01-06 09:30:04 +00:00
|
|
|
|
2018-01-30 05:48:21 +00:00
|
|
|
/**
|
|
|
|
* Make an API request with a prepared form data object
|
|
|
|
*/
|
|
|
|
makeFormDatarequest: function(apiURI, data, requireLoginTokens, nextAction){},
|
|
|
|
|
2018-01-06 09:30:04 +00:00
|
|
|
//TODO : implement
|
2017-05-22 16:06:17 +00:00
|
|
|
},
|
|
|
|
|
2017-06-14 09:46:10 +00:00
|
|
|
/**
|
|
|
|
* Global cache management system
|
|
|
|
*/
|
|
|
|
cacheManager:{
|
|
|
|
//TODO : implement
|
|
|
|
},
|
|
|
|
|
2017-05-22 16:06:17 +00:00
|
|
|
/**
|
|
|
|
* Langs functions
|
|
|
|
*/
|
|
|
|
langs: {
|
|
|
|
/**
|
|
|
|
* Return current language
|
|
|
|
*/
|
|
|
|
getCurrentLanguage: function(){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Include and install specified language
|
|
|
|
*/
|
|
|
|
installLanguage: function(languageID){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initializate languages
|
|
|
|
*/
|
|
|
|
initLanguages: function(){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Return a string in correct language
|
|
|
|
*/
|
|
|
|
getTranslatedText: function(stringName, stringParams){},
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Messages functions
|
|
|
|
*/
|
|
|
|
messages: {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Create and return a callout element
|
|
|
|
*/
|
|
|
|
createCalloutElem: function(calloutTitle, calloutMessage, calloutType){},
|
2018-01-11 05:50:23 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Create and display a confirmation dialog
|
|
|
|
*/
|
|
|
|
confirm: function(message, callback){},
|
2018-01-27 16:46:42 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Prompt the user to input a string
|
|
|
|
*/
|
|
|
|
inputString: function(title, message, defaultValue, callback){},
|
2017-05-22 16:06:17 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Error functions
|
|
|
|
*/
|
|
|
|
error:{
|
|
|
|
/**
|
|
|
|
* Submit an error
|
|
|
|
*/
|
|
|
|
submitError: function(errorLevel, errorMessage, errorCode, errorData){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handle and show a fatal error
|
|
|
|
*/
|
|
|
|
fatalError: function(errorMessage, errorCode, errorData){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Handle a 404 not found error
|
|
|
|
*/
|
|
|
|
pageNotFound: function(additionnalData, targetElement){},
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* URL functions
|
|
|
|
*/
|
|
|
|
url:{
|
|
|
|
/**
|
|
|
|
* Return current URL opened on the website
|
|
|
|
*/
|
|
|
|
getCurrentWebsiteURL: function(){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Change the current website URI
|
|
|
|
*/
|
|
|
|
changeURI: function(newTitle, newURI){},
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Page functions
|
|
|
|
*/
|
|
|
|
page: {
|
|
|
|
/**
|
|
|
|
* Empty current page
|
|
|
|
*/
|
|
|
|
emptyPage: function(createWrapper){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Show a full wait splash screen
|
|
|
|
*
|
|
|
|
* @param {String} message A message to explain the reason of the splash screen (optionnal)
|
|
|
|
*/
|
|
|
|
showWaitSplashScreen: function(message){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Show a transparent wait splash screen
|
|
|
|
*/
|
2017-06-07 14:55:47 +00:00
|
|
|
showTransparentWaitSplashScreen: function(target){},
|
2017-05-22 16:06:17 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Open a page
|
|
|
|
*/
|
|
|
|
openPage: function(pageURI, additionnalData){},
|
|
|
|
|
2018-01-07 18:21:02 +00:00
|
|
|
/**
|
|
|
|
* Refresh the current page
|
|
|
|
*/
|
|
|
|
refresh_current_page: function(){},
|
|
|
|
|
2017-05-22 16:06:17 +00:00
|
|
|
/**
|
|
|
|
* Prepare a template load by specifying datas
|
|
|
|
*/
|
|
|
|
prepareLoadTemplate: function(){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Load, parse and show an HTML template
|
|
|
|
*/
|
|
|
|
getAndShowTemplate: function(targetElem, dataTemplate, templateURI, nextAction, cleanContener){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Convert a JSON object into html elements
|
|
|
|
*/
|
|
|
|
convertJSONobjectTOhtmlElement: function(parentNodeChilds, values){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get and show a JSON template
|
|
|
|
*/
|
|
|
|
getAndShowJSONtemplate: function(targetElem, templateURI, additionalData, afterParsingJSONtemplate, cleanContener){},
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Functions to check data input in forms
|
|
|
|
*/
|
|
|
|
formChecker: {
|
2017-05-25 13:46:38 +00:00
|
|
|
/**
|
|
|
|
* Check an input
|
|
|
|
*/
|
|
|
|
checkInput: function(input, inFormGroup){},
|
2017-05-22 16:06:17 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Notification system
|
|
|
|
*/
|
|
|
|
notificationSystem: {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Display a notification
|
|
|
|
*/
|
|
|
|
showNotification: function(message, notifType, notifDuration, notifTitle){},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Network common requests
|
|
|
|
*/
|
|
|
|
network: {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var {object} Cache contener
|
|
|
|
*/
|
|
|
|
cache: {},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Make a get request
|
|
|
|
*/
|
|
|
|
getRequest: function(url, cache, GETnextAction){},
|
2017-06-07 15:26:51 +00:00
|
|
|
|
2017-06-14 09:46:10 +00:00
|
|
|
/**
|
|
|
|
* Empty network cache
|
|
|
|
*/
|
|
|
|
emptyCache: function(){},
|
|
|
|
|
2017-06-07 15:26:51 +00:00
|
|
|
/**
|
|
|
|
* Update the status of the network
|
|
|
|
*/
|
|
|
|
setStatus: function(success){},
|
2017-05-22 16:06:17 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Operations on JS files
|
|
|
|
*/
|
|
|
|
jsFiles:{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Include a Javascript file
|
|
|
|
*/
|
|
|
|
includeFile: function(fileURL){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Execute some source code contained in a variable
|
|
|
|
*/
|
|
|
|
executeJSsource: function(source){},
|
|
|
|
},
|
2017-06-03 12:25:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* The date library
|
|
|
|
*/
|
|
|
|
date:{
|
|
|
|
//TODO: implement
|
|
|
|
},
|
2017-05-22 16:06:17 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Debug functions
|
|
|
|
*/
|
|
|
|
debug:{
|
|
|
|
/**
|
|
|
|
* @var {Object} Internal log variable
|
|
|
|
*/
|
|
|
|
__log: {},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Display message on browser console
|
|
|
|
*/
|
|
|
|
logMessage: function(message){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Save a new log message
|
|
|
|
*/
|
|
|
|
saveLogMessage: function(message){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get log content in a string
|
|
|
|
*/
|
|
|
|
getLogContent: function(){},
|
2017-06-07 13:53:39 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Display Comunic Logo on the developper console
|
|
|
|
*/
|
|
|
|
displayComunicLogo: function(){},
|
2017-05-22 16:06:17 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* User functions
|
|
|
|
*/
|
|
|
|
user:{
|
|
|
|
/**
|
|
|
|
* Login tokens storage controller
|
|
|
|
*/
|
|
|
|
loginTokens: {
|
|
|
|
/**
|
|
|
|
* Set User tokens
|
|
|
|
*/
|
|
|
|
setUserTokens: function(tokens, storageType){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Check if there is any login tokens available
|
|
|
|
*/
|
|
|
|
checkLoginTokens: function(){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get login tokens
|
|
|
|
*/
|
|
|
|
getLoginTokens: function(){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Perform user logout
|
|
|
|
*/
|
|
|
|
deleteLoginTokens: function(){},
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Manage user login
|
|
|
|
*/
|
|
|
|
userLogin: {
|
|
|
|
/**
|
|
|
|
* @var {Boolean} Store user login state (true by default)
|
|
|
|
*/
|
|
|
|
__userLogin: true,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @var {Integer} Store the current user ID
|
|
|
|
*/
|
|
|
|
__userID: 0,
|
|
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Tell if user is logged in or not
|
|
|
|
*/
|
|
|
|
getUserLoginState: function(){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get user ID (if logged in)
|
|
|
|
*/
|
|
|
|
getUserID: function(){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Try to get and store current user ID
|
|
|
|
*/
|
|
|
|
getCurrentUserId: function(afterGetCurrentUserID){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Refresh the user login state
|
|
|
|
*/
|
|
|
|
refreshLoginState: function(afterLogin){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Try to login user
|
|
|
|
*/
|
|
|
|
loginUser: function(usermail, userpassword, permanentLogin, afterLogin){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Logout user
|
|
|
|
*/
|
|
|
|
logoutUser: function(afterLogout){},
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get user infos
|
|
|
|
*/
|
|
|
|
userInfos: {
|
2017-05-25 13:46:38 +00:00
|
|
|
/**
|
|
|
|
* @var {String} User infos cache
|
|
|
|
*/
|
|
|
|
usersInfos: {},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get user informations
|
|
|
|
*/
|
2017-05-27 13:35:10 +00:00
|
|
|
getUserInfos: function(userID, afterGetUserInfos, forceRequest){},
|
2017-05-25 13:46:38 +00:00
|
|
|
|
2017-05-27 13:11:30 +00:00
|
|
|
/**
|
|
|
|
* Get multiple users informations
|
|
|
|
*/
|
2017-05-27 13:35:10 +00:00
|
|
|
getMultipleUsersInfos: function(usersID, afterGetUserInfos, forceRequest){},
|
2017-05-27 13:11:30 +00:00
|
|
|
|
2017-05-25 13:46:38 +00:00
|
|
|
/**
|
|
|
|
* Empty user informations cache
|
|
|
|
* Remove all entries from user informations cache
|
|
|
|
*/
|
2017-05-25 13:53:41 +00:00
|
|
|
emptyUserInfosCache: function(){},
|
2017-06-05 12:35:28 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Given a query, search for users and return the result
|
|
|
|
*/
|
|
|
|
search: function(query, afterSearch){},
|
2017-06-13 14:42:09 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Given user IDs (in an array) the function return their names in a string
|
|
|
|
*/
|
|
|
|
getNames: function(usersID, afterNames){},
|
2017-06-14 09:46:10 +00:00
|
|
|
|
2017-12-17 17:48:02 +00:00
|
|
|
/**
|
|
|
|
* Get advanced informations about a user
|
|
|
|
*/
|
|
|
|
getAdvancedInfos: function(userID, callback){},
|
|
|
|
|
2017-12-16 13:43:31 +00:00
|
|
|
/**
|
|
|
|
* Get the user ID specified by its folder name
|
|
|
|
*/
|
|
|
|
getIDfromPath: function(path, callback){},
|
|
|
|
|
2018-01-02 17:58:40 +00:00
|
|
|
/**
|
|
|
|
* Get the ID or the path of a user, depending of what is available
|
|
|
|
*/
|
|
|
|
getIDorPath: function(userInfos){},
|
|
|
|
|
2017-06-14 09:46:10 +00:00
|
|
|
/**
|
|
|
|
* Empty users cache
|
|
|
|
*/
|
|
|
|
emptyCache: function(){},
|
2017-05-22 16:06:17 +00:00
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Application components
|
|
|
|
*/
|
|
|
|
components: {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Menubar
|
|
|
|
*/
|
|
|
|
menuBar: {
|
2017-05-24 12:31:56 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Menu bar object - common methods
|
|
|
|
*/
|
|
|
|
common:{
|
2017-05-25 13:53:41 +00:00
|
|
|
/**
|
|
|
|
* Display menu bar
|
|
|
|
*/
|
|
|
|
display: function(){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Initializate a menubar
|
|
|
|
*/
|
|
|
|
init: function(menuContainer){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Reset a specified menubar
|
|
|
|
*/
|
|
|
|
reset: function(menuBar){},
|
2017-05-24 12:31:56 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Not authenticated menu bar components
|
|
|
|
*/
|
|
|
|
notAuthenticated: {
|
2017-05-25 13:53:41 +00:00
|
|
|
/**
|
|
|
|
* Add not-authenticated user specific elements
|
|
|
|
*/
|
|
|
|
addElements: function(container){},
|
2017-05-25 11:50:32 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Menubar for authenticated users complements
|
|
|
|
*/
|
|
|
|
authenticated:{
|
2017-05-25 13:53:41 +00:00
|
|
|
/**
|
|
|
|
* Add authenticated user specific elements
|
|
|
|
*/
|
|
|
|
addElements: function(container){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Add dropdown menu
|
|
|
|
*/
|
|
|
|
addDropdown: function(navbarElem){},
|
|
|
|
|
2017-06-03 13:41:04 +00:00
|
|
|
/**
|
|
|
|
* Add user friends toggle button
|
|
|
|
*/
|
|
|
|
addFriendListButton: function(navbarElem){},
|
|
|
|
|
2017-05-25 13:53:41 +00:00
|
|
|
/**
|
|
|
|
* Add user name element
|
|
|
|
*/
|
|
|
|
addUserName: function(navbarElem){},
|
2017-05-26 09:38:37 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Add search form element
|
|
|
|
*/
|
|
|
|
addSearchForm: function(navbarElem){},
|
2017-05-25 11:50:32 +00:00
|
|
|
},
|
2017-05-22 16:06:17 +00:00
|
|
|
},
|
|
|
|
|
2017-05-24 14:37:41 +00:00
|
|
|
/**
|
|
|
|
* Mails caching component
|
|
|
|
*/
|
|
|
|
mailCaching: {
|
2017-05-25 13:53:41 +00:00
|
|
|
/**
|
|
|
|
* @var Mail caching variable name
|
|
|
|
*/
|
|
|
|
__mailCachingVarName: "lastLoginMail",
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Get current cached value
|
|
|
|
*/
|
|
|
|
get: function(){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Set a new mail value
|
|
|
|
*/
|
|
|
|
set: function(mail){},
|
2017-05-26 10:01:54 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Search form component
|
|
|
|
*/
|
|
|
|
searchForm: {
|
|
|
|
//TODO : implement
|
|
|
|
},
|
2017-05-24 14:37:41 +00:00
|
|
|
|
2017-05-28 11:48:19 +00:00
|
|
|
/**
|
|
|
|
* Friends list
|
|
|
|
*/
|
2017-05-31 14:51:52 +00:00
|
|
|
friends: {
|
|
|
|
/**
|
|
|
|
* Friends list caching system
|
|
|
|
*/
|
|
|
|
list:{
|
2017-06-14 09:46:10 +00:00
|
|
|
//TODO : implement
|
2017-05-31 14:51:52 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Friends bar
|
|
|
|
*/
|
|
|
|
bar:{
|
2017-06-14 09:46:10 +00:00
|
|
|
//TODO : implement
|
2017-05-31 14:51:52 +00:00
|
|
|
},
|
2017-06-03 16:18:43 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
2017-06-07 17:24:48 +00:00
|
|
|
* Conversations
|
2017-06-03 16:18:43 +00:00
|
|
|
*/
|
2017-06-07 17:24:48 +00:00
|
|
|
conversations:{
|
2017-06-03 16:18:43 +00:00
|
|
|
/**
|
2017-06-07 17:24:48 +00:00
|
|
|
* Conversations manager
|
2017-06-03 16:18:43 +00:00
|
|
|
*/
|
|
|
|
manager:{
|
|
|
|
//TODO : implement
|
|
|
|
},
|
2017-06-05 08:12:38 +00:00
|
|
|
|
|
|
|
/**
|
2017-06-07 17:24:48 +00:00
|
|
|
* Conversations list windo
|
2017-06-05 08:12:38 +00:00
|
|
|
*/
|
|
|
|
list:{
|
|
|
|
//TODO : implement
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
2017-06-07 17:24:48 +00:00
|
|
|
* Conversations windows manager
|
2017-06-05 08:12:38 +00:00
|
|
|
*/
|
|
|
|
windows:{
|
2017-06-14 09:46:10 +00:00
|
|
|
//TODO : implement
|
2017-06-05 08:12:38 +00:00
|
|
|
},
|
2017-06-07 13:05:21 +00:00
|
|
|
|
2017-06-14 14:39:34 +00:00
|
|
|
/**
|
|
|
|
* Conversation chat window functions
|
|
|
|
*/
|
|
|
|
chatWindows: {
|
|
|
|
//TODO : implement
|
|
|
|
},
|
|
|
|
|
2017-06-07 13:05:21 +00:00
|
|
|
/**
|
2017-06-07 17:24:48 +00:00
|
|
|
* Interface between conversation UI and the API
|
2017-06-07 13:05:21 +00:00
|
|
|
*/
|
2017-06-14 09:46:10 +00:00
|
|
|
interface:{
|
|
|
|
//TODO : implement
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Opened conversations caching system
|
|
|
|
*/
|
|
|
|
cachingOpened:{
|
|
|
|
//TODO : implement
|
|
|
|
},
|
2017-06-14 14:39:34 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Conversation service file
|
|
|
|
*/
|
|
|
|
service:{
|
|
|
|
//TODO : implement
|
2017-06-16 09:42:28 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Conversations utilities
|
|
|
|
*/
|
|
|
|
utils:{
|
|
|
|
//TODO : implement
|
2017-06-14 14:39:34 +00:00
|
|
|
}
|
2017-06-03 16:18:43 +00:00
|
|
|
},
|
2017-06-05 14:03:14 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* User selector
|
|
|
|
*/
|
|
|
|
userSelect:{
|
|
|
|
//TODO : implement
|
2017-06-20 11:29:15 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Emoji functions
|
|
|
|
*/
|
|
|
|
emoji:{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Emoji parser system
|
|
|
|
*/
|
|
|
|
parser: {
|
|
|
|
//TODO : implement
|
|
|
|
},
|
2017-06-21 08:44:29 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Emojies list
|
|
|
|
*/
|
|
|
|
list: {
|
|
|
|
//TODO : implement
|
|
|
|
},
|
2017-06-20 11:29:15 +00:00
|
|
|
|
|
|
|
},
|
2017-06-21 10:10:22 +00:00
|
|
|
|
2017-12-29 07:58:22 +00:00
|
|
|
/**
|
|
|
|
* Likes handling
|
|
|
|
*/
|
|
|
|
like:{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Like buttons
|
|
|
|
*/
|
|
|
|
button: {
|
|
|
|
//TODO : implement
|
|
|
|
},
|
|
|
|
|
2017-12-29 08:58:40 +00:00
|
|
|
/**
|
|
|
|
* Likes API interface
|
|
|
|
*/
|
|
|
|
interface: {
|
|
|
|
//TODO : implement
|
|
|
|
}
|
|
|
|
|
2017-12-29 07:58:22 +00:00
|
|
|
},
|
|
|
|
|
2017-12-31 17:51:46 +00:00
|
|
|
/**
|
|
|
|
* Posts components
|
|
|
|
*/
|
|
|
|
posts: {
|
|
|
|
|
2018-01-10 05:49:46 +00:00
|
|
|
/**
|
|
|
|
* Visibility levels
|
|
|
|
*/
|
|
|
|
visibilityLevels: {
|
|
|
|
//TODO : implement
|
|
|
|
},
|
|
|
|
|
2017-12-31 17:51:46 +00:00
|
|
|
/**
|
|
|
|
* Posts communication interface
|
|
|
|
*/
|
|
|
|
interface: {
|
|
|
|
//TODO : implement
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Posts UI
|
|
|
|
*/
|
|
|
|
ui: {
|
2018-01-04 17:51:49 +00:00
|
|
|
//TODO : implement
|
2017-12-31 17:51:46 +00:00
|
|
|
},
|
|
|
|
|
2018-01-04 17:51:49 +00:00
|
|
|
/**
|
|
|
|
* Posts creation form
|
|
|
|
*/
|
|
|
|
form: {
|
|
|
|
//TODO : implement
|
2018-01-14 07:56:17 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Post editor
|
|
|
|
*/
|
|
|
|
edit: {
|
|
|
|
//TODO : implement
|
|
|
|
},
|
2018-01-04 17:51:49 +00:00
|
|
|
|
2018-01-16 05:52:01 +00:00
|
|
|
/**
|
|
|
|
* Post actions
|
|
|
|
*/
|
|
|
|
actions: {
|
|
|
|
//TODO : implement
|
|
|
|
}
|
|
|
|
|
2017-12-31 17:51:46 +00:00
|
|
|
},
|
|
|
|
|
2018-01-18 05:53:00 +00:00
|
|
|
/**
|
|
|
|
* Comments component
|
|
|
|
*/
|
|
|
|
comments: {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Comments UI interface
|
|
|
|
*/
|
|
|
|
ui:{
|
|
|
|
//TODO : implement
|
|
|
|
},
|
|
|
|
|
2018-01-27 17:49:05 +00:00
|
|
|
/**
|
|
|
|
* Comment actions
|
|
|
|
*/
|
|
|
|
actions: {
|
|
|
|
//TODO : implement
|
|
|
|
},
|
|
|
|
|
2018-01-18 05:53:00 +00:00
|
|
|
/**
|
|
|
|
* Comments interface
|
|
|
|
*/
|
|
|
|
interface: {
|
|
|
|
//TODO : implement
|
|
|
|
},
|
|
|
|
|
2018-01-28 16:03:54 +00:00
|
|
|
/**
|
|
|
|
* Comments creation form
|
|
|
|
*/
|
|
|
|
form: {
|
|
|
|
//TODO : implement
|
|
|
|
},
|
|
|
|
|
2018-01-27 16:46:42 +00:00
|
|
|
/**
|
|
|
|
* Comments editor
|
|
|
|
*/
|
|
|
|
editor: {
|
2018-01-28 16:03:54 +00:00
|
|
|
//TODO : implement
|
2018-01-27 16:46:42 +00:00
|
|
|
},
|
|
|
|
|
2018-01-18 05:53:00 +00:00
|
|
|
/**
|
|
|
|
* Comments utilities
|
|
|
|
*/
|
|
|
|
utils: {
|
|
|
|
//TODO : implement
|
|
|
|
}
|
|
|
|
|
|
|
|
},
|
|
|
|
|
2017-06-21 10:10:22 +00:00
|
|
|
/**
|
|
|
|
* Modern textarea handler
|
|
|
|
*/
|
|
|
|
textarea: {
|
|
|
|
|
|
|
|
},
|
2018-01-03 12:38:06 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Countdown timer
|
|
|
|
*/
|
|
|
|
countdown: {
|
|
|
|
//TODO : implement
|
|
|
|
},
|
|
|
|
|
2018-01-05 14:58:36 +00:00
|
|
|
/**
|
|
|
|
* Movies functions
|
|
|
|
*/
|
|
|
|
movies: {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Movies communication interface
|
|
|
|
*/
|
|
|
|
interface: {
|
|
|
|
//TODO : implement
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Movies picker
|
|
|
|
*/
|
|
|
|
picker:{
|
|
|
|
//TODO : implement
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
|
|
|
|
2017-05-22 16:06:17 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Pages controllers
|
|
|
|
*/
|
|
|
|
pages:{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Home page
|
|
|
|
*/
|
|
|
|
home: {
|
|
|
|
/**
|
|
|
|
* Common homes functions
|
|
|
|
*/
|
|
|
|
home:{
|
|
|
|
/**
|
|
|
|
* Open home page
|
|
|
|
*/
|
|
|
|
openHomePage: function(additionnalData, targetElement){},
|
|
|
|
|
|
|
|
},
|
2017-05-22 16:12:50 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Landing home page
|
|
|
|
*/
|
|
|
|
landingPage:{
|
2017-05-25 13:53:41 +00:00
|
|
|
/**
|
|
|
|
* Display home landing page
|
|
|
|
*/
|
|
|
|
display: function(targetElement){},
|
2017-05-22 16:12:50 +00:00
|
|
|
}
|
2017-05-22 16:06:17 +00:00
|
|
|
},
|
|
|
|
|
2017-12-10 07:13:22 +00:00
|
|
|
/**
|
|
|
|
* User page
|
|
|
|
*/
|
|
|
|
userPage: {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Main user page
|
|
|
|
*/
|
|
|
|
main: {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Open user page
|
|
|
|
*/
|
|
|
|
open: function(params, target){},
|
|
|
|
|
2017-12-16 13:43:31 +00:00
|
|
|
/**
|
|
|
|
* Open user page specified by user ID
|
|
|
|
*/
|
|
|
|
openUserPage: function(id, params, target){},
|
|
|
|
|
2017-12-17 17:48:02 +00:00
|
|
|
/**
|
|
|
|
* Display a user page
|
|
|
|
*/
|
|
|
|
displayUserPage: function(infos, params, target){},
|
|
|
|
|
2017-12-10 07:13:22 +00:00
|
|
|
},
|
|
|
|
|
2017-12-17 17:48:02 +00:00
|
|
|
/**
|
|
|
|
* Page with access forbidden
|
|
|
|
*/
|
|
|
|
accessForbidden: {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Display the page for user with forbidden access
|
|
|
|
*/
|
2017-12-17 18:14:19 +00:00
|
|
|
display: function(id, params, target){},
|
2017-12-17 17:48:02 +00:00
|
|
|
|
2017-12-17 18:14:19 +00:00
|
|
|
/**
|
|
|
|
* Show basic user informations
|
|
|
|
*/
|
|
|
|
showBasicInfos: function(userInfos, target){},
|
|
|
|
|
|
|
|
},
|
2017-12-17 17:48:02 +00:00
|
|
|
|
2017-12-20 18:18:18 +00:00
|
|
|
/**
|
|
|
|
* Handle the rendering of the friendship status
|
|
|
|
*/
|
|
|
|
friendshipStatus: {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Display the friendship status
|
|
|
|
*/
|
|
|
|
display: function(userID, target){},
|
|
|
|
|
|
|
|
//TODO : implement
|
|
|
|
|
|
|
|
},
|
|
|
|
|
2017-12-23 13:52:01 +00:00
|
|
|
/**
|
|
|
|
* Display user profile informations
|
|
|
|
*/
|
|
|
|
profileInfos: {
|
|
|
|
//TODO : implement
|
2017-12-29 07:58:22 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Display user posts
|
|
|
|
*/
|
|
|
|
posts: {
|
|
|
|
//TODO : implement
|
|
|
|
},
|
2017-12-23 13:52:01 +00:00
|
|
|
|
2017-12-10 07:13:22 +00:00
|
|
|
},
|
|
|
|
|
2017-05-22 16:06:17 +00:00
|
|
|
/**
|
|
|
|
* Login controller
|
|
|
|
*/
|
|
|
|
login:{
|
|
|
|
/**
|
|
|
|
* Open login page
|
|
|
|
*/
|
|
|
|
openLoginPage: function(additionnalData, targetElement){},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Perform user login
|
|
|
|
*/
|
|
|
|
loginSubmit: function(){},
|
2017-05-24 15:13:38 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Display login error message
|
|
|
|
*
|
|
|
|
* @return {Boolean} True for a success
|
|
|
|
*/
|
|
|
|
displayLoginError: function(){},
|
2017-05-22 16:06:17 +00:00
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Logout controller
|
|
|
|
*/
|
|
|
|
logout: {
|
|
|
|
/**
|
|
|
|
* Open logout page and perform logout
|
|
|
|
*/
|
|
|
|
openLogoutPage: function(additionnalData, targetElement){},
|
|
|
|
},
|
|
|
|
|
|
|
|
},
|
2017-05-24 15:13:38 +00:00
|
|
|
};
|