klox7 VIP
Total posts: 914
22 Apr 2014 12:01

Hi,

I'm trying to figure out this thing:

I have Cobalt - Module - Filters with custom template where I have radio buttons and divs. Each radio button shows it's div with a click. Div data is displayed for ex. with this onRenderFilter($section, TRUE); ?>.

I also included map filter but I doesn't give me what I need. This is filter but I would like to replace it with something like Cobalt - Module - Records (map) has (show all records on map).

So my question: Is it possible to include Cobalt - Module - Records (or it's functionality) in Cobalt - Module - Filters custom template?

Thanks

Last Modified: 20 Aug 2014


Sergey
Total posts: 13,748
23 Apr 2014 05:10

Why filter have to show all records on the map? It is a filter not the record list. And it should show your position and radius. This is only purpose. If you want to show articles on the map, just set map template for section.


klox7 VIP
Total posts: 914
23 Apr 2014 08:07

Well, because I want filter only for specific fields but not map:). I want some kind of hybrid. I added link to site to access credentials for you to see what I mean. I'm talking about first module under navigation. Click Map radio button. I think here will be better to display all records instead of filter it.

And if there is Map as a filter like I have now and I want to filter something else then when I click search it also filters default values selected in map.


Sergey
Total posts: 13,748
23 Apr 2014 10:23

I see.

You have a problem there. Map is not correct. You need to add javascript on after map radio click

google.maps.event.trigger(window.filtermapXX, 'resize');

Where XX is an ID of the GEO field. And it will work only after next update. This wil redrow map. map is offseted because it is rendered when it is hidden. You need to rerender it when it become visible.

And in any case it is impossible to see other articles on that map.


klox7 VIP
Total posts: 914
23 Apr 2014 12:16

Hey thank you. I know about this render problem but I didn't look into it yet. Thanks:)

So having records module inside filter module is not possible!


Sergey
Total posts: 13,748
25 Apr 2014 06:45

klox7 So having records module inside filter module is not possible!

Right. Not possible.


klox7 VIP
Total posts: 914
25 Apr 2014 08:49

Acctually I just found out it's possible with Joomla API:

<?php
jimport('joomla.application.module.helper');
$module = &JModuleHelper::getModule('mod_cobalt_records','Your module name');
echo JModuleHelper::renderModule($module);
?>

But there is issue with rerendering google maps.


klox7 VIP
Total posts: 914
19 Aug 2014 16:35

Back on this...

I used

$('a[href=".map-rslt"]').on('click',function(){ google.maps.event.trigger(window.filtermap26, 'resize'); });

but map still doesn't render properly. It shows completely only when I go over it with mouse. I'm using bootstrap tabs to show map.


Sergey
Total posts: 13,748
20 Aug 2014 11:01

klox7 But there is issue with rerendering google maps.

Because without settings it will not show. ANd you get just the module not the one you configured.

klox7 but map still doesn't render properly. It shows completely only when I go over it with mouse. I'm using bootstrap tabs to show map.

What is a[href="/.map-rslt"]? may be you need some delay? try console log inside function to make sure it is triggered at all.

Powered by Cobalt