Updated @Erdal51's favourites method so it works with fav-property buttons that are remotely rendered (i.e. aren't there when the document is initially loaded)
Tweaked the search results card (propertyresult.html.erb) to allow specific targetting of a search result - Updated toggle_favourites.js.erb so when a user toggles the favourite for the listing the counter on the search results card is updated (hence why I needed to make it specifically targetable)
Updated the search_controller method to allow passing of @listing_id and @num_of_favs to the toggle_favourites.js.erb file.
Added Search_helper method to get surrounding suburbs for expanding search for surrounding suburbs when you get to the end of the initial infinite scroll of the search results.
Search broadening works as a v1 feature now π. Note, it needs a suburb to function, no suburb, no search broadening.
broadening search now works if the initial suburb search returns no results, it will only run until 8 surrounding suburbs have been searched (this is because it runs forever otherwise, i.e. it runs each time you get to the end of the initial infinite scroll)
When no results for a suburb search, show a button to broaden the search using the above methods
Summary of Mobile changes
So, well, this is embarrasing,... We forgot the following on our site, so Semantic-UI had no way of knowing whether it needed to be responsive or not. (This is the f%!k up part from the title)
Removed some manual container sizing as it's no longer required (in the mobile sass files)
Added a for the nav-bar on the buy and sell pages on mobile with the #sticky-nav being off screen only on those pages
fixed the z-index for the dashboards settings sticky that was causing it to load over the sidebar
Also includes a z-index fix for the add-criteria-button as its menu sometimes drew upwards and was above the nav-menu/header so you couldn't click the elements that looked above the header, but actually had a lower z-index.
Now we need to go through and retest the mobile sites. Thankfully a lot of @jayden2's work is still good π π , however it pays to make sure.
As such, please recheck the checked items in issue #201 as they might need a slight tweak.
Summary of changes (re Search broadening)
Summary of Mobile changes
#sticky-nav
being off screen only on those pagesNow we need to go through and retest the mobile sites. Thankfully a lot of @jayden2's work is still good π π , however it pays to make sure.
As such, please recheck the checked items in issue #201 as they might need a slight tweak.
Cheers, Daniel