2017-01-08 14:54:25 +00:00
|
|
|
/**
|
|
|
|
* Comunic WebApp schema
|
|
|
|
*
|
|
|
|
* @author Pierre HUBERT
|
|
|
|
*/
|
|
|
|
var ComunicWeb = {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Configuration inclusion
|
|
|
|
*/
|
|
|
|
__config: ComunicConfig,
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Common functions
|
|
|
|
*/
|
|
|
|
common:{
|
|
|
|
/**
|
|
|
|
* Network functions
|
|
|
|
*/
|
|
|
|
network: {
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Make an API request
|
|
|
|
*/
|
|
|
|
makeAPIrequest: function(apiURI, params, nextAction){},
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* 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){},
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Error functions
|
|
|
|
*/
|
|
|
|
error:{
|
2017-01-08 15:17:22 +00:00
|
|
|
/**
|
|
|
|
* Submit an error
|
|
|
|
*/
|
|
|
|
submitError: function(errorLevel, errorMessage, errorCode, errorData){},
|
2017-01-08 14:54:25 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Handle and show a fatal error
|
|
|
|
*/
|
2017-01-08 15:17:22 +00:00
|
|
|
fatalError: function(errorMessage, errorCode, errorData){},
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* URL functions
|
|
|
|
*/
|
|
|
|
url:{
|
|
|
|
|
2017-01-08 14:54:25 +00:00
|
|
|
},
|
|
|
|
|
2017-01-21 18:30:27 +00:00
|
|
|
/**
|
|
|
|
* Page functions
|
|
|
|
*/
|
|
|
|
page: {
|
|
|
|
|
|
|
|
},
|
2017-01-08 15:17:22 +00:00
|
|
|
|
2017-01-08 14:54:25 +00:00
|
|
|
/**
|
|
|
|
* Operations on JS files
|
|
|
|
*/
|
|
|
|
jsFiles:{
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Include a Javascript file
|
|
|
|
*/
|
|
|
|
includeFile: function(fileURL){},
|
|
|
|
},
|
|
|
|
},
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Debug functions
|
|
|
|
*/
|
|
|
|
debug:{
|
|
|
|
/**
|
|
|
|
* Display message on browser console
|
|
|
|
*/
|
|
|
|
logMessage: function(message){},
|
|
|
|
}
|
|
|
|
}
|