GeoView : synchronize font in infobubbles between providers.

svn: r13240
This commit is contained in:
Serge Noiraud 2009-09-23 21:20:58 +00:00
parent c022ca4233
commit 1d895a55c1

View File

@ -128,8 +128,7 @@ _JAVASCRIPT = '''<script>
val = gmarkers[i].getAttribute("year"); val = gmarkers[i].getAttribute("year");
min = parseInt(year); min = parseInt(year);
max = min + step; max = min + step;
if ( selectedmarkers == "All" ) if ( selectedmarkers == "All" ) {{ min = 0; max = 9999; }}
{{ min = 0; max = 9999; }}
gmarkers[i].hide(); gmarkers[i].hide();
years = val.split(' '); years = val.split(' ');
for ( j=0; j < years.length; j++) {{ for ( j=0; j < years.length; j++) {{
@ -159,8 +158,7 @@ _JAVASCRIPT = '''<script>
function get_selected_radio() {{ function get_selected_radio() {{
selected = 0; selected = 0;
for ( b=0; b < document.btns.years.length; b++) {{ for ( b=0; b < document.btns.years.length; b++) {{
if ( document.btns.years[b].checked == true ) if ( document.btns.years[b].checked == true ) selected=b;
selected=b;
}} }}
}} }}
function set_selected_radio() {{ function set_selected_radio() {{
@ -1055,10 +1053,14 @@ class GeoView(HtmlView):
savetype = mark[8] savetype = mark[8]
self.mapview.write("my_marker.setInfoBubble(\"<div ") self.mapview.write("my_marker.setInfoBubble(\"<div ")
self.mapview.write("id='info' ") self.mapview.write("id='info' ")
# perhaps we need css in the futur ...
self.mapview.write("style='white-space:nowrap;") self.mapview.write("style='white-space:nowrap;")
self.mapview.write("overflow:auto;width:103%%;") self.mapview.write("overflow:auto;width:105%%;")
self.mapview.write("max-height:%dpx' >" % self.mapview.write("font-size:10pt;")
( self.height/5 ) ) divsize = self.height/5
if divsize < 150:
divsize = 150
self.mapview.write("max-height:%dpx' >" % divsize )
self.mapview.write("%s<br>" % mark[0]) self.mapview.write("%s<br>" % mark[0])
if formatype == 1: if formatype == 1:
self.mapview.write("<br>%s" % mark[5]) self.mapview.write("<br>%s" % mark[5])
@ -1283,7 +1285,7 @@ class GeoView(HtmlView):
if person_list: if person_list:
descr2 = event.get_type() descr2 = event.get_type()
for person in person_list: for person in person_list:
descr2 = ("%(description) - s%(name)s") % { descr2 = ("%(description)s - %(name)s") % {
'description' : descr2, 'description' : descr2,
'name' : _nd.display(person)} 'name' : _nd.display(person)}
descr = ("%(eventtype)s;"+ descr = ("%(eventtype)s;"+