Changeset 101 for ATGoogleMaps


Ignore:
Timestamp:
08/18/06 00:55:52 (5 years ago)
Author:
takanori
Message:

情報画面のタブ表示に対応

Location:
ATGoogleMaps/trunk/skins/googlemaps
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • ATGoogleMaps/trunk/skins/googlemaps/atgooglemaps.js.dtml

    r79 r101  
    8686} 
    8787 
    88 function addMarker(map, marker_id, lat, lng) { 
     88function addMarker(map, tabs, marker_id, lat, lng) { 
    8989    var point = new GLatLng(lat, lng); 
    9090    var marker = new GMarker(point, icon); 
    9191    map.addOverlay(marker); 
    92     var f = function(){ 
    93         //map.centerAtLatLng(point); 
    94         marker.openInfoWindowHtml(document.getElementById('marker_html_' + marker_id).innerHTML); 
    95     }; 
     92    f = function() {marker.openInfoWindowTabsHtml(tabs)}; 
    9693    GEvent.addListener(marker, 'click', f); 
    9794    var marker_field = document.getElementById('marker_link_'+ marker_id); 
  • ATGoogleMaps/trunk/skins/googlemaps/gmap.py

    r78 r101  
    1616        latitude = marker.point['latitude'] 
    1717        longitude = marker.point['longitude'] 
    18         print "        addMarker(map, '%s', %s, %s);" % (marker.id, latitude, longitude) 
     18        print "        var tabs = [" 
     19        print "          new GInfoWindowTab('%s', document.getElementById('marker_html_%s').innerHTML)" % (marker.tab1, marker.id) 
     20        if marker.detail: 
     21            print "          ,new GInfoWindowTab('%s', document.getElementById('detail_html_%s').innerHTML)" % (marker.tab2, marker.id) 
     22        print "        ];" 
     23        print "        addMarker(map, tabs, '%s', %s, %s);" % (marker.id, latitude, longitude) 
    1924    except: 
    2025        continue 
  • ATGoogleMaps/trunk/skins/googlemaps/gmap_view.pt

    r82 r101  
    3636 
    3737    <!-- gmarker --> 
    38     <ul> 
    39     <tal:gmarker tal:repeat="marker python: here.objectValues(['GMarker'])"> 
     38    <ul tal:define="markers python: here.objectValues(['GMarker'])"> 
     39    <tal:gmarker tal:repeat="here markers"> 
    4040      <li id="" 
    41           tal:condition="marker/point | nothing" 
    42           tal:attributes="id string:marker_link_${marker/id}"> 
    43         <a href="javascript:void(0)" onclick="this.blur()" tal:content="marker/pretty_title_or_id"> 
     41          tal:condition="here/point | nothing" 
     42          tal:attributes="id string:marker_link_${here/id}"> 
     43        <a href="javascript:void(0)" onclick="this.blur()" tal:content="here/pretty_title_or_id"> 
    4444          Gmarker title 
    4545        </a> 
    4646        <!-- info window --> 
    4747        <div id="" style="display: none;" 
    48              tal:attributes="id string:marker_html_${marker/id}"> 
     48             tal:attributes="id string:marker_html_${here/id}"> 
    4949          <div style="width: 290px;"> 
    5050            <div class="documentActions"> 
    51               <a href="" tal:condition="marker/url" 
    52                  tal:attributes="href marker/url" 
     51              <a href="" tal:condition="here/url" 
     52                 tal:attributes="href here/url" 
    5353                 i18n:translate="" i18n:domain="plone"> 
    5454                 Link 
     
    5656            </div> 
    5757            <h1 class="documentFirstHeading"> 
    58               <a href="" tal:content="marker/pretty_title_or_id" 
    59                  tal:attributes="href marker/absolute_url"> 
     58              <a href="" tal:content="here/pretty_title_or_id" 
     59                 tal:attributes="href here/absolute_url"> 
    6060                Title or id 
    6161              </a> 
    6262            </h1> 
    6363            <img src="" style="float: left; margin: 5px;" 
    64                  tal:condition="marker/imageurl" 
    65                  tal:attributes="src marker/imageurl" /> 
     64                 tal:condition="here/imageurl" 
     65                 tal:attributes="src here/imageurl" /> 
    6666 
    6767            <div class="documentDescription" 
    68                  tal:content="marker/Description" 
    69                  tal:condition="marker/Description"> 
     68                 tal:content="here/Description" 
     69                 tal:condition="here/Description"> 
    7070              Description 
    7171            </div> 
    7272     
    7373            <div class="address" 
    74                  tal:content="marker/address" 
    75                  tal:condition="marker/address"> 
     74                 tal:content="here/address" 
     75                 tal:condition="here/address"> 
    7676              address 
    7777            </div> 
    7878     
    7979            <div class="phone" 
    80                  tal:content="marker/phone" 
    81                  tal:condition="marker/phone"> 
     80                 tal:content="here/phone" 
     81                 tal:condition="here/phone"> 
    8282              phone 
    8383            </div> 
    8484     
    85             <div style="clear: both;" tal:condition="marker/getText" 
    86                  tal:content="structure marker/getText"> 
     85            <div style="clear: both;" tal:condition="here/getText" 
     86                 tal:content="structure here/getText"> 
    8787               Body Text 
    8888            </div> 
    89      
     89 
     90            <div metal:use-macro="here/document_relateditems/macros/relatedItems"> 
     91              show related items if they exist 
     92            </div> 
    9093          </div> 
    9194        </div> 
     95        <div id="" style="display: none;" 
     96             tal:attributes="id string:detail_html_${here/id}" 
     97             tal:condition="here/detail"> 
     98          <div style="width: 290px;"> 
     99            <div class="documentActions"> 
     100              <a href="" tal:condition="here/url" 
     101                 tal:attributes="href here/url" 
     102                 i18n:translate="" i18n:domain="plone"> 
     103                 Link 
     104              </a> 
     105            </div> 
     106            <h1 class="documentFirstHeading"> 
     107              <a href="" tal:content="here/pretty_title_or_id" 
     108                 tal:attributes="href here/absolute_url"> 
     109                Title or id 
     110              </a> 
     111            </h1> 
     112            <div tal:content="structure here/getDetail"> 
     113               Detail Text 
     114            </div> 
     115          </div> 
     116        </div> 
    92117      </li> 
    93118    </tal:gmarker> 
    94119    </ul> 
    95120     
    96     <div id="map" style="position: relative; height: 480px;" 
    97          tal:attributes="style string:position: relative;; height: ${here/height}px;;"> 
     121    <div id="map" 
     122         tal:attributes="style string:height: ${here/height}px;;"> 
    98123    </div> 
     124 
    99125    <div class="poweredBy"> 
    100126        Powered by <a href="http://takanory.net/plone/develop/atgooglemaps">ATGoogleMaps</a> 
Note: See TracChangeset for help on using the changeset viewer.