Merge branch 'master' of github.com:h5p/h5p-php-library

content-upgrade-on-upload
Frode Petterson 2018-12-17 10:20:58 +01:00
commit 96694e4c70
1 changed files with 16 additions and 21 deletions

View File

@ -139,14 +139,14 @@ H5P.init = function (target) {
'<div role="button" ' + '<div role="button" ' +
'tabindex="0" ' + 'tabindex="0" ' +
'class="h5p-enable-fullscreen" ' + 'class="h5p-enable-fullscreen" ' +
'aria-label="' + H5P.t('fullscreen') +
'title="' + H5P.t('fullscreen') + '">' + 'title="' + H5P.t('fullscreen') + '">' +
'</div>' + '</div>' +
'</div>') '</div>')
.prependTo($container) .prependTo($container)
.children() .children().click(function () {
.click(function () { H5P.fullScreen($container, instance);
H5P.fullScreen($container, instance); })
})
.keydown(function (e) { .keydown(function (e) {
if (e.which === 32 || e.which === 13) { if (e.which === 32 || e.which === 13) {
H5P.fullScreen($container, instance); H5P.fullScreen($container, instance);
@ -214,7 +214,7 @@ H5P.init = function (target) {
// Auto save current state if supported // Auto save current state if supported
if (H5PIntegration.saveFreq !== false && ( if (H5PIntegration.saveFreq !== false && (
instance.getCurrentState instanceof Function || instance.getCurrentState instanceof Function ||
typeof instance.getCurrentState === 'function')) { typeof instance.getCurrentState === 'function')) {
var saveTimer, save = function () { var saveTimer, save = function () {
@ -569,7 +569,7 @@ H5P.fullScreen = function ($element, instance, exitCallback, body, forceSemiFull
} }
before('h5p-semi-fullscreen'); before('h5p-semi-fullscreen');
var $disable = H5P.jQuery('<div role="button" tabindex="0" class="h5p-disable-fullscreen" title="' + H5P.t('disableFullscreen') + '"></div>').appendTo($container.find('.h5p-content-controls')); var $disable = H5P.jQuery('<div role="button" tabindex="0" class="h5p-disable-fullscreen" title="' + H5P.t('disableFullscreen') + '" aria-label="' + H5P.t('disableFullscreen') + '"></div>').appendTo($container.find('.h5p-content-controls'));
var keyup, disableSemiFullscreen = H5P.exitFullScreen = function () { var keyup, disableSemiFullscreen = H5P.exitFullScreen = function () {
if (prevViewportContent) { if (prevViewportContent) {
// Use content from the previous viewport tag // Use content from the previous viewport tag
@ -924,27 +924,22 @@ H5P.Dialog = function (name, title, content, $element) {
<div class="h5p-inner">\ <div class="h5p-inner">\
<h2>' + title + '</h2>\ <h2>' + title + '</h2>\
<div class="h5p-scroll-content">' + content + '</div>\ <div class="h5p-scroll-content">' + content + '</div>\
<div class="h5p-close" role="button" tabindex="0" title="' + H5P.t('close') + '">\ <div class="h5p-close" role="button" tabindex="0" aria-label="' + H5P.t('close') + '" title="' + H5P.t('close') + '">\
</div>\ </div>\
</div>') </div>')
.insertAfter($element) .insertAfter($element)
.click(function () { .click(function () {
self.close(); self.close();
}) })
.children('.h5p-inner') .children('.h5p-inner').click(function () {
.click(function () { return false;
return false; })
}) .find('.h5p-close').click(function () {
.find('.h5p-close') self.close();
.click(function () { }).end()
self.close(); .find('a').click(function (e) {
}) e.stopPropagation();
.end() }).end()
.find('a')
.click(function (e) {
e.stopPropagation();
})
.end()
.end(); .end();
/** /**