Skip to content
Snippets Groups Projects
Commit 981faad1 authored by Pregmodder's avatar Pregmodder
Browse files

Merge branch 'fixes' into 'pregmod-master'

More fixes for the options macro

See merge request pregmodfan/fc-pregmod!4364
parents 489f553b 1414380d
No related branches found
No related tags found
No related merge requests found
...@@ -157,7 +157,7 @@ Macro.add('options', { ...@@ -157,7 +157,7 @@ Macro.add('options', {
onClickChange = onClickChange ? ', ' + onClickChange : ''; onClickChange = onClickChange ? ', ' + onClickChange : '';
output += `<span class=${className}>[[${argText}${extraComment}|${passageName}][${variable}=${JSON.stringify(args[hasComparitor ? 1 : 0])}${onClickChange}]]</span>`; output += `<span class=${className}>[[${argText}${extraComment}|${passageName}][${variable}=${JSON.stringify(args[hasComparitor ? 1 : 0])}${onClickChange}]]</span>`;
} else if (showSelectedOption) { } else if (showSelectedOption) {
output += `<span class=${optionMacroSelected}${className}>${argText}${extraComment}</span>`; output += `<span class="optionMacroSelected ${className}">${argText}${extraComment}</span>`;
} }
} }
} else if (this.payload[i].name === 'comment') { } else if (this.payload[i].name === 'comment') {
...@@ -165,9 +165,10 @@ Macro.add('options', { ...@@ -165,9 +165,10 @@ Macro.add('options', {
} }
} }
jQuery(this.output).wiki( jQuery(this.output).wiki(
`<span class=optionMacro ${currentOptionIsNumber ? 'optionMacroNumber' : ``}>` + `<span class="optionMacro ${currentOptionIsNumber ? 'optionMacroNumber' : ''}">` +
`<span class=optionDescription> ${title} ${description} </span>` + `<span class="optionDescription">${title} ${description} </span>` +
`<span class=optionValue> ${output} </span> ${comment ? `<span class=optionComment>// ${comment} //</span>` : ``}` + `<span class="optionValue">${output}</span>` +
`${comment ? '<span class="optionComment">//${comment}//</span>' : ''}` +
`</span>`); `</span>`);
} catch (ex) { } catch (ex) {
return this.error('bad options expression: ' + ex.message); return this.error('bad options expression: ' + ex.message);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment