Item9457: BUTTON problems

pencil
Priority: Normal
Current State: Closed
Released In: 1.1.0
Target Release: minor
Applies To: Extension
Component: JQueryPlugin
Branches:
Reported By: PaulHarvey
Waiting For:
Last Change By: KennethLavrsen

Emits invalid XHTML

Foswiki's standard DOCTYPE doesn't permit data attributes on elements. I'm curious about the BUTTON HTML generated - is there a reason why the JS here is inside a data attribute and not an onClick attribute?

data="{onclick:function(){;jQuery(this).parents('form:first').submit();return false;}}

Duplicate ids

Reviewing FrequentlyAskedQuestions, the two occurances of BUTTON both are generated with the same ID number. This I suspect I can probably fix if somebody doesn't beat me to it.

-- PaulHarvey - 11 Aug 2010

Michael, set waiting for you re: using data attribute to hold the js instead of in an onclick attribute

-- PaulHarvey - 11 Aug 2010

The two occurrances of the same ID stem from the fact that TwistyPlugin dupplicates the text in the link. That's bad in itself. With it goes the ID of the button element inside.

The data attribute is quite simple to remove. This is metadata for the button's js initializer . It could simply be moved into the class attribute (see BUTTON.pm) and extracted from the class attribute in jquery.button.init.js.

-- MichaelDaum - 11 Aug 2010

Fixed.

-- MichaelDaum - 20 Aug 2010

 

ItemTemplate edit

Summary BUTTON problems
ReportedBy PaulHarvey
Codebase trunk
SVN Range
AppliesTo Extension
Component JQueryPlugin
Priority Normal
CurrentState Closed
WaitingFor
Checkins distro:050e1821c43b
TargetRelease minor
ReleasedIn 1.1.0
Topic revision: r5 - 22 Sep 2010, KennethLavrsen
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy