Priority: Normal
Current State: Closed
Released In:
Target Release: n/a
Applies To: Extension
Component: NatSkin
Branches:
NatSkin enabled on trunk.
Navigate (via URL) to a topic that doesn't exist, Eg.
FooBarTopicThatDoesntExist
The "Create new topic" button does nothing.
Notice that the rendered HTML has the
<span>
for the button repeated twice, once within a div that's displayed, another in a hidden div (via
TwistyPlugin). HTML fails validation due to these
<span>
elements sharing the same
id
.
There are a couple of mismatched
%TMPL:DEF%=/=%TMPL:END%
tags in
NatSkin. Attached a diff fixing them all (I hope).
--
PaulHarvey - 29 Aug 2009
Both
%TWISTYBUTTON%
and JQuery's
%BUTTON%
are trying to set
onClick()
handler for the same element
id
. Perhaps this problem has been masked until now due to a change in the order that JS scripts are being loaded/initialised?...
%BUTTON%
is only required to produce some HTML. The only tricky part is the way JQuery selects icons. The patch I have below hard-codes
FamFamFamSilkIcons
for the icon path.
Also removed some newlines in
NatSkinWebCreateNewTopic.txt
which broke validation (<p/> elements inside <span>).
I briefly looked at modifying
JQueryPlugin/BUTTON.pm
to add a new "type" (none) that would not try to set an
onClick()
handler. Then
EugenMayer suggested we use
bind(click, method)
instead of
.click(method)
, which sounds like a better idea. Being essentially brand new at JS and JQuery in general, I shall leave this for another time...
--
PaulHarvey - 30 Aug 2009
Merged in all of your fixes except the removal of
%BUTTON
from inside the twisty button. I use this construction quite a lot and don't have any problems with it. This might be related to some fixes in the upcoming
JQueryPlugin in that area...
--
MichaelDaum - 31 Aug 2009
No longer an issue using trunk
NatSkin and
JQueryPlugin.
--
PaulHarvey - 09 Oct 2009