mirror of
https://github.com/moodle/moodle.git
synced 2025-04-21 00:12:56 +02:00
MDL-64175 atto_media: update advanced settings
Some OS, such as Ubuntu, are slightly changing the audio attributes, from <audio attribute1="true"> to <audio attribute1>. This patch is for reviewing this piece of code and covering both cases.
This commit is contained in:
parent
68fd8d8bdf
commit
2b860436c9
@ -714,7 +714,9 @@ Y.namespace('M.atto_media').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
*/
|
||||
_getMediumProperties: function(medium) {
|
||||
var boolAttr = function(elem, attr) {
|
||||
return elem.getAttribute(attr) ? true : false;
|
||||
// As explained in MDL-64175, some OS (like Ubuntu), are removing the value for these attributes.
|
||||
// So in order to check if attr="true", we need to check if the attribute exists and if the value is empty or true.
|
||||
return (elem.hasAttribute(attr) && (elem.getAttribute(attr) || elem.getAttribute(attr) === ''));
|
||||
};
|
||||
|
||||
var tracks = {
|
||||
|
File diff suppressed because one or more lines are too long
@ -714,7 +714,9 @@ Y.namespace('M.atto_media').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
*/
|
||||
_getMediumProperties: function(medium) {
|
||||
var boolAttr = function(elem, attr) {
|
||||
return elem.getAttribute(attr) ? true : false;
|
||||
// As explained in MDL-64175, some OS (like Ubuntu), are removing the value for these attributes.
|
||||
// So in order to check if attr="true", we need to check if the attribute exists and if the value is empty or true.
|
||||
return (elem.hasAttribute(attr) && (elem.getAttribute(attr) || elem.getAttribute(attr) === ''));
|
||||
};
|
||||
|
||||
var tracks = {
|
||||
|
@ -712,7 +712,9 @@ Y.namespace('M.atto_media').Button = Y.Base.create('button', Y.M.editor_atto.Edi
|
||||
*/
|
||||
_getMediumProperties: function(medium) {
|
||||
var boolAttr = function(elem, attr) {
|
||||
return elem.getAttribute(attr) ? true : false;
|
||||
// As explained in MDL-64175, some OS (like Ubuntu), are removing the value for these attributes.
|
||||
// So in order to check if attr="true", we need to check if the attribute exists and if the value is empty or true.
|
||||
return (elem.hasAttribute(attr) && (elem.getAttribute(attr) || elem.getAttribute(attr) === ''));
|
||||
};
|
||||
|
||||
var tracks = {
|
||||
|
Loading…
x
Reference in New Issue
Block a user