WebFM/webfm/static/js/favorites.js

19 lines
388 B
JavaScript
Raw Normal View History

2020-10-11 21:30:11 +00:00
const manageFavorites = (elm) => {
const classType = "btn-info";
const hasClass = elm.classList.contains(classType);
if (hasClass) {
elm.classList.remove(classType);
action = "delete";
} else {
elm.classList.add(classType);
action = "add";
}
2020-10-11 22:48:06 +00:00
manageFavoritesAjax(action);
2020-10-11 21:30:11 +00:00
}
const loadFave = (id) => {
loadFavoriteLink(id);
}