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

Fixed full screen functionality for image module in HTMLModule.
This commit is contained in:
Waheed Ahmed
2014-09-18 21:22:25 +05:00
2 changed files with 6 additions and 3 deletions

View File

@@ -6,6 +6,8 @@ class @HTMLModule
Collapsible.setCollapsibles(@el)
if MathJax?
MathJax.Hub.Queue ["Typeset", MathJax.Hub, @el[0]]
if setupFullScreenModal?
setupFullScreenModal()
$: (selector) ->
$(selector, @el)

View File

@@ -1,6 +1,7 @@
$(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() {
var smallImageObject = $(this).children();
var largeImageSRC = $(this).attr('href');
@@ -106,4 +107,4 @@ $(function() {
$(".wrapper-modal-image .image-content .image-controls .modal-ui-icon").toggleClass('is-disabled');
}
});
});
};