Map Extension :- How to get it to work with joomla

ok its 'Sort of ’ Working
Every time i reload the page the map comes up covering the right of every page on every tab?
Are you getting that ?
It eventually goes away but refreshing brings it back

UPDATE :- You actually have to click on the map tab ( Or in my case ‘Location’ ) and it goes away after that
Dont know if that helps you?
I will restore a backup and make sure its not my edits

Hello,

Try using attached js file.

Best regards,
Ilya
dhtmlxscheduler_map_view_upd3.zip (14.5 KB)

Thanks ilya .
That fixed it up
I restored a backup before any edits
Problem now is when restored before i did the edits ( I have listed above in this thread )
I could drag and drop the boxes fine
But after all the edits and uploading of the files
I drag an event box etc and the mouse won’t let go again
Any ideas?
I will restore it before the edits again

UPDATE :-
Ok I found the problem with the boxes not letting go
If they are in the past it wll let you move them but wont let you drop them anywhere
It will let them go if you drop it back to exactly where it was
As I am using this as a job scheduler . We may need to re assign the same job to a future date
Which would just mean dragging a job event done from the past to the future
But it seems it wont let me?

Is there anyway of being able to move a past event to either the present time or the future by dragging and dropping?

If I can get my mouse outside of the box quick enough and click to create a new event
It will drop the box where it is and then i just click cancel on the new event
Thus moving the past event to the new position . This surely can’t be right?
Thanks Again :smiley: Guys for all your help .
Its much appreciated
If this was a complete component for Joomla I would definately buy it . I know its in the cards to happen so I’m going to keep this place on speed dial :slight_smile:

EDIT :-
Ok I checked my working site ( not my test one ) and I can move past to present without any problems .
So I am no wiser as to why my test site has decided to do this
It only came on after the map edits
I will restore an older backup and redo the edits

Ok I checked STEP by STEP
The problem only occured when I did the edit in scheduler_include.html
That was my last edit
Up until then I could drop everything anywhere ( past and present )
This is my scheduler_include file

[code]

[/code]

So it seems its when it starts calling the dhtmlxscheduler_map_view.js that it breaks :frowning:
Any ideas?

Still cant fix that but thought id go ahead and do the ‘location’ edit stanislav told me to do
I created the field NAMED location in the scheduler admin panel
Went back to the site and tried to create a new event with the address in the location box
It comes up in the Database but doesn’t input lat and lng
The only way I can get it to put in lat and lng is by clicking on a street in the map
which still doesnt populate the location box
Am I missing some files?
Like events.php?
As I checked the dhtmlxscheduler_map_view.js and it seems to call it
eg

