Fixed full screen functionality for image module in HTMLModule.

TNL-265
This commit is contained in:
Waheed Ahmed
2014-09-17 18:51:26 +05:00
parent 3f23ce83b7
commit ef0af6e9d5
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');
}
});
});
};