Commit 5ef9e7d6 authored by Frode Petterson's avatar Frode Petterson

Merge branch '7.x-1.x-dev' into 7.x-1.x

parents 7d4e7a5c e8a948bc
......@@ -40,7 +40,15 @@ function h5p_admin_settings($form, &$form_state) {
)
);
$button_behaviours = array(
$button_behaviours_download = array(
H5PDisplayOptionBehaviour::NEVER_SHOW => t('Never'),
H5PDisplayOptionBehaviour::ALWAYS_SHOW => t('Always '),
H5PDisplayOptionBehaviour::CONTROLLED_BY_PERMISSIONS => t('Only if permitted through permissions'),
H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_ON => t('Controlled by author, default is on'),
H5PDisplayOptionBehaviour::CONTROLLED_BY_AUTHOR_DEFAULT_OFF => t('Controlled by author, default is off'),
);
$button_behaviours_embed = array(
H5PDisplayOptionBehaviour::NEVER_SHOW => t('Never show'),
H5PDisplayOptionBehaviour::ALWAYS_SHOW => t('Always show'),
H5PDisplayOptionBehaviour::CONTROLLED_BY_PERMISSIONS => t('Show only if permitted through permissions'),
......@@ -50,14 +58,14 @@ function h5p_admin_settings($form, &$form_state) {
_h5p_add_display_option($form['h5p_display_options'], 'h5p_frame', t('Display buttons (download, embed and copyright)'), variable_get('h5p_frame', TRUE), '.form-item-h5p-export, .form-item-h5p-embed, .form-item-h5p-copyright, .form-item-h5p-icon');
$form['h5p_display_options']['h5p_export'] = array(
'#title' => t('Download button'),
'#options' => $button_behaviours,
'#title' => t('Allow download'),
'#options' => $button_behaviours_download,
'#default_value' => variable_get('h5p_export', H5PDisplayOptionBehaviour::ALWAYS_SHOW),
'#type' => 'select',
);
$form['h5p_display_options']['h5p_embed'] = array(
'#title' => t('Embed button'),
'#options' => $button_behaviours,
'#options' => $button_behaviours_embed,
'#default_value' => variable_get('h5p_embed', H5PDisplayOptionBehaviour::ALWAYS_SHOW),
'#type' => 'select',
);
......@@ -634,6 +642,9 @@ function h5p_content_upgrade($library_id) {
'errorScript' => t('Could not load upgrades script for %lib.'),
'errorContent' => t('Could not upgrade content %id:'),
'errorParamsBroken' => t('Parameters are broken.'),
'errorLibrary' => t('Missing required library %lib.'),
'errorTooHighVersion' => t('Parameters contain %used while only %supported or earlier are supported.'),
'errorNotSupported' => t('Parameters contain %used which is not supported.'),
'done' => t('You have successfully upgraded %num.', array('%num' => $contents_plural)) . ($return ? ' ' . l(t('Return'), $return) : ''),
'library' => array(
'name' => $library->name,
......@@ -724,20 +735,37 @@ function h5p_content_upgrade_progress($library_id) {
}
}
// Determine if any content has been skipped during the process
$skipped = filter_input(INPUT_POST, 'skipped');
if ($skipped !== NULL) {
$out->skipped = json_decode($skipped);
// Clean up input, only numbers
foreach ($out->skipped as $i => $id) {
$out->skipped[$i] = intval($id);
}
$skipped = implode(',', $out->skipped);
}
else {
$out->skipped = array();
}
// Get number of contents for this library
$out->left = $interface->getNumContent($library_id);
$out->left = $interface->getNumContent($library_id, $skipped);
if ($out->left) {
$skip_query = empty($skipped) ? '' : " AND h.content_id NOT IN ($skipped)";
// Find the 10 first contents using library and add to params
$contents = db_query(
"SELECT h.content_id AS id,
h.json_content AS params,
n.title,
h.authors, h.source, h.license, h.license_version, h.license_extras,
h.year_from, h.year_to, h.changes, h.author_comments
h.year_from, h.year_to, h.changes, h.author_comments, h.default_language
FROM {h5p_nodes} h
JOIN {node} n ON n.nid = h.nid
WHERE h.main_library_id = :id
{$skip_query}
LIMIT 40",
array(':id' => $library_id));
......@@ -771,10 +799,6 @@ function h5p_content_upgrade_library($name, $major, $minor) {
$core = _h5p_get_instance('core');
$library->semantics = $core->loadLibrarySemantics($library->name, $library->version->major, $library->version->minor);
if ($library->semantics === NULL) {
drupal_not_found();
exit;
}
if ($core->development_mode & H5PDevelopment::MODE_LIBRARY) {
$dev_lib = $core->h5pD->getLibrary($library->name, $library->version->major, $library->version->minor);
......
......@@ -831,7 +831,8 @@ class H5PDrupal implements H5PFrameworkInterface {
hn.year_from AS meta_year_from,
hn.year_to AS meta_year_to,
hn.changes AS meta_changes,
hn.author_comments AS meta_author_comments
hn.author_comments AS meta_author_comments,
hn.default_language AS meta_default_language
FROM {h5p_nodes} hn
JOIN {node} n ON n.nid = hn.nid
JOIN {h5p_libraries} hl ON hl.library_id = hn.main_library_id
......@@ -847,7 +848,7 @@ class H5PDrupal implements H5PFrameworkInterface {
// Build metadata object
$content->metadata = array();
foreach(array('authors', 'source', 'license', 'license_version', 'license_extras' ,'year_from', 'year_to', 'changes', 'author_comments') as $value) {
foreach(array('authors', 'source', 'license', 'license_version', 'license_extras' ,'year_from', 'year_to', 'changes', 'author_comments', 'default_language') as $value) {
$lookup = 'meta_' . $value;
if (isset($content->$lookup)) {
$content->metadata[$value] = $content->$lookup;
......@@ -981,8 +982,9 @@ class H5PDrupal implements H5PFrameworkInterface {
/**
* Implements getNumContent.
*/
public function getNumContent($library_id) {
return intval(db_query('SELECT COUNT(content_id) FROM {h5p_nodes} WHERE main_library_id = :id', array(':id' => $library_id))->fetchField());
public function getNumContent($library_id, $skip = NULL) {
$skip_query = empty($skip) ? '' : " AND content_id NOT IN ($skip)";
return intval(db_query('SELECT COUNT(content_id) FROM {h5p_nodes} WHERE main_library_id = :id' . $skip_query, array(':id' => $library_id))->fetchField());
}
/**
......@@ -1030,6 +1032,7 @@ class H5PDrupal implements H5PFrameworkInterface {
public function hasPermission($permission, $content_id = NULL) {
switch ($permission) {
case H5PPermission::DOWNLOAD_H5P:
case H5PPermission::COPY_H5P:
return $content_id !== NULL && (
user_access('download all h5ps') ||
(self::mayCurrentUserUpdateNode($content_id) && user_access('download own h5ps'))
......@@ -1093,4 +1096,23 @@ class H5PDrupal implements H5PFrameworkInterface {
->execute();
}
}
/**
* Implements libraryHasUpgrade
*/
public function libraryHasUpgrade($library) {
return !!db_query(
"SELECT library_id
FROM {h5p_libraries}
WHERE machine_name = :name
AND (major_version > :major
OR (major_version = :major AND minor_version > :minor))
LIMIT 1",
array(
':name' => $library['machineName'],
':major' => $library['majorVersion'],
':minor' => $library['minorVersion']
)
)->fetchField();
}
}
......@@ -609,6 +609,11 @@ function h5p_schema() {
'type' => 'varchar',
'length' => 127,
'not null' => TRUE
),
'default_language' => array(
'description' => 'Default language for common fields',
'type' => 'varchar',
'length' => 32
)
),
'primary key' => array('content_id'),
......@@ -1781,3 +1786,16 @@ function h5p_update_7121() {
->condition('status', 0)
->execute();
}
/**
* Add default language to nodes
*/
function h5p_update_7122() {
if (!db_field_exists('h5p_nodes', 'default_language')) {
db_add_field('h5p_nodes', 'default_language', array(
'description' => 'Default language for common fields',
'type' => 'varchar',
'length' => 32
));
}
}
......@@ -417,7 +417,7 @@ function _h5p_form_submit($form, &$form_state) {
function _h5p_get_disable_labels() {
return array(
H5PCore::DISPLAY_OPTION_FRAME => t('Display buttons (download, embed and copyright)'),
H5PCore::DISPLAY_OPTION_DOWNLOAD => t('Download button'),
H5PCore::DISPLAY_OPTION_DOWNLOAD => t('Allow download'),
H5PCore::DISPLAY_OPTION_EMBED => t('Embed button'),
H5PCore::DISPLAY_OPTION_COPYRIGHT => t('Copyright button'),
H5PCore::DISPLAY_OPTION_ABOUT => t('About H5P button')
......@@ -459,6 +459,17 @@ function h5p_validate($node, &$form) {
if (isset($_SESSION['h5p_upload'])) {
$h5p_validator = _h5p_get_instance('validator');
$valid = $h5p_validator->isValidPackage();
foreach ($h5p_validator->h5pC->mainJsonData['preloadedDependencies'] as $dep) {
if ($dep['machineName'] === $h5p_validator->h5pC->mainJsonData['mainLibrary']) {
if ($h5p_validator->h5pF->libraryHasUpgrade($dep)) {
// We do not allow storing old content due to security concerns
form_set_error('h5p', t("You're trying to upload content of an older version of H5P. Please upgrade the content on the server it originated from and try to upload again or turn on the H5P Hub to have this server upgrade it for your automaticall."));
break;
}
}
}
if (!$valid) {
form_set_error('h5p', t('The uploaded file was not a valid H5P package'));
// Nothing is valid, nothing is kept.
......@@ -867,6 +878,8 @@ function h5p_get_core_settings() {
'reportingIsEnabled' => $enableReportingFeatures,
'crossorigin' => variable_get('h5p_crossorigin', NULL),
'libraryConfig' => $core->h5pF->getLibraryConfig(),
'pluginCacheBuster' => '?' . variable_get('css_js_query_string', ''),
'libraryUrl' => url(drupal_get_path('module', 'h5p') . '/library/js')
);
if ($user->uid) {
......
......@@ -458,6 +458,24 @@ class H5PDefaultStorage implements \H5PFileStorage {
return file_exists($filePath);
}
/**
* Check if upgrades script exist for library.
*
* @param string $machineName
* @param int $majorVersion
* @param int $minorVersion
* @return string Relative path
*/
public function getUpgradeScript($machineName, $majorVersion, $minorVersion) {
$upgrades = "/libraries/{$machineName}-{$majorVersion}.{$minorVersion}/upgrades.js";
if (file_exists($this->path . $upgrades)) {
return $upgrades;
}
else {
return NULL;
}
}
/**
* Recursive function for copying directories.
*
......
......@@ -199,4 +199,14 @@ interface H5PFileStorage {
* @return bool
*/
public function hasPresave($libraryName, $developmentPath = null);
/**
* Check if upgrades script exist for library.
*
* @param string $machineName
* @param int $majorVersion
* @param int $minorVersion
* @return string Relative path
*/
public function getUpgradeScript($machineName, $majorVersion, $minorVersion);
}
......@@ -40,6 +40,10 @@ abstract class H5PMetadata {
),
'yearTo' => array(
'type' => 'int'
),
'defaultLanguage' => array(
'type' => 'text',
'maxLength' => 32,
)
);
......@@ -61,6 +65,7 @@ abstract class H5PMetadata {
',"yearFrom":' . (isset($content->year_from) ? $content->year_from : 'null') .
',"yearTo":' . (isset($content->year_to) ? $content->year_to : 'null') .
',"changes":' . (isset($content->changes) ? $content->changes : 'null') .
',"defaultLanguage":' . (isset($content->default_language) ? $content->default_language : 'null') .
',"authorComments":' . (isset($content->author_comments) ? json_encode($content->author_comments) : 'null') . '}';
}
......
......@@ -537,9 +537,10 @@ interface H5PFrameworkInterface {
* Get number of contents using library as main library.
*
* @param int $libraryId
* @param array $skip
* @return int
*/
public function getNumContent($libraryId);
public function getNumContent($libraryId, $skip = NULL);
/**
* Determines if content slug is used.
......@@ -614,6 +615,14 @@ interface H5PFrameworkInterface {
* containing the new content type cache that should replace the old one.
*/
public function replaceContentTypeCache($contentTypeCache);
/**
* Checks if the given library has a higher version.
*
* @param array $library
* @return boolean
*/
public function libraryHasUpgrade($library);
}
/**
......@@ -919,11 +928,27 @@ class H5PValidator {
}
if (!empty($missingLibraries)) {
foreach ($missingLibraries as $libString => $library) {
$this->h5pF->setErrorMessage($this->h5pF->t('Missing required library @library', array('@library' => $libString)), 'missing-required-library');
// We still have missing libraries, check if our main library has an upgrade (BUT only if we has content)
$mainDependency = NULL;
if (!$skipContent && !empty($mainH5PData)) {
foreach ($mainH5PData['preloadedDependencies'] as $dep) {
if ($dep['machineName'] === $mainH5PData['mainLibrary']) {
$mainDependency = $dep;
}
}
}
if (!$this->h5pC->mayUpdateLibraries()) {
$this->h5pF->setInfoMessage($this->h5pF->t("Note that the libraries may exist in the file you uploaded, but you're not allowed to upload new libraries. Contact the site administrator about this."));
if ($skipContent || !$mainDependency || !$this->h5pF->libraryHasUpgrade(array(
'machineName' => $mainDependency['mainLibrary'],
'majorVersion' => $mainDependency['majorVersion'],
'minorVersion' => $mainDependency['minorVersion']
))) {
foreach ($missingLibraries as $libString => $library) {
$this->h5pF->setErrorMessage($this->h5pF->t('Missing required library @library', array('@library' => $libString)), 'missing-required-library');
}
if (!$this->h5pC->mayUpdateLibraries()) {
$this->h5pF->setInfoMessage($this->h5pF->t("Note that the libraries may exist in the file you uploaded, but you're not allowed to upload new libraries. Contact the site administrator about this."));
}
}
}
$valid = empty($missingLibraries) && $valid;
......@@ -1646,7 +1671,7 @@ Class H5PExport {
'embedTypes' => $embedTypes
);
foreach(array('authors', 'source', 'license', 'licenseVersion', 'licenseExtras' ,'yearFrom', 'yearTo', 'changes', 'authorComments') as $field) {
foreach(array('authors', 'source', 'license', 'licenseVersion', 'licenseExtras' ,'yearFrom', 'yearTo', 'changes', 'authorComments', 'defaultLanguage') as $field) {
if (isset($content['metadata'][$field]) && $content['metadata'][$field] !== '') {
if (($field !== 'authors' && $field !== 'changes') || (count($content['metadata'][$field]) > 0)) {
$h5pJson[$field] = json_decode(json_encode($content['metadata'][$field], TRUE));
......@@ -1815,6 +1840,7 @@ abstract class H5PPermission {
const CREATE_RESTRICTED = 2;
const UPDATE_LIBRARIES = 3;
const INSTALL_RECOMMENDED = 4;
const COPY_H5P = 8;
}
abstract class H5PDisplayOptionBehaviour {
......@@ -1885,6 +1911,7 @@ class H5PCore {
const DISPLAY_OPTION_EMBED = 'embed';
const DISPLAY_OPTION_COPYRIGHT = 'copyright';
const DISPLAY_OPTION_ABOUT = 'icon';
const DISPLAY_OPTION_COPY = 'copy';
// Map flags to string
public static $disable = array(
......@@ -1922,8 +1949,6 @@ class H5PCore {
$this->relativePathRegExp = '/^((\.\.\/){1,2})(.*content\/)?(\d+|editor)\/(.+)$/';
}
/**
* Save content and clear cache.
*
......@@ -2875,6 +2900,7 @@ class H5PCore {
$display_options[self::DISPLAY_OPTION_COPYRIGHT] = false;
}
}
$display_options[self::DISPLAY_OPTION_COPY] = $this->h5pF->hasPermission(H5PPermission::COPY_H5P, $id);
return $display_options;
}
......@@ -3288,6 +3314,9 @@ class H5PCore {
'license' => $this->h5pF->t('License'),
'thumbnail' => $this->h5pF->t('Thumbnail'),
'noCopyrights' => $this->h5pF->t('No copyright information available for this content.'),
'reuse' => $this->h5pF->t('Reuse'),
'reuseContent' => $this->h5pF->t('Reuse Content'),
'reuseDescription' => $this->h5pF->t('Reuse this content.'),
'downloadDescription' => $this->h5pF->t('Download this content as a H5P file.'),
'copyrightsDescription' => $this->h5pF->t('View copyright information for this content.'),
'embedDescription' => $this->h5pF->t('View the embed code for this content.'),
......@@ -3325,6 +3354,7 @@ class H5PCore {
'contentType' => $this->h5pF->t('Content Type'),
'licenseExtras' => $this->h5pF->t('License Extras'),
'changes' => $this->h5pF->t('Changelog'),
'contentCopied' => $this->h5pF->t('Content is copied to the clipboard'),
);
}
}
......@@ -4545,6 +4575,11 @@ class H5PContentValidator {
'type' => 'text',
'widget' => 'none'
),
(object) array(
'name' => 'defaultLanguage',
'type' => 'text',
'widget' => 'none'
)
);
return $semantics;
......
......@@ -57,9 +57,9 @@ H5P.ActionBar = (function ($, EventDispatcher) {
};
// Register action bar buttons
if (displayOptions.export) {
if (displayOptions.export || displayOptions.copy) {
// Add export button
addActionButton('download', 'export');
addActionButton('reuse', 'export');
}
if (displayOptions.copyright) {
addActionButton('copyrights');
......
......@@ -27,6 +27,7 @@ H5P.ContentUpgradeProcess = (function (Version) {
self.loadLibrary = loadLibrary;
self.upgrade(name, oldVersion, newVersion, params.params, params.metadata, function (err, upgradedParams, upgradedMetadata) {
if (err) {
err.id = id;
return done(err);
}
......@@ -53,6 +54,12 @@ H5P.ContentUpgradeProcess = (function (Version) {
if (err) {
return done(err);
}
if (library.semantics === null) {
return done({
type: 'libraryMissing',
library: library.name + ' ' + library.version.major + '.' + library.version.minor
});
}
// Run upgrade routines on params
self.processParams(library, oldVersion, newVersion, params, metadata, function (err, params, metadata) {
......@@ -176,7 +183,11 @@ H5P.ContentUpgradeProcess = (function (Version) {
var usedVer = new Version(usedLib[1]);
var availableVer = new Version(availableLib[1]);
if (usedVer.major > availableVer.major || (usedVer.major === availableVer.major && usedVer.minor >= availableVer.minor)) {
return done(); // Larger or same version that's available
return done({
type: 'errorTooHighVersion',
used: usedLib[0] + ' ' + usedVer,
supported: availableLib[0] + ' ' + availableVer
}); // Larger or same version that's available
}
// A newer version is available, upgrade params
......@@ -192,7 +203,12 @@ H5P.ContentUpgradeProcess = (function (Version) {
});
}
}
done();
// Content type was not supporte by the higher version
done({
type: 'errorNotSupported',
used: usedLib[0] + ' ' + usedVer
});
break;
case 'group':
......
/* global H5PAdminIntegration H5PUtils */
(function ($, Version) {
var info, $container, librariesCache = {}, scriptsCache = {};
var info, $log, $container, librariesCache = {}, scriptsCache = {};
// Initialize
$(document).ready(function () {
......@@ -9,7 +9,9 @@
info = H5PAdminIntegration.libraryInfo;
// Get and reset container
$container = $('#h5p-admin-container').html('<p>' + info.message + '</p>');
const $wrapper = $('#h5p-admin-container').html('');
$log = $('<ul class="content-upgrade-log"></ul>').appendTo($wrapper);
$container = $('<div><p>' + info.message + '</p></div>').appendTo($wrapper);
// Make it possible to select version
var $version = $(getVersionSelect(info.versions)).appendTo($container);
......@@ -120,9 +122,7 @@
},
error: function (error) {
self.printError(error.err);
// Stop everything
self.terminate();
self.workDone(error.id, null, this);
},
loadLibrary: function (details) {
var worker = this;
......@@ -184,7 +184,7 @@
self.token = inData.token;
// Start processing
self.processBatch(inData.params);
self.processBatch(inData.params, inData.skipped);
});
};
......@@ -202,11 +202,12 @@
*
* @param {Object} parameters
*/
ContentUpgrade.prototype.processBatch = function (parameters) {
ContentUpgrade.prototype.processBatch = function (parameters, skipped) {
var self = this;
// Track upgraded params
self.upgraded = {};
self.skipped = skipped;
// Track current batch
self.parameters = parameters;
......@@ -276,7 +277,7 @@
}, function done(err, result) {
if (err) {
self.printError(err);
return ;
result = null;
}
self.workDone(id, result);
......@@ -291,7 +292,12 @@
var self = this;
self.working--;
self.upgraded[id] = result;
if (result === null) {
self.skipped.push(id);
}
else {
self.upgraded[id] = result;
}
// Update progress message
self.throbber.setProgress(Math.round((info.total - self.left + self.current) / (info.total / 100)) + ' %');
......@@ -302,6 +308,7 @@
self.nextBatch({
libraryId: self.version.libraryId,
token: self.token,
skipped: JSON.stringify(self.skipped),
params: JSON.stringify(self.upgraded)
});
}
......@@ -410,14 +417,29 @@
ContentUpgrade.prototype.printError = function (error) {
var self = this;
if (error.type === 'errorParamsBroken') {
error = info.errorContent.replace('%id', error.id) + ' ' + info.errorParamsBroken;
}
else if (error.type === 'scriptMissing') {
error = info.errorScript.replace('%lib', error.library);
switch (error.type) {
case 'errorParamsBroken':
error = info.errorContent.replace('%id', error.id) + ' ' + info.errorParamsBroken;
break;
case 'libraryMissing':
error = info.errorLibrary.replace('%lib', error.library);
break;
case 'scriptMissing':
error = info.errorScript.replace('%lib', error.library);
break;
case 'errorTooHighVersion':
error = info.errorContent.replace('%id', error.id) + ' ' + info.errorTooHighVersion.replace('%used', error.used).replace('%supported', error.supported);
break;
case 'errorNotSupported':
error = info.errorContent.replace('%id', error.id) + ' ' + info.errorNotSupported.replace('%used', error.used);
break;
}
self.setStatus('<p>' + info.error + '<br/>' + error + '</p>');
$('<li>' + info.error + '<br/>' + error + '</li>').appendTo($log);
};
})(H5P.jQuery, H5P.Version);
......@@ -7,11 +7,24 @@ H5P.Version = (function () {
* @param {String} version
*/
function Version(version) {
var versionSplit = version.split('.', 3);
// Public
this.major =+ versionSplit[0];
this.minor =+ versionSplit[1];
if (typeof version === 'string') {
// Name version string (used by content upgrade)
var versionSplit = version.split('.', 3);
this.major =+ versionSplit[0];
this.minor =+ versionSplit[1];
}
else {
// Library objects (used by editor)
if (version.localMajorVersion !== undefined) {
this.major =+ version.localMajorVersion;
this.minor =+ version.localMinorVersion;
}
else {
this.major =+ version.majorVersion;
this.minor =+ version.minorVersion;
}
}
/**
* Public. Custom string for this object.
......
This diff is collapsed.
......@@ -339,3 +339,6 @@ button.h5p-admin.disabled:hover {
.h5p-data-view .h5p-facet-tag > span:active {
color: #d20000;
}
.content-upgrade-log {
color: red;
}
......@@ -3,11 +3,11 @@
/* Custom H5P font to use for icons. */
@font-face {
font-family: 'h5p';
src: url('../fonts/h5p-core-19.eot?cb8kvi');
src: url('../fonts/h5p-core-19.eot?cb8kvi#iefix') format('embedded-opentype'),
url('../fonts/h5p-core-19.ttf?cb8kvi') format('truetype'),
url('../fonts/h5p-core-19.woff?cb8kvi') format('woff'),
url('../fonts/h5p-core-19.svg?cb8kvi#h5p') format('svg');
src: url('../fonts/h5p-core-20.eot?cb8kvi');
src: url('../fonts/h5p-core-20.eot?cb8kvi#iefix') format('embedded-opentype'),
url('../fonts/h5p-core-20.ttf?cb8kvi') format('truetype'),
url('../fonts/h5p-core-20.woff?cb8kvi') format('woff'),
url('../fonts/h5p-core-20.svg?cb8kvi#h5p') format('svg');
font-weight: normal;
font-style: normal;
}
......@@ -228,7 +228,7 @@ div.h5p-fullscreen {
padding-right: 0;
}
.h5p-actions > .h5p-button.h5p-export:before {
content: "\e893";
content: "\e90b";
}
.h5p-actions > .h5p-button.h5p-copyrights:before {
content: "\e88f";
......@@ -260,7 +260,7 @@ div.h5p-fullscreen {
top: 0;
left: 0;
width: 100%;
height: 100%;
min-height: 100%;
z-index: 100;
padding: 2em;
box-sizing: border-box;
......@@ -297,13 +297,19 @@ div.h5p-fullscreen {
padding: 0.325em 0.5em 0.25em;
line-height: 1.25em;
border-bottom: 1px solid #ccc;
z-index: 2;
}
.h5p-embed-dialog .h5p-inner {
width: 300px;
.h5p-popup-dialog .h5p-inner > h2 > a {
font-size: 12px;
margin-left: 1em;
}
.h5p-embed-dialog .h5p-inner,
.h5p-reuse-dialog .h5p-inner,
.h5p-content-user-data-reset-dialog .h5p-inner {
width: 316px;
left: 50%;
top: 50%;
margin: 0 0 0 -150px;
transition: margin 250ms linear 100ms;
margin: 0 0 0 -158px;
}
.h5p-embed-dialog .h5p-embed-code-container,
.h5p-embed-size {
......@@ -339,11 +345,14 @@ div.h5p-fullscreen {
padding: 1em;
box-sizing: border-box;
-moz-box-sizing: border-box;
height: 100%;
color: #555555;
z-index: 1;
}
.h5p-popup-dialog.h5p-open .h5p-scroll-content {
overflow: auto;
overflow-x: hidden;
overflow-y: auto;
color: #555555;
height: 100%;
}
.h5p-popup-dialog .h5p-scroll-content::-webkit-scrollbar {
width: 8px;
......@@ -357,7 +366,6 @@ div.h5p-fullscreen {