mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 04:04:20 +00:00 
			
		
		
		
	Added a visibility levels informations file
This commit is contained in:
		@@ -651,6 +651,13 @@ var ComunicWeb = {
 | 
				
			|||||||
		 */
 | 
							 */
 | 
				
			||||||
		posts: {
 | 
							posts: {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
								/**
 | 
				
			||||||
 | 
								 * Visibility levels
 | 
				
			||||||
 | 
								 */
 | 
				
			||||||
 | 
								visibilityLevels: {
 | 
				
			||||||
 | 
									//TODO : implement
 | 
				
			||||||
 | 
								},
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			/**
 | 
								/**
 | 
				
			||||||
			 * Posts communication interface
 | 
								 * Posts communication interface
 | 
				
			||||||
			 */
 | 
								 */
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -270,14 +270,17 @@ ComunicWeb.components.posts.form = {
 | 
				
			|||||||
		});
 | 
							});
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		//Private post
 | 
							//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
 | 
							//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;
 | 
							friendsInput.checked = true;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		//Worldwide post
 | 
							//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
 | 
							//Add send button
 | 
				
			||||||
		var sendButton = createElem2({
 | 
							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",
 | 
								"js/components/like/interface.js",
 | 
				
			||||||
 | 
					
 | 
				
			||||||
			//Posts component
 | 
								//Posts component
 | 
				
			||||||
 | 
								"js/components/posts/visibilityLevels.js",
 | 
				
			||||||
			"js/components/posts/interface.js",
 | 
								"js/components/posts/interface.js",
 | 
				
			||||||
			"js/components/posts/ui.js",
 | 
								"js/components/posts/ui.js",
 | 
				
			||||||
			"js/components/posts/form.js",
 | 
								"js/components/posts/form.js",
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user