Changeset 288
- Timestamp:
- 03/04/10 04:44:49 (2 years ago)
- Location:
- Products.ATGoogleMaps/trunk/Products/ATGoogleMaps/skins/ATGoogleMaps
- Files:
-
- 3 edited
-
gmap.kml.pt (modified) (1 diff)
-
gmap.py (modified) (2 diffs)
-
gmap_view.pt (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Products.ATGoogleMaps/trunk/Products/ATGoogleMaps/skins/ATGoogleMaps/gmap.kml.pt
r263 r288 10 10 <latitude tal:content="context/center/latitude">35.73</latitude> 11 11 </LookAt> 12 <Placemark tal:repeat="context python:context.objectValues('GMarker')"> 13 <name tal:content="context/pretty_title_or_id">Marker title</name> 14 <description tal:content="context/kml_description">Description</description> 15 <Point> 16 <coordinates tal:content="string:${context/point/longitude},${context/point/latitude}">139.71,35.73</coordinates> 17 </Point> 18 </Placemark> 12 <tal:marker tal:repeat="item context/getFolderContents"> 13 <Placemark tal:define="marker item/getObject"> 14 <name tal:content="item/pretty_title_or_id">Marker title</name> 15 <description tal:content="item/Description">Description</description> 16 <Point> 17 <coordinates tal:content="string:${marker/point/longitude},${marker/point/latitude}">139.71,35.73</coordinates> 18 </Point> 19 </Placemark> 20 </tal:marker> 19 21 </Document> 20 22 </kml> -
Products.ATGoogleMaps/trunk/Products/ATGoogleMaps/skins/ATGoogleMaps/gmap.py
r287 r288 1 1 site_encoding = context.plone_utils.getSiteEncoding() 2 2 3 def add_markers(js, markers): 4 for marker in markers: 3 def add_markers(js, items): 4 for item in items: 5 marker = item.getObject() 5 6 lat = marker.point['latitude'] 6 7 lng = marker.point['longitude'] … … 15 16 )) 16 17 17 add_markers(js, context. objectValues(['GMarker']))18 add_markers(js, context.getFolderContents()) 18 19 19 20 js.append('}') -
Products.ATGoogleMaps/trunk/Products/ATGoogleMaps/skins/ATGoogleMaps/gmap_view.pt
r287 r288 34 34 35 35 <!-- gmarker --> 36 <ul tal:define="markers python: context.objectValues(['GMarker'])"> 37 <tal:gmarker tal:repeat="marker markers"> 38 <li id="" 39 tal:define="mid marker/id;" 40 tal:condition="marker/point | nothing" 41 tal:attributes="id string:infowindow_link_${mid}"> 42 <a href="javascript:void(0)" onclick="this.blur()" tal:content="marker/pretty_title_or_id"> 43 Gmarker title 44 </a> 45 <!-- info window --> 36 <ul tal:define="folderContents context/getFolderContents"> 37 <tal:entry tal:repeat="item folderContents"> 38 <tal:block tal:define="marker item/getObject; 39 item_id item/getId|item/id; 40 item_title_or_id item/pretty_title_or_id; 41 item_wf_state item/review_state|python: wtool.getInfoFor(item, 'review_state', ''); 42 item_wf_state_class python:'state-' + normalizeString(item_wf_state); 43 "> 44 <li id="" 45 tal:attributes="id string:infowindow_link_${item_id}"> 46 <a href="javascript:void(0)" 47 onclick="this.blur()" 48 tal:content="item_title_or_id" 49 tal:attributes="class string:${item_wf_state_class}"> 50 Marker title 51 </a> 46 52 <div id="" style="display: none;" 47 tal:attributes="id string:infowindow_html_${ mid}">53 tal:attributes="id string:infowindow_html_${item_id}"> 48 54 <h2 class="documentFirstHeading"> 49 55 <metal:field use-macro="python:marker.widget('title', mode='view')"> … … 100 106 </ul> 101 107 </div> 102 103 108 </div> 104 </li> 105 </tal:gmarker> 109 </li> 110 </tal:block> 111 </tal:entry> 106 112 </ul> 107 113
Note: See TracChangeset
for help on using the changeset viewer.
