first commit

This commit is contained in:
ryanwong
2022-06-30 05:46:02 -04:00
commit a96eaec33b
859 changed files with 199842 additions and 0 deletions
+92
View File
@@ -0,0 +1,92 @@
document.addEventListener('DOMContentLoaded', function()
{
var ajaxURLPath = document.location.origin + '/';
$(".get_schools_select2").select2({
minimumInputLength: 1,
ajax: {
url: ajaxURLPath + 'v1/api/schools',
dataType: 'json',
type: "POST",
quietMillis: 50,
minimumResultsForSearch: 50,
data: function (term)
{
return term;
},
results: function (data)
{
return { results: data };
}
}
});
$(".get_professors_select2").select2({
minimumInputLength: 1,
ajax: {
url: ajaxURLPath + 'v1/api/professors',
dataType: 'json',
type: "GET",
quietMillis: 50,
minimumResultsForSearch: 50,
data: function (term)
{
return term;
},
results: function (data)
{
return { results: data };
}
}
});
$(".get_courses_select2").select2({
minimumInputLength: 1,
ajax: {
url: ajaxURLPath + 'v1/api/courses',
dataType: 'json',
type: "GET",
quietMillis: 50,
minimumResultsForSearch: 50,
data: function (term)
{
return term;
},
results: function (data)
{
return { results: data };
}
}
});
$(".get_textbooks_select2").select2({
minimumInputLength: 1,
ajax: {
url: ajaxURLPath + 'v1/api/textbooks',
dataType: 'json',
type: "GET",
quietMillis: 50,
minimumResultsForSearch: 50,
data: function (term)
{
return term;
},
results: function (data)
{
return { results: data };
}
}
});
}, false)