(13 intermediate revisions by the same user not shown) | |||
Line 147: | Line 147: | ||
$(this).parent().find(".tag-type").toggle(); | $(this).parent().find(".tag-type").toggle(); | ||
}); | }); | ||
− | + | outreach_arr = alasql('select * from outreach') | |
− | + | ||
var options = { | var options = { | ||
shouldSort: true, | shouldSort: true, | ||
Line 156: | Line 155: | ||
maxPatternLength: 32, | maxPatternLength: 32, | ||
minMatchCharLength: 1, | minMatchCharLength: 1, | ||
− | keys: | + | keys: Object.keys(outreach_arr[0]) |
− | + | ||
− | + | ||
− | + | ||
}; | }; | ||
− | fuse = new Fuse( | + | fuse = new Fuse(outreach_arr, options); // "list" is the item array |
− | + | ||
− | + | ||
} | } | ||
); | ); | ||
Line 200: | Line 194: | ||
} | } | ||
+ | function fulltext_search(str){ | ||
+ | show_results(search_result = fuse.search(str)) | ||
+ | } | ||
function show_details(outreach_id) { | function show_details(outreach_id) { | ||
datastring = encodeURIComponent( | datastring = encodeURIComponent( | ||
Line 243: | Line 240: | ||
<br></br> | <br></br> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
Line 258: | Line 245: | ||
<div class="container"> | <div class="container"> | ||
+ | <div class="row"> | ||
+ | <div class="col-lg-11" style='padding: top: 50px;font-size: 16px;'> | ||
+ | <form onsubmit="show_details(parseInt(document.getElementById('input-id').value, 10).toString()); return false"> | ||
+ | Quick ID Jump:<br /> <input type="number" name="id" id="input-id"> | ||
+ | <input type="submit" id="getid" value="Go"> | ||
+ | </form> | ||
+ | <form onsubmit="fulltext_search(document.getElementById('input-fuzzy').value); return false"> | ||
+ | Fuzzy Search:<br /> <input type="text" name="fuzzy" id="input-fuzzy"> | ||
+ | <input type="submit" id="get-fuzzy" value="Go"> | ||
+ | </div> | ||
+ | </div> | ||
+ | |||
+ | <center> | ||
+ | OR | ||
+ | </center> | ||
+ | |||
+ | <h2>Search By Tags:</h2> | ||
<div id='checkbox-area' style='padding-top: 30px;'> | <div id='checkbox-area' style='padding-top: 30px;'> | ||
Latest revision as of 00:40, 2 November 2017
Search By Tags: