Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
krisdb2009 authored Jun 28, 2022
1 parent 348c8dc commit 9dc1941
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions static/js/plugins/phonebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ function autoFillTag(term) { //Returns rest of tag
firstLoad = false;
$.getJSON(apiURI + 'schema.cfg.json', function(schema) {
mem.schema = schema;
setOrderBy();
$('#loading').addClass('hidden');
$(blurToggle).removeClass('blur');
});
Expand Down Expand Up @@ -422,6 +423,15 @@ function searchTags(arg1, arg2) { //grab all tags and search the database and re
});
}
}
function setOrderBy() {
$.each(mem.schema, function(k, v) { //Apply the sort by direction from the schema.
if (v.orderby !== undefined) {
mem.orderby.attribute = k;
mem.orderby.direction = v.orderby;
return;
}
});
}
function toggleHamburger() {
$('#hamburger').toggleClass('hidden');
$('#main').toggleClass('hamburger');
Expand Down Expand Up @@ -619,13 +629,6 @@ $(document).on('bsloaded', function() {
}
});
autoFillTag(); //Initiate Application
$.each(mem.schema, function(k, v) { //Apply the sort by direction from the schema.
if (v.orderby !== undefined) {
mem.orderby.attribute = k;
mem.orderby.direction = v.orderby;
return;
}
});
});
//Keypress action
$(document).on('keydown', function (e) {
Expand Down

0 comments on commit 9dc1941

Please sign in to comment.