show "close" button in beautifier dialog

fixes #436
This commit is contained in:
tophf 2018-07-22 20:12:42 +03:00
parent 4283cc53a7
commit 7d1bf4119a

View File

@ -35,10 +35,15 @@ function beautify(event) {
<svg class="svg-icon checked"><use xlink:href="#svg-icon-checked"/></svg>` +
t('styleBeautifyIndentConditional') + '</label>' +
'</div>' +
'<div><button role="undo"></button></div>');
`<div class="buttons">
<button role="close" i18n-text="confirmClose"></button>
<button role="undo"></button>
</div>`);
$('#help-popup').className = 'wide';
$('#help-popup button[role="close"]').onclick = showHelp.close;
const undoButton = $('#help-popup button[role="undo"]');
undoButton.textContent = t(scope.length === 1 ? 'undo' : 'undoGlobal');
undoButton.addEventListener('click', () => {