Remove theme styling of popup

pull/20/merge
Frode Petterson 2017-06-20 13:28:15 +02:00
parent 11bc5fa2a2
commit 1ca7cc70f4
3 changed files with 3 additions and 11 deletions

View File

@ -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;
};

View File

@ -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();

View File

@ -5,16 +5,15 @@
*
* @class H5P.MemoryGame.Popup
* @param {H5P.jQuery} $container
* @param {string} [styles]
* @param {Object.<string, string>} l10n
*/
MemoryGame.Popup = function ($container, styles, l10n) {
MemoryGame.Popup = function ($container, l10n) {
/** @alias H5P.MemoryGame.Popup# */
var self = this;
var closed;
var $popup = $('<div class="h5p-memory-pop"><div class="h5p-memory-top"' + (styles ? styles : '') + '></div><div class="h5p-memory-desc"></div><div class="h5p-memory-close" role="button" tabindex="0" title="' + (l10n.closeLabel || 'Close') + '"></div></div>').appendTo($container);
var $popup = $('<div class="h5p-memory-pop"><div class="h5p-memory-top"></div><div class="h5p-memory-desc"></div><div class="h5p-memory-close" role="button" tabindex="0" title="' + (l10n.closeLabel || 'Close') + '"></div></div>').appendTo($container);
var $desc = $popup.find('.h5p-memory-desc');
var $top = $popup.find('.h5p-memory-top');