Compare commits

...

7 Commits

Author SHA1 Message Date
Ravi Majithia c79f97a16f
JI-2872 Fix h5p content font size in safari ios devices (#114) 2022-01-05 09:24:39 +01:00
Oliver Tacke d3d003e978
HFP-3465 Fix line breaks breaking metadata field validation (#109)
* Fix linebreaks breaking metadata field validation
* HFP-3465 Use "single line" flag for regexp
2021-12-21 23:45:32 +01:00
Ravi Majithia 22115c0aea
JI-2899 Add aria label to width and height for embed popup (#110) 2021-11-10 12:47:39 +01:00
Erik Langhaug aaf26d584b Merge branch 'master' into JI-2176-tutorial-example-links-new-design 2021-07-01 10:40:04 +02:00
Frode Petterson eeefc1228b
Merge pull request #85 from otacke/add-gltf-file-format
Add gltf to list of allowed file extensions
2021-06-17 13:07:56 +02:00
Oliver Tacke a80773e8d6
Add binary variant of glTF files
glTF files can also be compressed making them smaller
2020-05-30 12:50:37 +02:00
Oliver Tacke ce373203b0 Add gltf to list of allowed file extensions 2020-05-23 17:27:56 +02:00
3 changed files with 9 additions and 6 deletions

View File

@ -704,15 +704,15 @@ class H5PValidator {
'source' => '/^(http[s]?:\/\/.+)$/', 'source' => '/^(http[s]?:\/\/.+)$/',
'license' => '/^(CC BY|CC BY-SA|CC BY-ND|CC BY-NC|CC BY-NC-SA|CC BY-NC-ND|CC0 1\.0|GNU GPL|PD|ODC PDDL|CC PDM|U|C)$/', 'license' => '/^(CC BY|CC BY-SA|CC BY-ND|CC BY-NC|CC BY-NC-SA|CC BY-NC-ND|CC0 1\.0|GNU GPL|PD|ODC PDDL|CC PDM|U|C)$/',
'licenseVersion' => '/^(1\.0|2\.0|2\.5|3\.0|4\.0)$/', 'licenseVersion' => '/^(1\.0|2\.0|2\.5|3\.0|4\.0)$/',
'licenseExtras' => '/^.{1,5000}$/', 'licenseExtras' => '/^.{1,5000}$/s',
'yearsFrom' => '/^([0-9]{1,4})$/', 'yearsFrom' => '/^([0-9]{1,4})$/',
'yearsTo' => '/^([0-9]{1,4})$/', 'yearsTo' => '/^([0-9]{1,4})$/',
'changes' => array( 'changes' => array(
'date' => '/^[0-9]{2}-[0-9]{2}-[0-9]{2} [0-9]{1,2}:[0-9]{2}:[0-9]{2}$/', 'date' => '/^[0-9]{2}-[0-9]{2}-[0-9]{2} [0-9]{1,2}:[0-9]{2}:[0-9]{2}$/',
'author' => '/^.{1,255}$/', 'author' => '/^.{1,255}$/',
'log' => '/^.{1,5000}$/' 'log' => '/^.{1,5000}$/s'
), ),
'authorComments' => '/^.{1,5000}$/', 'authorComments' => '/^.{1,5000}$/s',
'w' => '/^[0-9]{1,4}$/', 'w' => '/^[0-9]{1,4}$/',
'h' => '/^[0-9]{1,4}$/', 'h' => '/^[0-9]{1,4}$/',
// deprecated // deprecated
@ -2083,7 +2083,7 @@ class H5PCore {
'js/h5p-utils.js', 'js/h5p-utils.js',
); );
public static $defaultContentWhitelist = 'json png jpg jpeg gif bmp tif tiff svg eot ttf woff woff2 otf webm mp4 ogg mp3 m4a wav txt pdf rtf doc docx xls xlsx ppt pptx odt ods odp xml csv diff patch swf md textile vtt webvtt'; public static $defaultContentWhitelist = 'json png jpg jpeg gif bmp tif tiff svg eot ttf woff woff2 otf webm mp4 ogg mp3 m4a wav txt pdf rtf doc docx xls xlsx ppt pptx odt ods odp xml csv diff patch swf md textile vtt webvtt gltf glb';
public static $defaultLibraryWhitelistExtras = 'js css'; public static $defaultLibraryWhitelistExtras = 'js css';
public $librariesJsonData, $contentJsonData, $mainJsonData, $h5pF, $fs, $h5pD, $disableFileCheck; public $librariesJsonData, $contentJsonData, $mainJsonData, $h5pF, $fs, $h5pD, $disableFileCheck;
@ -3736,7 +3736,8 @@ class H5PCore {
'copyrightWarning' => $this->h5pF->t('Copyrighted material cannot be shared in the H5P Content Hub. If the content is licensed with a OER friendly license like Creative Commons, please choose the appropriate license. If not this content cannot be shared.'), 'copyrightWarning' => $this->h5pF->t('Copyrighted material cannot be shared in the H5P Content Hub. If the content is licensed with a OER friendly license like Creative Commons, please choose the appropriate license. If not this content cannot be shared.'),
'keywordsExits' => $this->h5pF->t('Keywords already exists!'), 'keywordsExits' => $this->h5pF->t('Keywords already exists!'),
'someKeywordsExits' => $this->h5pF->t('Some of these keywords already exist'), 'someKeywordsExits' => $this->h5pF->t('Some of these keywords already exist'),
'width' => $this->h5pF->t('width'),
'height' => $this->h5pF->t('height')
); );
} }

