Re: js code in the jsp page
- From: Colin Walters <walters redhat com>
- To: ☠ <yarrr-list gnome org>
- Subject: Re: js code in the jsp page
- Date: Fri, 08 Apr 2005 09:25:30 -0400
On Fri, 2005-04-08 at 15:19 +0200, Alexander Larsson wrote:
> On Fri, 2005-04-08 at 09:08 -0400, Colin Walters wrote:
> > On Fri, 2005-04-08 at 14:48 +0200, Alexander Larsson wrote:
> > > I see that someone has moved a bunch of code related to setting the
> > > document title to the jsp page. Any special reason for this?
> > >
> > > I think we should avoid putting much code in the page itself. Its much
> > > cleaner to separate the html from the code as much as possible.
> >
> > Sure, we can separate it. The reason it was moved is because it is very
> > specific to the topic.jsp page. We want to be able to use the
> > JavaScript Topic class also for the topiclist.jsp page; there, we don't
> > want to have references to theTopic and have it changing window.title,
> > etc. We could rename topic.jsp to topicdisplay.jsp or something, and
> > move the code in it to topicdisplay.js.
>
> Eh? But the topic class is specific to the topic.jsp page in many more
> ways. Like, it accesses ids such as "closedcomments" and creates dom
> nodes that only make sense for that page. And functions such as
> Topic.getInterestingObjects() make no sense if you're using the topic in
> topiclist.jsp.
True. I actually started on the topiclist.jsp stuff last night, and ran
into those issues. I was hoping we could solve them; perhaps we need
FullTopic and TopicSummary subclasses of a general Topic class. Or
maybe you're right, we should just give up and create a new specific
TopicSummary class.
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]