Commit 4ebba2c7 authored by Jim Tittsler's avatar Jim Tittsler

Copy iDevice IDs into oeru_idevice shortcode.

Resolves #27
parent 61018a13
......@@ -244,7 +244,9 @@ module.exports = {
var classes, $inner, $idtitle, idtitle, idbody, idclasses,
idquizzes = '',
idtype = $(this).data('iDevice'),
idtheme = $(this).data('theme') || 'line';
idtheme = $(this).data('theme') || 'line',
idid = $(this).attr('id'),
ididStr = (idid) ? ` id="${idid}"` : '';
idtheme = idtheme.toLowerCase();
if (!idtype) {
......@@ -303,7 +305,7 @@ module.exports = {
idtitle = $.trim(idtitle);
idbody = $(this).find('table:first tr td').html();
}
$(this).replaceWith(`[oeru_idevice type='${idtype}' title=${quotedWPstring(idtitle)}${idclasses}]
$(this).replaceWith(`[oeru_idevice${ididStr} type='${idtype}' title=${quotedWPstring(idtitle)}${idclasses}]
${idbody}
[/oeru_idevice]${idquizzes}
`);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment