Show
Ignore:
Timestamp:
04/28/08 13:35:55 (5 years ago)
Author:
tokuhirom
Message:

AirHPhone のときは横幅320px固定でおねがいします。

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/perl/Moxy/trunk/lib/Moxy/Plugin/DisplayWidth.pm

    r10623 r10637  
    77sub response_filter:Hook('response_filter') { 
    88    my ($class, $context, $args) = @_; 
    9     return if $args->{mobile_attribute}->is_non_mobile; 
    10     return if $args->{mobile_attribute}->is_airh_phone; 
     9    my $attr = $args->{mobile_attribute}; 
     10    return if $attr->is_non_mobile; 
    1111 
    12     my $display = $args->{mobile_attribute}->display; 
    13     my $header = sprintf( 
    14         q{<div style="border: 1px black solid; width: %dpx; margin: 0 auto;float: left;">}, $display->width 
    15     ); 
     12    # HTTP::MobileAttribute::Plugin::Display は AirHPhone に対応していない。 
     13    # が、ディスプレイ幅の指定がないと利用に耐えないので、現行機種のほとんどが 320px であることが下記 URL より確認できるので 
     14    # http://www.willcom-inc.com/ja/lineup/spec/voice/index.html 
     15    # 320px 固定にしておく。だれか Willcom が大好きでたまらないような人があらわれたら対応してください。 
     16    my $width = $attr->is_airh_phone ? 320 : $attr->display->width; 
     17 
     18    my $header = qq!<div style="border: 1px black solid; width: ${width}px; margin: 0 auto;float: left;">!; 
    1619 
    1720    my $content = $args->{response}->content;