-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Event / Group Sorting & Filtering #100
Comments
Using similar logic to the current search capabilities in the website, which use the Search Listeners: compiled-mcr-events/_static/scripts/main.js Lines 24 to 31 in 77e8a95
Search Functions: compiled-mcr-events/_static/scripts/main.js Lines 43 to 54 in 77e8a95
|
My suggest would be, with an example of a HTML: <input type="button" class="category-button on" value="All" onclick="setGroupCategory('groupsItems', '')">
<input type="button" class="category-button" value="Tech" onclick="setGroupCategory('groupsItems', 'tech')">
<input type="button" class="category-button" value="Business" onclick="setGroupCategory('groupsItems', 'business')"> main.js: function setGroupCategory(elementId, type) {
document.getElementById(elementId).innerHTML = groups.filter(group => type == "" || group.category == type).map(dataToHTML.groupHTML).join("\n");
} |
The above function getDescendantProp(obj, desc) {
var arr = desc.split(".");
while(arr.length && (obj = obj[arr.shift()]));
return obj;
} |
This task should only be complete after #98 and currently needs designing.
The text was updated successfully, but these errors were encountered: