diff --git a/ui/puzzle/src/ctrl.ts b/ui/puzzle/src/ctrl.ts index f8c135da6ee7..da79702313fe 100755 --- a/ui/puzzle/src/ctrl.ts +++ b/ui/puzzle/src/ctrl.ts @@ -514,7 +514,14 @@ export default class PuzzleCtrl implements ParentCtrl { } }; + + private reportDialog = (reason: string) => { + // write switch button as raw html + const switchButton = `
` + + `` + + ``; + // html form yes/no report with a checkbox 'do not show this again for a week' domDialog({ htmlText: @@ -523,12 +530,15 @@ export default class PuzzleCtrl implements ParentCtrl { '

' + '
' +
         'You have found a puzzle with multiple solutions, report it?' +
-        '

' + + '
' + switchButton + '

' + `` + ``, }).then(dlg => { - console.log('dlg', dlg); + // FIXME this make the whole page crash, why? + $('#puzzle-toggle-report', dlg.view).on('click', () => { + console.log() + }); $('.reset', dlg.view).on('click', () => dlg.close()); $('.apply', dlg.view).on('click', () => { console.log('clicked apply');