Migrate assets to use Webpacker
This commit is contained in:
20
app/javascript/src/javascripts/saved_searches.js
Normal file
20
app/javascript/src/javascripts/saved_searches.js
Normal file
@@ -0,0 +1,20 @@
|
||||
import Utility from './utility'
|
||||
|
||||
let SavedSearch = {};
|
||||
|
||||
SavedSearch.initialize_all = function() {
|
||||
if ($("#c-saved-searches").length) {
|
||||
Utility.sorttable($("#c-saved-searches table"));
|
||||
}
|
||||
}
|
||||
|
||||
SavedSearch.labels = function(term) {
|
||||
return $.getJSON("/saved_searches/labels", {
|
||||
"search[label]": term + "*",
|
||||
"limit": 10
|
||||
});
|
||||
}
|
||||
|
||||
$(SavedSearch.initialize_all);
|
||||
|
||||
export default SavedSearch
|
||||
Reference in New Issue
Block a user