addEventNow({lat:point.lat(),lng:point.lng(),event_location:L[0]

So I can see whats wrong

Try to update two attached js files - this is the latest version , same as for standalone scheduler, it fixes few known issues in the map view, which causes problem in your case.
map_and_core.zip (25.1 KB)

put those files here
map_view
components/com_scheduler/codebase/ext
and
DHT Scheduler
components/com_scheduler/codebase

No change
Still wont work ???

Also , I just put the files and edits on the working site as a test
Seems im having the same problem there
I create the tables lat and lng
with float 10,6
But as soon as I refresh the page after all the edits
It deletes those fields in the database . Thought i was going mad when it was happening at the test site
As I had to do the fields about 10 times

The Tables were there
Then after all the edits i refreshed the joomla site
and got this error

Then checked the database and the lat and lng fields had disappeared

So Maybe do all the edits first refresh the site then create the fields?
As I recreated the lat lng fields and now they are sticking
But even with the files from your last post it is not adding the ‘location’ field to lat lng in numbers
location has for example ( in the database )
32 lauderdale ave fairlight sydney nsw australia
( Tested on the demo standalone on this site , works fine )
but the lat lng are still 0.000000




Also Those 2 new files seemed to have fixed the drag and drop issue

ok got it working
The location in scheduler admin had to be
name event_location
I posted a tute to say thanks here :- viewtopic.php?f=16&t=15823&start=0
Seems I have a little issue though

If I log in as one of the users I created . And click on my map view
when they click on description ( Not the picture link for the lightbox ) it opens the lightbox
But as an admin if i click on the description ( Not the picture link for the lightbox )
it just moves from marker to marker on the map . Which is correct

So 
 the short of it

User can see 5 events in map view . If user clicks on description of each event in map view it opens lightbox

Admin can see 5 events in map view . If Admin clicks on description of each event in map view it moves through the markers on the map which is correct

The lightbox should only come up if I/they click on the Image link to the left of the description

Am I wrong?
I want the user to be able to do the same as admin ( Click description and move to next marker on map , Not open lightbox )

UPDATE:-
Ok two problems now .

  1. The above problem goes away if I let the users ‘Add’ in the joomla scheduler admin panel
    under access rights but i dont want the users to have the ability to add or edit, But without it set like this, it opens the lightbox . So any ideas?

  2. Read the bottom of the first post here viewtopic.php?f=16&t=15823&start=0
    Any edits to joomla scheduler admin panel strips out lat lng fields in database

Still stuck on these two . Does anyone have any idea?

But as an admin if i click on the description ( Not the picture link for the lightbox )
it just moves from marker to marker on the map . Which is correct

Clicking on text must just show marker on map, to edit event you need to click on the icon
When user has not “add” and “edit” access the behavior in all view changes to “show readonly details form on single click”, it has sense in all other views, because plain rendered event can’t show all info, and it is logical to show details on single clicks ( this behavior is not standard for scheduler, but part of plugins logic )
In map view, it may be not so useful.
To disable form - codebase\dhtmlxSchedulerConfigurator.php
locate

scheduler.attachEvent('onClick',function(id){ scheduler.showLightbox(id); return false; });

replace with

scheduler.attachEvent('onClick',function(id){ if (scheduler._mode!="map") scheduler.showLightbox(id); return false; });

Any edits to joomla scheduler admin panel strips out lat lng fields in database
Each time when config saved scheduler checks the list of custom fields and update DB accordingly ( may remove not used fields ). We will check how it can be avoided.

Fantastic !
There was 2 lines the same so I checked the code and put it at the 2nd one
(Around line 696. Hope thats correct ?)
Just needed to change the quotes like so

scheduler.attachEvent('onClick',function(id){ if (scheduler._mode!='map') scheduler.showLightbox(id); return false; });

I’ll wait to hear your answer on the remove fields from database problem
Once again 
 Thanks :smiley:

Hi There , All My issues are sorted now :smiley: Thanks for all the help !
Any word on how to stop the Database columns lat,lng being removed on Admin panel Save?
This seems to be my only problem now as when I add a new field ( Which is often ) I have to redo the Database again . Be great for a solution :smiley:

Quick update :-
One thing I noticed is if you dont actually set an address to an event in a clean database
( lat 0.000000 lng 0.000000) then go alter something in the admin panel in the back end and save it
It doesnt delete the lat lng columns from the database 
Strange?
But if they have one value in any field (ie. lat -31.233498 lng 0.456776)
It removes the lat/lng columns from the database
Does that help anyone?

I have worked out a solution to the stripping of the lat lng fields and updated my tute here
viewtopic.php?f=16&t=15823&p=48305#p48305

Questions:-

  1. Because I added the lat/lng fields in the admin panel
    ( Which works and stops the deleting problem )
    How can I hide them as they are un-necessary in my lightbox
    I tried setting the height to 0 but they are still there . Can this be done ?

  2. How do I disable the google Sensor? I dont need it and I think that is my problem with the Companies Network . Its like it wants to ask where I am but it throws an error ( Empty Pop Up Box that says " The site at xxxx.com.au says? ".
    They are behind a vpn firewall which I have no access to which im sure is stopping certain things .
    Although when I installed Google Chrome for Mac then accessed the site it was blocked
    but I had the ability to override the block in the address bar by clicking on a button that appeared when I opened the site .
    It said ‘Allow PopUps from xxxxx.com.au’ which i did ,then it worked .
    Still for the life of me cant work out how to get it working in Safari ( their native browsers ) Or FF .
    But they can use it in chrome cause thats all can get it to work in.
    So My Question is :-
    How to turn off the Google Sensor to see if that is my problem .

We will include “hidden” type for custom field in the next version of plugin.

As for now
dhtmlxSchedulerConfigurator.php
line 257

if ($fieldName == 'text') {

can be replaced with

if ($fieldName == 'lat' || $fieldName == 'lng') { // do nothing } else if ($fieldName == 'text') {

How do I disable the google Sensor?

add the next in scheduler_include.html

<script> scheduler.config.map_resolve_user_location = false; </script>

Thanks Stanislav . Sensor one worked fine
But the hiding fields isnt working ?



Did I miss something?