View File

@ -1348,7 +1348,7 @@ H5P.openReuseDialog = function ($element, contentData, library, instance, conten
*/ */
H5P.openEmbedDialog = function ($element, embedCode, resizeCode, size, instance) { H5P.openEmbedDialog = function ($element, embedCode, resizeCode, size, instance) {
var fullEmbedCode = embedCode + resizeCode; var fullEmbedCode = embedCode + resizeCode;
var dialog = new H5P.Dialog('embed', H5P.t('embed'), '<textarea class="h5p-embed-code-container" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>' + H5P.t('size') + ': <input type="text" value="' + Math.ceil(size.width) + '" class="h5p-embed-size"/> × <input type="text" value="' + Math.ceil(size.height) + '" class="h5p-embed-size"/> px<br/><div role="button" tabindex="0" class="h5p-expander">' + H5P.t('showAdvanced') + '</div><div class="h5p-expander-content"><p>' + H5P.t('advancedHelp') + '</p><textarea class="h5p-embed-code-container" autocorrect="off" autocapitalize="off" spellcheck="false">' + resizeCode + '</textarea></div>', $element); var dialog = new H5P.Dialog('embed', H5P.t('embed'), '<textarea class="h5p-embed-code-container" autocorrect="off" autocapitalize="off" spellcheck="false"></textarea>' + H5P.t('size') + ': <input aria-label="'+ H5P.t('width') +'" type="text" value="' + Math.ceil(size.width) + '" class="h5p-embed-size"/> × <input aria-label="'+ H5P.t('width') +'" type="text" value="' + Math.ceil(size.height) + '" class="h5p-embed-size"/> px<br/><div role="button" tabindex="0" class="h5p-expander">' + H5P.t('showAdvanced') + '</div><div class="h5p-expander-content"><p>' + H5P.t('advancedHelp') + '</p><textarea class="h5p-embed-code-container" autocorrect="off" autocapitalize="off" spellcheck="false">' + resizeCode + '</textarea></div>', $element);
// Selecting embed code when dialog is opened // Selecting embed code when dialog is opened
H5P.jQuery(dialog).on('dialog-opened', function (event, $dialog) { H5P.jQuery(dialog).on('dialog-opened', function (event, $dialog) {

View File

@ -55,6 +55,8 @@ html.h5p-iframe .h5p-content {
line-height: 1.5em; line-height: 1.5em;
width: 100%; width: 100%;
height: auto; height: auto;
-webkit-text-size-adjust: none;
text-size-adjust: none;
} }
html.h5p-iframe .h5p-fullscreen .h5p-content, html.h5p-iframe .h5p-fullscreen .h5p-content,
html.h5p-iframe .h5p-semi-fullscreen .h5p-content { html.h5p-iframe .h5p-semi-fullscreen .h5p-content {