Changeset 37184

Show
Ignore:
Timestamp:
04/11/10 17:09:52 (3 years ago)
Author:
sho
Message:

supported Safari4 about border-radius.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • platform/tdiary/plugin/everytrail.rb

    r37178 r37184  
    99        s = size.collect {|i| i.to_i } 
    1010        s[0] = 400 if s[0] == 0 
    11         s[0] = 300 if @conf.iphone? 
    1211        s[1] = 300 if s[1] == 0 
     12        if @conf.iphone? then 
     13                s = [300, 300 * s[1] / s[0]] 
     14        end 
    1315        s 
    1416end 
    1517 
    1618def everytrail( trip_id, label = nil, size = [400,300] ) 
     19        size = everytrail_adjust_size( size ) 
    1720        l = label ? %Q|<a href="http://www.everytrail.com/view_trip.php?trip_id=#{h trip_id}">#{h label}</a>| : '' 
    1821        %Q|<div class="everytrail"><iframe src="http://www.everytrail.com/iframe2.php?trip_id=#{h trip_id}&width=#{size[0]}&height=#{size[1]}" marginheight=0 marginwidth=0 frameborder=0 scrolling=no width=#{size[0]} height=#{size[1]}>#{l}</iframe></div>| 
     
    3033   end 
    3134 
    32    size.collect! {|i| i.to_i } 
    33    size[0] = 400 if size[0] == 0 
    34    size[1] = 300 if size[1] == 0 
     35        size = everytrail_adjust_size( size ) 
    3536   r = label ? %Q|<h3><a href="http://www.everytrail.com/view_trip.php?trip_id=#{h trip_id}">#{h label}</a></h3>| : '' 
    3637   lat_param = latitude ? "&startLat=#{latitude}" : ''