mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-11 18:01:10 -06:00
fix => add favorites button
This commit is contained in:
parent
859aa31909
commit
6ad1a5b3fd
@ -7,10 +7,10 @@ fav.checkFav = (id, type, divId, iconId) => {
|
||||
success: function (response) {
|
||||
if(response.length == 0) {
|
||||
$(divId).attr("href", "/favs/add_fav/" + id+ "/"+type);
|
||||
$(iconId).attr("class", "fa fa-heart-o");
|
||||
$(iconId).attr("class", "far fa-heart");
|
||||
} else {
|
||||
$(divId).attr("href", "/favs/delete_fav/" + id + "/" + "adv");
|
||||
$(iconId).attr("class", "fa fa-heart");
|
||||
$(iconId).attr("class", "fas fa-heart");
|
||||
}
|
||||
},
|
||||
error:function (err) {
|
||||
|
||||
@ -84,7 +84,7 @@
|
||||
<div class="col-md-5">
|
||||
<div class="slider-text">
|
||||
{% if entries('advs').isEnabled('favs') %}
|
||||
<a class="favorites" href="#"><i id="heart-icon-adv" class="fa fa-heart-o"></i></a>
|
||||
<a class="favorites" href="#"><i id="heart-icon-adv" class="far fa-heart"></i></a>
|
||||
{% endif %}
|
||||
<h3 class="title">{{ adv.title }}</h3>
|
||||
<h2 class="ad-price">
|
||||
@ -478,7 +478,9 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% if entries('advs').isEnabled('favs') %}
|
||||
{{ asset_add("scripts.js", "visiosoft.module.advs::js/favs.js") }}
|
||||
{% endif %}
|
||||
{{ asset_add("scripts.js", "visiosoft.module.advs::js/list-item.js") }}
|
||||
{{ asset_add("scripts.js", "visiosoft.module.advs::js/quantity.js") }}
|
||||
{{ asset_add("scripts.js", "visiosoft.module.advs::js/phoneCounter.js") }}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user