saurabhd / hk_realestate

GNU General Public License v2.0
1 stars 0 forks source link

Hide search box on load #2

Closed arpita-addweb closed 8 years ago

arpita-addweb commented 8 years ago

Site Area : Mobile , Priority : High

Description : The search box takes too much space on mobiles, therefor it should not load on fist page load, but be opened only by clicking on the search icon. Alternatively, I was thinking of skipping the map view on mobile completely and provide the list view (/buy) as frontage.

heliogabal commented 8 years ago

You can see what I tried already (but that stopped working at some point...) in the custom hk_leaflet module in hk_leaflet_script.js:

$( ".front #block-views-exp-karten-map-page, .front #search").dialog({
            height: "auto",
            minHeight: "120",
            width: "640",
            maxWidth: "640",
            resizable: "false",
            closeOnEscape: "true",
            modal: "false",
            hide: { effect: "explode", duration: "1000" },
            autoOpen: "false",
            position: { my: "center bottom", at: "center-180 bottom-80", collision: "fit flip", of: "#page" }
          });
      $( ".ismobiledevice.front .ui-dialog").hide();

      $( '#block-menu-menu-service-menu .menu li:nth-child(2)').click(function(e) {
          $( ".ui-dialog,#block-views-exp-karten-kaufen,#block-views-exp-karten-mieten, .not-front #search").toggle();
            e.preventDefault();
          });

JS is not my strong suit though...

heliogabal commented 8 years ago

I had to think about your solution providing another search button, as it is a good solution, but in the end, I think we should stick with the existing magnifying glass on the side (between favorite star and language selector). Otherwise, the button is over the marker popups, and it has to get translated as well. KISS. So can you please get rid of your search button and bind the search on the magnifying icon from the service menu?

Thanks a lot!