Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Automatically check radio button of new district #10

Merged
merged 1 commit into from
Oct 25, 2018
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ function addDistrict() {
}
itemCounter++;
//console.log(itemCounter);
var item = '<div id="item_'+itemCounter+'" class="item"><div class=checkmark><input type="radio" name="selected"><span class="tooltiptext">Activate district to add/remove polygons</span></div><div class=title><input type="text" class="dname" placeholder="Please enter district name" value="District '+itemCounter+'"></div><div class=delete onclick="removeDistrict(this)"><img src="img/Octagon_delete.svg" alt="Delete"><span class="tooltiptext">Click to delete district</span></div></div>';
var item = '<div id="item_'+itemCounter+'" class="item"><div class=checkmark><input type="radio" name="selected" checked><span class="tooltiptext">Activate district to add/remove polygons</span></div><div class=title><input type="text" class="dname" placeholder="Please enter district name" value="District '+itemCounter+'"></div><div class=delete onclick="removeDistrict(this)"><img src="img/Octagon_delete.svg" alt="Delete"><span class="tooltiptext">Click to delete district</span></div></div>';
var content = document.getElementById('add-district');
content.insertAdjacentHTML('beforebegin', item);

Expand Down Expand Up @@ -285,4 +285,4 @@ function createOutput() {
}
}
document.getElementById("textareabox").innerHTML = mapshape;
}
}