Embed: Always br. Get w/h from correct el.
parent
e0534dd778
commit
ba862f0078
|
@ -163,8 +163,8 @@ H5P.init = function (target) {
|
|||
// Add embed button
|
||||
H5P.jQuery('<li class="h5p-button h5p-embed" role="button" tabindex="1" title="' + H5P.t('embedDescription') + '">' + H5P.t('embed') + '</li>').appendTo($actions).click(function () {
|
||||
H5P.openEmbedDialog($actions, contentData.embedCode, contentData.resizeCode, {
|
||||
width: $container.width(),
|
||||
height: $container.height()
|
||||
width: $element.width(),
|
||||
height: $element.height()
|
||||
});
|
||||
});
|
||||
}
|
||||
|
@ -1008,7 +1008,7 @@ H5P.hasCopyrights = function (parameters, contentId) {
|
|||
*/
|
||||
H5P.openEmbedDialog = function ($element, embedCode, resizeCode, size) {
|
||||
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="' + size.width + '" class="h5p-embed-size"/> × <input type="text" value="' + size.height + '" class="h5p-embed-size"/> px<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 type="text" value="' + size.width + '" class="h5p-embed-size"/> × <input type="text" value="' + 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
|
||||
H5P.jQuery(dialog).on('dialog-opened', function (event, $dialog) {
|
||||
|
|
Loading…
Reference in New Issue