Skip to content

Commit

Permalink
Changed the way the polyfills detailssummary was called. Now it's the…
Browse files Browse the repository at this point in the history
… same as the multimedia player.
  • Loading branch information
duboisp committed Aug 21, 2012
1 parent 89b8e34 commit acf3ddb
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions src/js/workers/charts.js
Expand Up @@ -14,6 +14,7 @@
_pe.fn.charts = {
type: 'plugin',
depends: ['raphael'],
polyfills: ['detailssummary'],
_exec: function (elm) {
var options = {},
o,
Expand Down Expand Up @@ -3217,13 +3218,11 @@ label:
$(tblSrcContainerSummary).text((captionParsed.caption ? $(captionParsed.caption).text() + ' ' : '') + _pe.dic.get('%table-mention'))
.appendTo(tblSrcContainer)
.after(self);
// The pe.add._load has already a mecanism to prevent to load the same library
pe.add._load(pe.add.liblocation + 'polyfills/detailssummary' + pe.suffix + '.js');
$(tblSrcContainer).addClass('polyfill');
if (typeof $(tblSrcContainer).details === "function") {
// This means that the default call form when the lib are loaded was happed in the past

if ($('html').hasClass('polyfill-detailssummary')) {
$(tblSrcContainer).details();
}

} else {
// Move the table inside the figure element
$(self).appendTo(paperContainer);
Expand Down

0 comments on commit acf3ddb

Please sign in to comment.