From rem63 at cornell.edu Fri Feb 22 15:57:27 2008
From: rem63 at cornell.edu (Rick Moore)
Date: Fri, 22 Feb 2008 09:57:27 -0500
Subject: [kupu-dev] kupu filtering "class" attribute from links
Message-ID: <47BEE2D7.4030209@cornell.edu>
One of our web sites (Birds of North America -
http://bna.birds.cornell.edu) has over 11,000 articles about birds. The
original content was downloaded from an old Fatwire database and
inserted directly into the text field of the documents. Each of these
articles may contain dozens of bibiliographic references that are
supposed to shown in small popup windows when selected. Because of all
the religion against the onClick. attribute, we do this using the class
attribute on the tag.
This worked fine until recently, then blew up when we started to update
the articles for some of the birds. Once the content is changed in kupu,
all the class attributes are stripped from the tags and the popup
trigger no longer functions.
I posted this on the plone-users web site and ttried looking at
kupubasetools,js and kupucontentfilters.js as suggested. I am not a
javascript programmer, so I was somewhat bewildered by what I found. It
seems that kupubasetools.js specifically allows the "class" attribute
for practically everything. But then the code in LinkTool seems to want
to strip it out if it wasn't set by the one of the link buttons in the
kupu UI.
I need somewhat explicit help in figuring this out. Is there anyone who
can tell me where the class attribute gets stripped out of links and how
I can fix it. I have no aversion to upgrading to a later rev of kupu if
that will help. And I'd be willing to add a special link button if
that's what it takes, just don't know how.
We are using :
kupu 1.3.9
Plone 2.5.4
Zope 2.9.7
Python 2.4.4
Red Hat Enterprise Linux
Thanks,
Rick Moore
Software Architect
Scientific Knowledge and Education Network
Cornell Lab of Ornithology
From rem63 at cornell.edu Fri Feb 22 19:12:33 2008
From: rem63 at cornell.edu (Rick Moore)
Date: Fri, 22 Feb 2008 13:12:33 -0500
Subject: [kupu-dev] kupu filtering "class" attribute from links - solved
In-Reply-To: <47BEE2D7.4030209@cornell.edu>
References: <47BEE2D7.4030209@cornell.edu>
Message-ID: <47BF1091.4010008@cornell.edu>
Got someone locally to help me out and we solved it, thanks
Rick Moore
Rick Moore wrote:
> One of our web sites (Birds of North America -
> http://bna.birds.cornell.edu) has over 11,000 articles about birds. The
> original content was downloaded from an old Fatwire database and
> inserted directly into the text field of the documents. Each of these
> articles may contain dozens of bibiliographic references that are
> supposed to shown in small popup windows when selected. Because of all
> the religion against the onClick. attribute, we do this using the class
> attribute on the tag.
>
> This worked fine until recently, then blew up when we started to update
> the articles for some of the birds. Once the content is changed in kupu,
> all the class attributes are stripped from the tags and the popup
> trigger no longer functions.
>
> I posted this on the plone-users web site and ttried looking at
> kupubasetools,js and kupucontentfilters.js as suggested. I am not a
> javascript programmer, so I was somewhat bewildered by what I found. It
> seems that kupubasetools.js specifically allows the "class" attribute
> for practically everything. But then the code in LinkTool seems to want
> to strip it out if it wasn't set by the one of the link buttons in the
> kupu UI.
>
> I need somewhat explicit help in figuring this out. Is there anyone who
> can tell me where the class attribute gets stripped out of links and how
> I can fix it. I have no aversion to upgrading to a later rev of kupu if
> that will help. And I'd be willing to add a special link button if
> that's what it takes, just don't know how.
>
> We are using :
> kupu 1.3.9
> Plone 2.5.4
> Zope 2.9.7
> Python 2.4.4
> Red Hat Enterprise Linux
>
> Thanks,
>
> Rick Moore
> Software Architect
> Scientific Knowledge and Education Network
> Cornell Lab of Ornithology
>
> _______________________________________________
> kupu-dev mailing list
> kupu-dev at codespeak.net
> http://codespeak.net/mailman/listinfo/kupu-dev
>
From duncan.booth at suttoncourtenay.org.uk Mon Feb 25 15:56:02 2008
From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth)
Date: Mon, 25 Feb 2008 14:56:02 +0000 (UTC)
Subject: [kupu-dev] kupu filtering "class" attribute from links
References: <47BEE2D7.4030209@cornell.edu>
Message-ID:
Rick Moore wrote:
> I posted this on the plone-users web site and ttried looking at
> kupubasetools,js and kupucontentfilters.js as suggested. I am not a
> javascript programmer, so I was somewhat bewildered by what I found. It
> seems that kupubasetools.js specifically allows the "class" attribute
> for practically everything. But then the code in LinkTool seems to want
> to strip it out if it wasn't set by the one of the link buttons in the
> kupu UI.
It isn't so much that the LinkTool strips it out: when you edit a link in
kupu it sets the class explicitly to 'external-link' or 'internal-link' (at
least it does in 1.4, I can't remember what it did in earlier versions.
The class should however remain unchanged unless you actually edit it.
> I need somewhat explicit help in figuring this out. Is there anyone who
> can tell me where the class attribute gets stripped out of links and how
> I can fix it. I have no aversion to upgrading to a later rev of kupu if
> that will help. And I'd be willing to add a special link button if
> that's what it takes, just don't know how.
Upgrading to 1.4 can only be a good thing whether or not you have problems.
For external links it should be easy enough to change in kupudrawers.js,
find linkel.getAttribute('href') and somewhere round there pick up any
existing classname and strip out 'external-link' if present and save in
this.saveclass. Then when saving set the class to 'external-link
'+this.savedclass, likewise for internal links the current class could be
saved in createContent and restored later.
From gmane at dylanjay.com Wed Feb 27 03:32:18 2008
From: gmane at dylanjay.com (Dylan Jay)
Date: Wed, 27 Feb 2008 13:32:18 +1100
Subject: [kupu-dev] Getting errors with trying to edit image links
Message-ID:
This is with plone 3.0.6 and kupu 1.4.8 and firefox 3.0b3
If I click on an empty space and click on an image drawer, nothing
happens. I have to enter a space before the button causes the image
drawer to appear.
If I click on an existing image I can't make the image drawer appear either.
If it helps I'm getting the following javascript error on kupu loading
range.intersectsNode is not a function
kupuhelpers.js (line 867
Could it be a firefox 3 issue?
PS. where is the issue tracker for this?
From duncan.booth at suttoncourtenay.org.uk Wed Feb 27 11:30:41 2008
From: duncan.booth at suttoncourtenay.org.uk (Duncan Booth)
Date: Wed, 27 Feb 2008 10:30:41 +0000 (UTC)
Subject: [kupu-dev] Getting errors with trying to edit image links
References:
Message-ID:
Dylan Jay wrote:
> This is with plone 3.0.6 and kupu 1.4.8 and firefox 3.0b3
>
> If I click on an empty space and click on an image drawer, nothing
> happens. I have to enter a space before the button causes the image
> drawer to appear.
>
> If I click on an existing image I can't make the image drawer appear
> either.
>
> If it helps I'm getting the following javascript error on kupu loading
>
> range.intersectsNode is not a function
> kupuhelpers.js (line 867
>
> Could it be a firefox 3 issue?
>
> PS. where is the issue tracker for this?
>
Please file a report at http://dev.plone.org/plone
It sounds like a Firefox 3 issue.
http://developer.mozilla.org/en/docs/DOM:range.intersects
> Warning: This method has been removed from Gecko 1.9 and will not
> exist in future versions of Firefox; you should switch to
> compareBoundaryPoints() as soon as possible.