]> git.r.bdr.sh - rbdr/crowdantine/commitdiff
Add a unique id for each link
authorBen Beltran <redacted>
Mon, 6 Apr 2020 22:01:55 +0000 (00:01 +0200)
committerBen Beltran <redacted>
Mon, 6 Apr 2020 22:01:55 +0000 (00:01 +0200)
index.html

index 077a8e0649dee425fa042d0a04379895c593c0db..bc3f8b6e8f6c185d2a2ed6ebb8f35e06d9926244 100644 (file)
@@ -32,7 +32,7 @@
       var generateProposalHTML = function(proposal) {
 
         var listItem = document.createElement('li');
       var generateProposalHTML = function(proposal) {
 
         var listItem = document.createElement('li');
-        listItem.innerHTML = proposal.title + ' (' + proposal.total_occurrences + ' votes) <a href="#" onclick="createProposal(\'' + proposal.title.replace(/'/g, '\\\'')+ '\')">I agree.</a> </li>'
+        listItem.innerHTML = proposal.title + ' (' + proposal.total_occurrences + ' votes) <a href="#add-' + proposal.id + '" onclick="createProposal(\'' + proposal.title.replace(/'/g, '\\\'')+ '\')">I agree.</a> </li>'
         return listItem;
       };
 
         return listItem;
       };