Commit 22785e96 by Waheed Ahmed

Merge pull request #5258 from edx/waheed/tnl265-fix-fullscreen-functionality

Fixed full screen functionality for image module in HTMLModule.
parents 1d6d0f80 ef0af6e9
...@@ -6,6 +6,8 @@ class @HTMLModule ...@@ -6,6 +6,8 @@ class @HTMLModule
Collapsible.setCollapsibles(@el) Collapsible.setCollapsibles(@el)
if MathJax? if MathJax?
MathJax.Hub.Queue ["Typeset", MathJax.Hub, @el[0]] MathJax.Hub.Queue ["Typeset", MathJax.Hub, @el[0]]
if setupFullScreenModal?
setupFullScreenModal()
$: (selector) -> $: (selector) ->
$(selector, @el) $(selector, @el)
$(function() { var setupFullScreenModal = function() {
// Set up on page load // Setup full screen image modal.
// Executed from HTMLModule in display.js.
$("a.modal-content").each(function() { $("a.modal-content").each(function() {
var smallImageObject = $(this).children(); var smallImageObject = $(this).children();
var largeImageSRC = $(this).attr('href'); var largeImageSRC = $(this).attr('href');
...@@ -106,4 +107,4 @@ $(function() { ...@@ -106,4 +107,4 @@ $(function() {
$(".wrapper-modal-image .image-content .image-controls .modal-ui-icon").toggleClass('is-disabled'); $(".wrapper-modal-image .image-content .image-controls .modal-ui-icon").toggleClass('is-disabled');
} }
}); });
}); };
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment