incubator-ooo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dave Fisher <dave2w...@comcast.net>
Subject Re: Can onLoad()/onResize() on <body> be handled via CMS?
Date Tue, 24 Jul 2012 14:59:50 GMT

On Jul 24, 2012, at 7:24 AM, Rob Weir wrote:

> I'm trying to move my download stats HTML age into the website.
> 
> Original file is here:  http://people.apache.org/~robweir/aoo-downloads.html
> 
> As you can see it triggers the load of the data and the drawing the
> charts, as well as resizing when the window is resized, via this
> declaration:
> 
> <body onload="onLoad();" onresize="onResize();">
> 
> But when processed by the CMS template, this is lost.  It looks like
> everything within the source <body> is put into the new document, but
> any event hooks declared the original <body> are not carried over to
> the new <body>.
> 
> Would it be possible to add this support?

Yes - this is half way built on ooo-site. The perl side has been done for sometime.

It is something more to check tonight with QA change.

    if ($args{content} =~ m!<head.*?>(.*?)</head>(?:.*?<body(.*?)>)?(.*?)(?:</body>|\Z)!si)
{
        @args{qw/header bodytag content/} = ($1, $2, $3);
    }

It is the bodytag. I plan to change the above to extract the html head title. Also general
change from header to head (to avoind confusion with headers which come from mdtext.)

In templates/skeleton.html

<body>

is changed to

<body{%if bodytag %} {{bodytag|safe}}{% endif %}>

But my concern is a lot of NL sites use this, so I wanted to be careful.

I did have a different notion to support your downloads graph, but the above needs to be finished.

The decision will be whether to do this at the same time as the Google analytics. More this
evening. BTW - I'm west coast.

Regards,
Dave



> 
> -Rob


Mime
View raw message