mirror of
				https://github.com/pierre42100/ComunicWeb
				synced 2025-11-04 04:04:20 +00:00 
			
		
		
		
	Use array rather than object to return results
This commit is contained in:
		@@ -78,21 +78,19 @@ ComunicWeb.components.userSelect = {
 | 
			
		||||
	 * Returns the results of a specified select element
 | 
			
		||||
	 * 
 | 
			
		||||
	 * @param {HTMLElement} inputSelect The target element
 | 
			
		||||
	 * @return {Object} An object with all the select IDs
 | 
			
		||||
	 * @return {Array} An array with all the select IDs
 | 
			
		||||
	 */
 | 
			
		||||
	getResults: function(inputSelect){
 | 
			
		||||
		
 | 
			
		||||
		//Prepare return
 | 
			
		||||
		var usersID = {};
 | 
			
		||||
		var usersID = [];
 | 
			
		||||
 | 
			
		||||
		for(i in inputSelect.children){
 | 
			
		||||
 | 
			
		||||
			//Check it is really a children
 | 
			
		||||
			if(inputSelect.children[i].value){
 | 
			
		||||
				//Get ID
 | 
			
		||||
				var userID = inputSelect.children[i].value;
 | 
			
		||||
 | 
			
		||||
				usersID['user-'+userID] = userID;
 | 
			
		||||
				//Add ID to the table
 | 
			
		||||
				usersID.push(inputSelect.children[i].value);
 | 
			
		||||
			}
 | 
			
		||||
		}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user