Skip to content
This repository has been archived by the owner on Jan 8, 2021. It is now read-only.

Issue 174 rev3 (team 4) #225

Open
wants to merge 38 commits into
base: master
Choose a base branch
from
Open

Conversation

agiz
Copy link
Contributor

@agiz agiz commented Jun 7, 2012

  • API for displaying stores around nodes from odpiralnicasi.com
  • Provided short demonstration how to integrate api information into template.

@agiz
Copy link
Contributor Author

agiz commented Jun 7, 2012

  • Changed zoom properties on map for purposes of this api (must be changed back to 15 or 16).
  • Does square brackets notation I used for arrays needs to be changed for dotted one?
  • This pull request is up to date (12e518f)
  • This pull request addresses issue Add panel with open venues from Odpiralni Casi #174.

@mitar
Copy link
Member

mitar commented Jun 7, 2012

Please update from main repository. You have panels API available. Check it out. ;-)

@agiz
Copy link
Contributor Author

agiz commented Jun 8, 2012

Please support laziness and tell how to enable a panel. Can it be determined what panels should load first?

@mitar
Copy link
Member

mitar commented Jun 8, 2012

Currently all panels under piplmesh.panels are added automatically (if you register them into panels_pool, of course). For the rest, there is a pending pull request #189. So ordering them in display and so on.

API also supports defining dependencies between panels. But as currently all panels are always displayed, this is not a problem.

Also order of loading on the page is not important and should not be important if you do it correctly. So, first, you do everything through jquery.ready in every panel.

Then, I suggest you define custom event which you will trigger when map is ready. And other panels can then in their jquery.ready subscribe to that event. Of course, if map is already ready when they subscribe to the event, they should be immediately run, not just waiting for the event which will never come anymore. So it should behave like jquery.ready does, only for maps. I am not really sure if jQuery supports something like this already, but it maybe does. Check it out.

So, you should define your own JavaScript API in the map in the way that other panels can use the map, without being afraid of the loading order.

@agiz
Copy link
Contributor Author

agiz commented Jun 8, 2012

By

(if you register them into panels_pool, of course)

do you mean create them under panels directory? Because I have done that. Can underscore in panel name be an issue?

@mitar
Copy link
Member

mitar commented Jun 8, 2012

Can you show me the code?

No, underscore should not be a problem. But name is automatically derived from the class name otherwise, and it is probably best to just leave it as it is?

@mitar
Copy link
Member

mitar commented Jun 8, 2012

You have restarted runserver? Really restart, not just leave to its autoreload.

@agiz
Copy link
Contributor Author

agiz commented Jun 8, 2012

Grrr. This is the stupidest github part. If you rename files it stops tracking them or what? I do not even have option to add them manually.

@mitar
Copy link
Member

mitar commented Jun 8, 2012

Github? Or git? You should be renaming always with git mv.

@agiz
Copy link
Contributor Author

agiz commented Jun 8, 2012

I have known this issue before, I was just never affected by it. Anyway, please check this pull request now, it seems to represent my structure correctly.

@mitar
Copy link
Member

mitar commented Jun 8, 2012

And where is Python code which goes with the panel? There is where you register the panel into the pool.

@mitar
Copy link
Member

mitar commented Jun 8, 2012

And please name it odpiralnicasi. ;-)

@mitar
Copy link
Member

mitar commented Jun 8, 2012

And OdpiralniCasiPanel.

@agiz
Copy link
Contributor Author

agiz commented Jun 8, 2012

Aaaa.So that is what is mean by registering into the pool. Nonetheless I have added that and panel still does not load.

@mitar
Copy link
Member

mitar commented Jun 8, 2012

Or even name it openhours. That is their English name:

http://odpiralnicasi.com/en/

@mitar
Copy link
Member

mitar commented Jun 8, 2012

Please check everything precisely. You do have __init__.py file?

@agiz
Copy link
Contributor Author

agiz commented Jun 8, 2012

Are panels connected by context header? I mean does Map panel name connect with map directory name?

@agiz
Copy link
Contributor Author

agiz commented Jun 8, 2012

I did have __init__.py before just forgot to add it, but panel.py was indeed missing.

@mitar
Copy link
Member

mitar commented Aug 14, 2012

I have documented JavaScript code style here:

#199 (comment)

@mitar
Copy link
Member

mitar commented Aug 25, 2012

TODO.

@mitar
Copy link
Member

mitar commented Aug 26, 2012

Please update from main repository.

Conflicts:
	piplmesh/frontend/static/piplmesh/jquery/css/jquery-ui.css
	piplmesh/frontend/static/piplmesh/jquery/jquery-ui.js
	piplmesh/frontend/templates/base.html
	piplmesh/panels/onlineusers/templates/panel/onlineusers/panel.html
@agiz
Copy link
Contributor Author

agiz commented Sep 12, 2012

BUMP! Updated from main repository.

@mitar
Copy link
Member

mitar commented Sep 12, 2012

Vuii, you are alive!!! :-)

@agiz
Copy link
Contributor Author

agiz commented Sep 12, 2012

Hehe, yes hardly :). I wish I was relaxing all this time as it might be seen from lack of my activity here. Unfortunately that was not the case :(.

@agiz
Copy link
Contributor Author

agiz commented Sep 24, 2012

Umm hi again. Have I overlooked something that needs to be done here?

@mitar
Copy link
Member

mitar commented Sep 27, 2012

No time on my side. There are others which need to pass the class.

BTW, please update from main repository, again. Sorry!

@mitar
Copy link
Member

mitar commented Sep 27, 2012

(We got now also big map functionality. The idea is to provide layers there! And that people can move around!)

Conflicts:
	piplmesh/panels/map/static/piplmesh/panel/map/panel.js
	piplmesh/panels/map/templates/panel/map/panel.html
@agiz
Copy link
Contributor Author

agiz commented Sep 27, 2012

No problem Mitar. I understand how priorities work. Also updated. I have not checked big map yet, I am on a rough schedule myself.

self.today = self.is_open ? gettext("open") : gettext("closed");
self.___location = new google.maps.LatLng(self.lat, self.lng);
self.image = 'https://www.google.com/intl/en_us/mapfiles/ms/micons/yellow-dot.png';
if ('is_open' in self && self.is_open == true) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self.is_open == true? Why not just self.is_open?

@agiz
Copy link
Contributor Author

agiz commented Oct 11, 2012

Fixed some minor mistakes, somewhat clueless how to combat others.

});
}

map_loaded.done(function () {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where is map_loaded defined?

@mitar
Copy link
Member

mitar commented Oct 29, 2012

So about which things you are clueless? I can try to help.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants