Advertisement:

Author Topic: (SOLVED)Change Show filters/Hide filters and user menu in mobile view  (Read 499 times)

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1492
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Hi. I've been thinking about this for a long time now, but now I got the solution.
When used on mobile, the filters in search page are hidden. If you click show filters they apear but the text remains show filters.

In order to change show filters to hide filters you must change in
oc-content/themes/bender/search.php

Code: [Select]
            <div class="actions">
              <a href="#" data-bclass-toggle="display-filters" class="resp-toogle show-filters-btn"><?php _e('Show filters','bender'); ?></a>

into this

Code: [Select]
            <div class="actions">
              <a href="#" data-bclass-toggle="display-filters" class="resp-toogle show-filters-btn"
              id="filters_btn" onclick='var str = document.getElementById("filters_btn").innerHTML;
    if(str.indexOf("Show")>=0)
    var txt = str.replace("Show","Hide");
    else txt = str.replace("Hide","Show");
    document.getElementById("filters_btn").innerHTML = txt;' >Show filters</a>

NOTE. After an Update this modification must be redone.
« Last Edit: July 17, 2017, 12:02:42 am by marius-ciclistu »

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1492
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: Change Show filters/Hide filters in mobile view
« Reply #1 on: July 16, 2017, 03:10:33 pm »
A similar solution can be applied to the 'Display' menu button in user-sidebar.php

Sophia_OS

  • Full Member
  • ***
  • Posts: 123
Re: Change Show filters/Hide filters in mobile view
« Reply #2 on: September 13, 2018, 01:55:29 am »
A similar solution can be applied to the 'Display' menu button in user-sidebar.php

Thank you Marius for your solution!
question for you:
1. what is "Display menu" exactly? i couldn't find it in user-sidebar.php. please explain about this more.
Thanks
« Last Edit: Today at 01:49:14 am by Sophia_OS »

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1492
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: (SOLVED)Change Show filters/Hide filters and user menu in mobile view
« Reply #3 on: September 14, 2018, 12:36:21 am »
1 the menu with alerts, items, delete account etc fom user dashboard.
2. Via css or js. You must find the media query in css that hides that part on mobile (or js).

I don't know exactly where.

Sophia_OS

  • Full Member
  • ***
  • Posts: 123
Re: (SOLVED)Change Show filters/Hide filters and user menu in mobile view
« Reply #4 on: September 14, 2018, 02:44:13 am »
thank you
« Last Edit: Today at 01:50:55 am by Sophia_OS »

marius-ciclistu

  • issues
  • Hero Member
  • *
  • Posts: 1492
  • "BE GRATEFUL TO THOSE THAT SUPPORTED YOU"
Re: (SOLVED)Change Show filters/Hide filters and user menu in mobile view
« Reply #5 on: September 14, 2018, 09:05:47 pm »
Look at the id of that section and seek it in whole osclass. I'm on mobile now.

Sophia_OS

  • Full Member
  • ***
  • Posts: 123
Look at the id of that section and seek it in whole osclass. I'm on mobile now.

thank you marius