From 1ca7cc70f474dbd470641e719cf962e53f67868e Mon Sep 17 00:00:00 2001 From: Frode Petterson Date: Tue, 20 Jun 2017 13:28:15 +0200 Subject: [PATCH] Remove theme styling of popup --- card.js | 7 ------- memory-game.js | 2 +- popup.js | 5 ++--- 3 files changed, 3 insertions(+), 11 deletions(-) diff --git a/card.js b/card.js index 9543016..660a9bf 100644 --- a/card.js +++ b/card.js @@ -152,7 +152,6 @@ var styles = { front: '', back: '', - popup: '', backImage: !!backImage }; @@ -167,8 +166,6 @@ styles.back += 'color:' + color + ';' + 'background-color:' + backColor + ';' + 'border-color:' + frontColor +';'; - styles.popup += 'border-color:' + backColor + ';' + - 'background-color:' + shade(color, 90 * invertShades) + ';'; } // Add back image for card @@ -177,7 +174,6 @@ styles.front += backgroundImage; styles.back += backgroundImage; - styles.popup += backgroundImage; } // Prep style attribute @@ -187,9 +183,6 @@ if (styles.back) { styles.back = ' style="' + styles.back + '"'; } - if (styles.popup) { - styles.popup = ' style="' + styles.popup + '"'; - } return styles; }; diff --git a/memory-game.js b/memory-game.js index 9a0e2da..b60a575 100644 --- a/memory-game.js +++ b/memory-game.js @@ -322,7 +322,7 @@ H5P.MemoryGame = (function (EventDispatcher, $) { timer = new MemoryGame.Timer($status.find('.h5p-time-spent')[0]); counter = new MemoryGame.Counter($status.find('.h5p-card-turns')); - popup = new MemoryGame.Popup($container, cardStyles ? cardStyles.popup : undefined, parameters.l10n); + popup = new MemoryGame.Popup($container, parameters.l10n); $container.click(function () { popup.close(); diff --git a/popup.js b/popup.js index ccebb6b..24b2b46 100644 --- a/popup.js +++ b/popup.js @@ -5,16 +5,15 @@ * * @class H5P.MemoryGame.Popup * @param {H5P.jQuery} $container - * @param {string} [styles] * @param {Object.} l10n */ - MemoryGame.Popup = function ($container, styles, l10n) { + MemoryGame.Popup = function ($container, l10n) { /** @alias H5P.MemoryGame.Popup# */ var self = this; var closed; - var $popup = $('
').appendTo($container); + var $popup = $('
').appendTo($container); var $desc = $popup.find('.h5p-memory-desc'); var $top = $popup.find('.h5p-memory-top');