mirror of
https://github.com/pierre42100/ComunicWeb
synced 2024-12-24 09:58:51 +00:00
Added a visibility levels informations file
This commit is contained in:
parent
70232ade84
commit
28499dda93
@ -651,6 +651,13 @@ var ComunicWeb = {
|
||||
*/
|
||||
posts: {
|
||||
|
||||
/**
|
||||
* Visibility levels
|
||||
*/
|
||||
visibilityLevels: {
|
||||
//TODO : implement
|
||||
},
|
||||
|
||||
/**
|
||||
* Posts communication interface
|
||||
*/
|
||||
|
@ -270,14 +270,17 @@ ComunicWeb.components.posts.form = {
|
||||
});
|
||||
|
||||
//Private post
|
||||
var privateInput = this._add_visiblity_choice(visibility_choices_contener, "private", "Private", "fa-user");
|
||||
var privateLevel = ComunicWeb.components.posts.visibilityLevels.private;
|
||||
var privateInput = this._add_visiblity_choice(visibility_choices_contener, "private", privateLevel.name, privateLevel.icon);
|
||||
|
||||
//Friends-visible post
|
||||
var friendsInput = this._add_visiblity_choice(visibility_choices_contener, "friends", "Friends", "fa-users");
|
||||
var friendsLevel = ComunicWeb.components.posts.visibilityLevels.friends;
|
||||
var friendsInput = this._add_visiblity_choice(visibility_choices_contener, "friends", friendsLevel.name, friendsLevel.icon);
|
||||
friendsInput.checked = true;
|
||||
|
||||
//Worldwide post
|
||||
this._add_visiblity_choice(visibility_choices_contener, "public", "Public", "fa-globe");
|
||||
var publicLevel = ComunicWeb.components.posts.visibilityLevels.public;
|
||||
this._add_visiblity_choice(visibility_choices_contener, "public", publicLevel.name, publicLevel.icon);
|
||||
|
||||
//Add send button
|
||||
var sendButton = createElem2({
|
||||
|
42
assets/js/components/posts/visibilityLevels.js
Normal file
42
assets/js/components/posts/visibilityLevels.js
Normal file
@ -0,0 +1,42 @@
|
||||
/**
|
||||
* Posts visibility levels
|
||||
*
|
||||
* @author Pierre HUBERT
|
||||
*/
|
||||
|
||||
ComunicWeb.components.posts.visibilityLevels = {
|
||||
|
||||
/**
|
||||
* Private
|
||||
*/
|
||||
private: {
|
||||
//Icon
|
||||
icon: "fa-user",
|
||||
|
||||
//Name
|
||||
name: "Private"
|
||||
},
|
||||
|
||||
/**
|
||||
* Friends
|
||||
*/
|
||||
friends: {
|
||||
//Icon
|
||||
icon: "fa-users",
|
||||
|
||||
//Name
|
||||
name: "Friends"
|
||||
},
|
||||
|
||||
/**
|
||||
* Public
|
||||
*/
|
||||
public: {
|
||||
//Icon
|
||||
icon: "fa-globe",
|
||||
|
||||
//Name
|
||||
name: "Public"
|
||||
}
|
||||
|
||||
}
|
@ -219,6 +219,7 @@ class Dev {
|
||||
"js/components/like/interface.js",
|
||||
|
||||
//Posts component
|
||||
"js/components/posts/visibilityLevels.js",
|
||||
"js/components/posts/interface.js",
|
||||
"js/components/posts/ui.js",
|
||||
"js/components/posts/form.js",
|
||||
|
Loading…
Reference in New Issue
Block a user