NOTE: If you are a developer, please use a private wiki based on foswiki/trunk on a daily base ...or use trunk.foswiki.org to view this page for some minimal testing.
Use Item9693 for docu changes for 1.2 and 2.0.

Item10858: can't extract metadata stored in html5 data- attributes

Priority: CurrentState: AppliesTo: Component: WaitingFor:
Urgent Closed Extension JQueryPlugin  
The examples in the plugin's code even don't work. This test fails:

%STARTSECTION{"test"}%

<p id='one' class='some_class' data-item_id='1' data-item_label='Label'>This is a p</p>
<script>
jQuery(function($) {
  var opts = $("#one").metadata({type:'html5'});
  console.log(opts);
});
</script>

%ENDSECTION{"test"}%

This is a p

... with an "Uncaught ReferenceError: Label is not defined" javascript error. That's because the code tries to eval(Label) to create a json object from it.

Changes are tracked at https://github.com/MichaelDaum/jquery-metadata. A pull request has been filed upstream.

-- MichaelDaum - 08 Jun 2011

 

ItemTemplate edit

Summary can't extract metadata stored in html5 data- attributes
ReportedBy MichaelDaum
Codebase 1.1.3, trunk
SVN Range
AppliesTo Extension
Component JQueryPlugin
Priority Urgent
CurrentState Closed
WaitingFor
Checkins Foswikirev:11873 Foswikirev:11874
TargetRelease patch
ReleasedIn 1.1.4
Topic revision: r4 - 17 Dec 2011, GeorgeClark
 
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. see CopyrightStatement. Creative Commons LicenseGet Foswiki at sourceforge.net. Fast, secure and Free Open Source software downloads