Browse Source

Support @alt for images.

Add an alt attribute if alt data is provided.
pull/818/head
Liam Morland 9 years ago
parent
commit
33980f9a7a
  1. 8
      source/js/Core/Media/VMM.MediaElement.js

8
source/js/Core/Media/VMM.MediaElement.js

@ -122,7 +122,11 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
}
// IMAGE
if (m.type == "image") {
mediaElem = "<div class='media-image media-shadow'><img src='" + m.id + "' class='media-image'></div>";
var alt = "";
if (data.alt) {
alt = " alt='" + data.alt + "'";
}
mediaElem = "<div class='media-image media-shadow'><img" + alt + " src='" + m.id + "' class='media-image'></div>";
// FLICKR
} else if (m.type == "flickr") {
//mediaElem = "<div class='media-image media-shadow' id='" + uid + "'>" + loading_messege + "</div>";
@ -222,4 +226,4 @@ if(typeof VMM != 'undefined' && typeof VMM.MediaElement == 'undefined') {
}
}).init();
}
}

Loading…
Cancel
Save