Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
edx-platform
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
edx
edx-platform
Commits
ddafb113
Commit
ddafb113
authored
Jul 25, 2014
by
Giulio Gratta
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #83 from Stanford-Online/giulio/local-image-modal-bugfix
Name full-screen-image setup function and call it
parents
e12b0943
a6a75af4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
7 deletions
+8
-7
common/lib/xmodule/xmodule/js/src/html/imageModal.js
+2
-5
common/lib/xmodule/xmodule/templates/html/image_modal.yaml
+6
-2
No files found.
common/lib/xmodule/xmodule/js/src/html/imageModal.js
View file @
ddafb113
$
(
function
()
{
// Set up on page load
function
setupFullScreenImage
()
{
$
(
"a.modal-content"
).
each
(
function
()
{
var
smallImageObject
=
$
(
this
).
children
();
var
largeImageSRC
=
$
(
this
).
attr
(
'href'
);
...
...
@@ -106,4 +104,4 @@ $(function() {
$
(
".wrapper-modal-image .image-content .image-controls .modal-ui-icon"
).
toggleClass
(
'is-disabled'
);
}
});
});
\ No newline at end of file
}
common/lib/xmodule/xmodule/templates/html/image_modal.yaml
View file @
ddafb113
...
...
@@ -4,4 +4,9 @@ metadata:
data
:
|
<h2>Full Screen Image</h2>
<p>Use the full screen image tool to allow students to open the image in the full screen, zoom in on the image, and drag the image within the screen.</p>
<a href="http://static.class.stanford.edu/stanford-hills-big.jpg" class="modal-content"><img alt="The Stanford Hills" src="http://static.class.stanford.edu/stanford-hills-small.jpg" /></a>
\ No newline at end of file
<a href="http://static.class.stanford.edu/stanford-hills-big.jpg" class="modal-content"><img alt="The Stanford Hills" src="http://static.class.stanford.edu/stanford-hills-small.jpg" /></a>
<script type="text/javascript">
$(function () {
setupFullScreenImage();
});
</script>
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment