diff --git a/memory-game.js b/memory-game.js index 4b63def..99159a4 100644 --- a/memory-game.js +++ b/memory-game.js @@ -37,7 +37,7 @@ H5P.MemoryGame = (function (EventDispatcher, $) { feedback: 'Good work!', tryAgain: 'Reset', closeLabel: 'Close', - label: 'Memory Game. Find the matching cards.', + label: 'Memory Game. Find the matching cards.', done: 'All of the cards have been found.', cardPrefix: 'Card %num: ', cardUnturned: 'Unturned.', @@ -458,19 +458,32 @@ H5P.MemoryGame = (function (EventDispatcher, $) { appendTo: $bottom }); - $feedback = $('
' + parameters.l10n.feedback + '
').appendTo($bottom); + $feedback = $('
' + ''+ '
').appendTo($bottom); + + if(parameters.behaviour && parameters.behaviour.showFeedback){ + $feedback.find('div#h5p-showFeedback').show(); + } // Add status bar - var $status = $('
' + - '
' + parameters.l10n.timeSpent + ':
' + - '
.
' + - '
' + parameters.l10n.cardTurns + ':
' + - '
0.
' + - '
').appendTo($bottom); + var $status = $('
' + '' + '' + '
').appendTo($bottom); - timer = new MemoryGame.Timer($status.find('time')[0]); - counter = new MemoryGame.Counter($status.find('.h5p-card-turns')); - popup = new MemoryGame.Popup($container, parameters.l10n); + timer = new MemoryGame.Timer($status.find('time')[0]); + counter = new MemoryGame.Counter($status.find('.h5p-card-turns')); + popup = new MemoryGame.Popup($container, parameters.l10n); + + if (parameters.behaviour){ + if(parameters.behaviour.showTime){ + $status.find('div#h5p-showTime').show(); + } + if(parameters.behaviour.showTurns){ + $status.find('div#h5p-showTurns').show(); + } + } $container.click(function () { popup.close();