mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-11-22 20:19:21 +00:00
First implementation of emoji system
This commit is contained in:
parent
e59efad29b
commit
2601da21ad
567
assets/3rdparty/twemoji/2/twemoji.js
vendored
Executable file
567
assets/3rdparty/twemoji/2/twemoji.js
vendored
Executable file
File diff suppressed because one or more lines are too long
2
assets/3rdparty/twemoji/2/twemoji.min.js
vendored
Executable file
2
assets/3rdparty/twemoji/2/twemoji.min.js
vendored
Executable file
File diff suppressed because one or more lines are too long
12
assets/css/components/emoji/parser.css
Normal file
12
assets/css/components/emoji/parser.css
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
/**
|
||||||
|
* Emojies parser
|
||||||
|
*
|
||||||
|
* @author Pierre HUBERT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emoji images global style
|
||||||
|
*/
|
||||||
|
.emoji {
|
||||||
|
height: 2em;
|
||||||
|
}
|
@ -580,7 +580,21 @@ var ComunicWeb = {
|
|||||||
*/
|
*/
|
||||||
userSelect:{
|
userSelect:{
|
||||||
//TODO : implement
|
//TODO : implement
|
||||||
}
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emoji functions
|
||||||
|
*/
|
||||||
|
emoji:{
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Emoji parser system
|
||||||
|
*/
|
||||||
|
parser: {
|
||||||
|
//TODO : implement
|
||||||
|
},
|
||||||
|
|
||||||
|
},
|
||||||
},
|
},
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
51
assets/js/components/emoji/parser.js
Normal file
51
assets/js/components/emoji/parser.js
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
/**
|
||||||
|
* Emoji parser system
|
||||||
|
*
|
||||||
|
* Based on the work of Twitter Emoji
|
||||||
|
* https://github.com/twitter/twemoji
|
||||||
|
*
|
||||||
|
* @author Pierre HUBERT
|
||||||
|
*/
|
||||||
|
|
||||||
|
ComunicWeb.components.emoji.parser = {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Define twemoji base
|
||||||
|
*/
|
||||||
|
__twemojiBase: ComunicWeb.__config.assetsURL + "3rdparty/twemoji/2/",
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Parse emojies
|
||||||
|
*
|
||||||
|
* @param {Object} infos Informations about the area to parse
|
||||||
|
* @info {HTMLElement} element The element to parser
|
||||||
|
* @return {Boolean} True for a success
|
||||||
|
*/
|
||||||
|
parse: function(infos){
|
||||||
|
|
||||||
|
|
||||||
|
//Perform Twitter parsing
|
||||||
|
this.twitterEmojiesParsing(infos.element);
|
||||||
|
|
||||||
|
//Success
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Perform Twitter emojies parsing
|
||||||
|
*
|
||||||
|
* @param {Object} target The target of the parsing
|
||||||
|
* @return {Boolean} True for a success
|
||||||
|
*/
|
||||||
|
twitterEmojiesParsing: function(target){
|
||||||
|
|
||||||
|
//Call Twitter
|
||||||
|
twemoji.parse(target, {
|
||||||
|
base: this.__twemojiBase
|
||||||
|
});
|
||||||
|
|
||||||
|
//Success
|
||||||
|
return true;
|
||||||
|
},
|
||||||
|
|
||||||
|
}
|
@ -28,6 +28,18 @@ ComunicWeb.pages.home.home = {
|
|||||||
loginButton.innerHTML="Logout";
|
loginButton.innerHTML="Logout";
|
||||||
targetElement.appendChild(loginButton);
|
targetElement.appendChild(loginButton);
|
||||||
|
|
||||||
|
//Dev feature emojies
|
||||||
|
var emojiesArea = createElem2({
|
||||||
|
appendTo: targetElement,
|
||||||
|
type: "p",
|
||||||
|
innerHTML: "Emoji test : :) 🇬🇫 🎅🏻"
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
//Parse emojies
|
||||||
|
ComunicWeb.components.emoji.parser.parse({
|
||||||
|
element: emojiesArea,
|
||||||
|
});
|
||||||
}
|
}
|
||||||
else{
|
else{
|
||||||
//Display landing page
|
//Display landing page
|
||||||
|
@ -10,146 +10,157 @@ $config['pathAssets'] = $config['siteURL']."assets/";
|
|||||||
|
|
||||||
//CSS files to include
|
//CSS files to include
|
||||||
$config['CSSfiles'] = array(
|
$config['CSSfiles'] = array(
|
||||||
//CSS files - adminLTE distribution / bootstrap / plugins
|
//CSS files - adminLTE distribution / bootstrap / plugins
|
||||||
"%PATH_ASSETS%3rdparty/adminLTE/bootstrap/css/bootstrap.min.css",
|
"%PATH_ASSETS%3rdparty/adminLTE/bootstrap/css/bootstrap.min.css",
|
||||||
"%PATH_ASSETS%3rdparty/adminLTE/plugins/font-awesome/css/font-awesome.min.css",
|
"%PATH_ASSETS%3rdparty/adminLTE/plugins/font-awesome/css/font-awesome.min.css",
|
||||||
"%PATH_ASSETS%3rdparty/adminLTE/plugins/ionicons/css/ionicons.min.css",
|
"%PATH_ASSETS%3rdparty/adminLTE/plugins/ionicons/css/ionicons.min.css",
|
||||||
"%PATH_ASSETS%3rdparty/adminLTE/plugins/iCheck/square/blue.css",
|
"%PATH_ASSETS%3rdparty/adminLTE/plugins/iCheck/square/blue.css",
|
||||||
"%PATH_ASSETS%3rdparty/adminLTE/plugins/iCheck/flat/blue.css",
|
"%PATH_ASSETS%3rdparty/adminLTE/plugins/iCheck/flat/blue.css",
|
||||||
"%PATH_ASSETS%3rdparty/adminLTE/plugins/select2/select2.min.css",
|
"%PATH_ASSETS%3rdparty/adminLTE/plugins/select2/select2.min.css",
|
||||||
"%PATH_ASSETS%3rdparty/adminLTE/dist/css/AdminLTE.min.css",
|
"%PATH_ASSETS%3rdparty/adminLTE/dist/css/AdminLTE.min.css",
|
||||||
"%PATH_ASSETS%3rdparty/adminLTE/dist/css/skins/_all-skins.min.css",
|
"%PATH_ASSETS%3rdparty/adminLTE/dist/css/skins/_all-skins.min.css",
|
||||||
|
|
||||||
//App stylesheets - common stylesheets
|
//App stylesheets - common stylesheets
|
||||||
"%PATH_ASSETS%css/common/global.css",
|
"%PATH_ASSETS%css/common/global.css",
|
||||||
"%PATH_ASSETS%css/common/page/waitSplashScreen.css",
|
"%PATH_ASSETS%css/common/page/waitSplashScreen.css",
|
||||||
"%PATH_ASSETS%css/common/network/networkError.css",
|
"%PATH_ASSETS%css/common/network/networkError.css",
|
||||||
|
|
||||||
//Components stylesheets
|
//Components stylesheets
|
||||||
//Menubar stylesheet
|
//Menubar stylesheet
|
||||||
"%PATH_ASSETS%css/components/menuBar.css",
|
"%PATH_ASSETS%css/components/menuBar.css",
|
||||||
|
|
||||||
//Searchform stylesheet
|
//Searchform stylesheet
|
||||||
"%PATH_ASSETS%css/components/searchForm.css",
|
"%PATH_ASSETS%css/components/searchForm.css",
|
||||||
|
|
||||||
//Friendbar stylesheet
|
//Friendbar stylesheet
|
||||||
"%PATH_ASSETS%css/components/friends/friendsBar.css",
|
"%PATH_ASSETS%css/components/friends/friendsBar.css",
|
||||||
|
|
||||||
//Conversations stylesheet
|
//Conversations stylesheet
|
||||||
"%PATH_ASSETS%css/components/conversations/manager.css",
|
"%PATH_ASSETS%css/components/conversations/manager.css",
|
||||||
"%PATH_ASSETS%css/components/conversations/windows.css",
|
"%PATH_ASSETS%css/components/conversations/windows.css",
|
||||||
"%PATH_ASSETS%css/components/conversations/list.css",
|
"%PATH_ASSETS%css/components/conversations/list.css",
|
||||||
|
|
||||||
//User selector stylesheet
|
//User selector stylesheet
|
||||||
"%PATH_ASSETS%css/components/userSelect/userSelect.css",
|
"%PATH_ASSETS%css/components/userSelect/userSelect.css",
|
||||||
|
|
||||||
|
//Emojies
|
||||||
|
"%PATH_ASSETS%css/components/emoji/parser.css",
|
||||||
);
|
);
|
||||||
|
|
||||||
//JS files to include (at the end of the page)
|
//JS files to include (at the end of the page)
|
||||||
$config['JSfiles'] = array(
|
$config['JSfiles'] = array(
|
||||||
//Framework inclusions
|
//Framework inclusions
|
||||||
//Jquery
|
//Jquery
|
||||||
"%PATH_ASSETS%3rdparty/adminLTE/plugins/jQuery/jquery-2.2.3.min.js",
|
"%PATH_ASSETS%3rdparty/adminLTE/plugins/jQuery/jquery-2.2.3.min.js",
|
||||||
|
|
||||||
//Bootstrap
|
//Bootstrap
|
||||||
"%PATH_ASSETS%3rdparty/adminLTE/bootstrap/js/bootstrap.min.js",
|
"%PATH_ASSETS%3rdparty/adminLTE/bootstrap/js/bootstrap.min.js",
|
||||||
|
|
||||||
//JQuery UI
|
//JQuery UI
|
||||||
"%PATH_ASSETS%3rdparty/adminLTE/plugins/jquery-ui/jquery-ui.min.js",
|
"%PATH_ASSETS%3rdparty/adminLTE/plugins/jquery-ui/jquery-ui.min.js",
|
||||||
|
|
||||||
//iCheck
|
//iCheck
|
||||||
"%PATH_ASSETS%3rdparty/adminLTE/plugins/iCheck/icheck.min.js",
|
"%PATH_ASSETS%3rdparty/adminLTE/plugins/iCheck/icheck.min.js",
|
||||||
|
|
||||||
//Slimscroll
|
//Slimscroll
|
||||||
"%PATH_ASSETS%3rdparty/adminLTE/plugins/slimScroll/jquery.slimscroll.min.js",
|
"%PATH_ASSETS%3rdparty/adminLTE/plugins/slimScroll/jquery.slimscroll.min.js",
|
||||||
|
|
||||||
//Select2
|
//Select2
|
||||||
"%PATH_ASSETS%3rdparty/adminLTE/plugins/select2/select2.min.js",
|
"%PATH_ASSETS%3rdparty/adminLTE/plugins/select2/select2.min.js",
|
||||||
|
|
||||||
//adminLTE script
|
//adminLTE script
|
||||||
"%PATH_ASSETS%3rdparty/adminLTE/dist/js/app.min.js",
|
"%PATH_ASSETS%3rdparty/adminLTE/dist/js/app.min.js",
|
||||||
|
|
||||||
//Bootstrap notify
|
//Bootstrap notify
|
||||||
"%PATH_ASSETS%3rdparty/bootstrap-notify-3.1.3.min.js",
|
"%PATH_ASSETS%3rdparty/bootstrap-notify-3.1.3.min.js",
|
||||||
|
|
||||||
//Utilities
|
//Twitter emojies
|
||||||
"%PATH_ASSETS%js/common/utils.js",
|
"%PATH_ASSETS%3rdparty/twemoji/2/twemoji.min.js",
|
||||||
|
|
||||||
//Functions schema
|
//Utilities
|
||||||
"%PATH_ASSETS%js/common/functionsSchema.js",
|
"%PATH_ASSETS%js/common/utils.js",
|
||||||
|
|
||||||
//Pages list
|
//Functions schema
|
||||||
"%PATH_ASSETS%js/pagesList.js",
|
"%PATH_ASSETS%js/common/functionsSchema.js",
|
||||||
|
|
||||||
//App scripts -- common scripts
|
//Pages list
|
||||||
"%PATH_ASSETS%js/common/cacheManager.js",
|
"%PATH_ASSETS%js/pagesList.js",
|
||||||
"%PATH_ASSETS%js/common/network.js",
|
|
||||||
"%PATH_ASSETS%js/common/api.js",
|
|
||||||
"%PATH_ASSETS%js/common/errors.js",
|
|
||||||
"%PATH_ASSETS%js/common/messages.js",
|
|
||||||
"%PATH_ASSETS%js/common/langs.js",
|
|
||||||
"%PATH_ASSETS%js/common/url.js",
|
|
||||||
"%PATH_ASSETS%js/common/jsFiles.js",
|
|
||||||
"%PATH_ASSETS%js/common/debug.js",
|
|
||||||
"%PATH_ASSETS%js/common/page.js",
|
|
||||||
"%PATH_ASSETS%js/common/notifications.js",
|
|
||||||
"%PATH_ASSETS%js/common/formChecker.js",
|
|
||||||
"%PATH_ASSETS%js/common/date.js",
|
|
||||||
"%PATH_ASSETS%js/common/system.js",
|
|
||||||
|
|
||||||
//Default langage
|
|
||||||
"%PATH_ASSETS%js/langs/en.inc.js",
|
|
||||||
|
|
||||||
//Components
|
//App scripts -- common scripts
|
||||||
//Mail caching
|
"%PATH_ASSETS%js/common/cacheManager.js",
|
||||||
"%PATH_ASSETS%js/components/mailCaching.js",
|
"%PATH_ASSETS%js/common/network.js",
|
||||||
|
"%PATH_ASSETS%js/common/api.js",
|
||||||
|
"%PATH_ASSETS%js/common/errors.js",
|
||||||
|
"%PATH_ASSETS%js/common/messages.js",
|
||||||
|
"%PATH_ASSETS%js/common/langs.js",
|
||||||
|
"%PATH_ASSETS%js/common/url.js",
|
||||||
|
"%PATH_ASSETS%js/common/jsFiles.js",
|
||||||
|
"%PATH_ASSETS%js/common/debug.js",
|
||||||
|
"%PATH_ASSETS%js/common/page.js",
|
||||||
|
"%PATH_ASSETS%js/common/notifications.js",
|
||||||
|
"%PATH_ASSETS%js/common/formChecker.js",
|
||||||
|
"%PATH_ASSETS%js/common/date.js",
|
||||||
|
"%PATH_ASSETS%js/common/system.js",
|
||||||
|
|
||||||
//Search form
|
//Default langage
|
||||||
"%PATH_ASSETS%js/components/searchForm/searchForm.js",
|
"%PATH_ASSETS%js/langs/en.inc.js",
|
||||||
|
|
||||||
//Main menubar
|
//Components
|
||||||
"%PATH_ASSETS%js/components/menuBar/common.js",
|
//Mail caching
|
||||||
"%PATH_ASSETS%js/components/menuBar/notAuthenticated.js",
|
"%PATH_ASSETS%js/components/mailCaching.js",
|
||||||
"%PATH_ASSETS%js/components/menuBar/authenticated.js",
|
|
||||||
|
|
||||||
//Friends components
|
//Search form
|
||||||
"%PATH_ASSETS%js/components/friends/friendsList.js",
|
"%PATH_ASSETS%js/components/searchForm/searchForm.js",
|
||||||
"%PATH_ASSETS%js/components/friends/friendsBar.js",
|
|
||||||
|
|
||||||
//Private conversations
|
//Main menubar
|
||||||
"%PATH_ASSETS%js/components/conversations/manager.js",
|
"%PATH_ASSETS%js/components/menuBar/common.js",
|
||||||
"%PATH_ASSETS%js/components/conversations/list.js",
|
"%PATH_ASSETS%js/components/menuBar/notAuthenticated.js",
|
||||||
"%PATH_ASSETS%js/components/conversations/windows.js",
|
"%PATH_ASSETS%js/components/menuBar/authenticated.js",
|
||||||
"%PATH_ASSETS%js/components/conversations/chatWindows.js",
|
|
||||||
"%PATH_ASSETS%js/components/conversations/interface.js",
|
|
||||||
"%PATH_ASSETS%js/components/conversations/service.js",
|
|
||||||
"%PATH_ASSETS%js/components/conversations/cachingOpened.js",
|
|
||||||
"%PATH_ASSETS%js/components/conversations/utils.js",
|
|
||||||
|
|
||||||
//User selector
|
//Friends components
|
||||||
"%PATH_ASSETS%js/components/userSelect/userSelect.js",
|
"%PATH_ASSETS%js/components/friends/friendsList.js",
|
||||||
|
"%PATH_ASSETS%js/components/friends/friendsBar.js",
|
||||||
|
|
||||||
//User scripts
|
//Private conversations
|
||||||
"%PATH_ASSETS%js/user/loginTokens.js",
|
"%PATH_ASSETS%js/components/conversations/manager.js",
|
||||||
"%PATH_ASSETS%js/user/userLogin.js",
|
"%PATH_ASSETS%js/components/conversations/list.js",
|
||||||
"%PATH_ASSETS%js/user/userInfos.js",
|
"%PATH_ASSETS%js/components/conversations/windows.js",
|
||||||
|
"%PATH_ASSETS%js/components/conversations/chatWindows.js",
|
||||||
|
"%PATH_ASSETS%js/components/conversations/interface.js",
|
||||||
|
"%PATH_ASSETS%js/components/conversations/service.js",
|
||||||
|
"%PATH_ASSETS%js/components/conversations/cachingOpened.js",
|
||||||
|
"%PATH_ASSETS%js/components/conversations/utils.js",
|
||||||
|
|
||||||
//Pages scripts
|
//User selector
|
||||||
//Home page
|
"%PATH_ASSETS%js/components/userSelect/userSelect.js",
|
||||||
"%PATH_ASSETS%js/pages/home/home.js",
|
|
||||||
"%PATH_ASSETS%js/pages/home/landingPage.js",
|
|
||||||
|
|
||||||
//Login page
|
//Emojies
|
||||||
"%PATH_ASSETS%js/pages/login.js",
|
"%PATH_ASSETS%js/components/emoji/parser.js",
|
||||||
|
|
||||||
//Logout page
|
//User scripts
|
||||||
"%PATH_ASSETS%js/pages/logout.js",
|
"%PATH_ASSETS%js/user/loginTokens.js",
|
||||||
|
"%PATH_ASSETS%js/user/userLogin.js",
|
||||||
|
"%PATH_ASSETS%js/user/userInfos.js",
|
||||||
|
|
||||||
//Create shortcuts for common functions
|
|
||||||
"%PATH_ASSETS%js/common/shorcuts.js",
|
|
||||||
"%PATH_ASSETS%js/common/helpers.js",
|
|
||||||
|
|
||||||
//Init script
|
//Pages scripts
|
||||||
"%PATH_ASSETS%js/init.js",
|
//Home page
|
||||||
|
"%PATH_ASSETS%js/pages/home/home.js",
|
||||||
|
"%PATH_ASSETS%js/pages/home/landingPage.js",
|
||||||
|
|
||||||
|
//Login page
|
||||||
|
"%PATH_ASSETS%js/pages/login.js",
|
||||||
|
|
||||||
|
//Logout page
|
||||||
|
"%PATH_ASSETS%js/pages/logout.js",
|
||||||
|
|
||||||
|
//Create shortcuts for common functions
|
||||||
|
"%PATH_ASSETS%js/common/shorcuts.js",
|
||||||
|
"%PATH_ASSETS%js/common/helpers.js",
|
||||||
|
|
||||||
|
//Init script
|
||||||
|
"%PATH_ASSETS%js/init.js",
|
||||||
);
|
);
|
||||||
|
|
||||||
//JS language path
|
//JS language path
|
||||||
|
Loading…
Reference in New Issue
Block a user