Ignore:
Timestamp:
02/08/12 18:04:13 (9 years ago)
Author:
davidb
Message:

'attr' as an attribute in HTML, passed straight through to Expeditee added in

Location:
gs3-extensions/html-to-expeditee/trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • gs3-extensions/html-to-expeditee/trunk/src/perllib/ExpediteeFrameIO.pm

    r25057 r25060  
    467467    my $attr = convertStyleToAttr($html_node->{'style'});
    468468
     469    if (defined $html_node->{'attr'}) {
     470        # values provided in 'attr' explicitly overwrite any values
     471        # derived from CSS style
     472
     473        my $direct_attr_str = $html_node->{'attr'};
     474        my @direct_attr_array = split(/\s*;\s*/,$direct_attr_str);
     475        foreach my $da (@direct_attr_array) {
     476        my ($key,$val) = ($da =~ m/^(.)\s*(.*)$/);
     477        $attr->{$key} = $val;
     478        }
     479    }
     480
    469481    $self->addRect($xl,$yt,$xr,$yb,$attr);
    470482
  • gs3-extensions/html-to-expeditee/trunk/src/src/js/html-to-expeditee.js

    r25057 r25060  
    139139            }
    140140        }
    141 
    142141    }
    143142    }
     
    184183        // console.log("font size = " + style["font-size"]);
    185184 
    186         jsonNode.style = style
     185        jsonNode.style = style;
     186
     187        var attr = node.attributes["attr"];
     188        if (attr != null) {
     189        // console.log("attr = " + attr.value);
     190        jsonNode.attr = attr.value;
     191        }
     192
    187193
    188194            var jsonChildNodes = [];
Note: See TracChangeset for help on using the changeset viewer.