• Hello, i need to change the view of the category filter from dropdown to a table like view becouse i have only 6 categories and i’d like to be visible all the time and on click to filter the calendar like the dropdown does. Is that possible and wich files should i edit to acomplish this.

    When i moove the div’s (1 div for each category filter word(<div data-term=”278″> … and so on)) out of <div class=”ai1ec-dropdown-menu”> in the inspector the result is exactly what i want but this HTML is dinamicly rendered and can’t find where to edit it.

    The final target is to make the colored legend block to be clickable and filter the calendar:
    Thank you!

    https://www.ads-software.com/plugins/all-in-one-event-calendar/

Viewing 1 replies (of 1 total)
  • Thread Starter denislav23

    (@denislav23)

    Hello again for thoose who might need similar functionality i’ll post the solution i came up with.

    We’ll use jquery and CSS. As i mentioned when <div data-term="***"> is outside the <div class="ai1ec-dropdown-menu"> the filter links are visible outside the dropdown.
    Note that the div shoud be before #ai1ec-calendar or else the buttons won’t work.

    Right order:

    `<div id=”ai1ec-calendar” class=”timely ai1ec-calendar”>
    <div data-term=”195″></div>
    <div data-term=”278″>…..`

    To moove the div’s i used jquery wich u can put in your header.php or include as external file.

    <script>
    $(function(){
      if ($('body').is('.page-id-7')) //filter the page i want to moove the divs
        {
            jQuery('.ai1ec-dropdown-menu > div'//this select all the divs after the class wich are actualy all the categories).insertBefore('.ai1ec-calendar-toolbar'//insert all the divs before this div class);
        }
    });
    </script>

    Now u have your category buttons visible the only thing left is to style them.
    as theese div’s have no id’s or classes u need to target them like this in your .css:

    [data-term="195"] {
        /* Styles */ like this u can select the div
    }
    [data-term="195"]>a {
        /* Styles */ like this u can select the nested elements
    }

    This way i accoplished this:Filter the calendar categories whithout refresh the page
    That’s it hope will help someone.
    PS: This method makes the dropdown unusable so u’ll need to hide it’s button with display:none; or visibility:hidden;

Viewing 1 replies (of 1 total)
  • The topic ‘Change the view of the category filter.’ is closed to new replies.