From 8cfdcb93b21d60aff4a3243a19620b305b7bcd70 Mon Sep 17 00:00:00 2001 From: "Dave St.Germain" Date: Tue, 1 Apr 2014 10:12:21 -0400 Subject: [PATCH] Fixes LMS-1740 by activating the zooming diagram with the spacebar. --- .../xmodule/xmodule/templates/html/zooming_image.yaml | 8 +++++++- .../xmodule/tests/templates/test/zooming_image.yaml | 9 +++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/common/lib/xmodule/xmodule/templates/html/zooming_image.yaml b/common/lib/xmodule/xmodule/templates/html/zooming_image.yaml index dc79c75fff..ea0ad516f9 100644 --- a/common/lib/xmodule/xmodule/templates/html/zooming_image.yaml +++ b/common/lib/xmodule/xmodule/templates/html/zooming_image.yaml @@ -6,7 +6,7 @@ data: |

Some edX classes use extremely large, extremely detailed graphics. To make it easier to understand we can offer two versions of those graphics, with the zoomed section showing when you click on the main view.

The example below is from 7.00x: Introduction to Biology and shows a subset of the biochemical reactions that cells carry out.

You can view the chemical structures of the molecules by clicking on them. The magnified view also lists the enzymes involved in each step.

- +

Press spacebar to open the magifier.

magnify @@ -20,6 +20,12 @@ data: | height: 350, lightbox: false }); + $(document).keydown(function(event) { + if (event.keyCode == 32) { + event.preventDefault(); + $('.loupe img').click(); + } + }); }); // ]]>
diff --git a/common/lib/xmodule/xmodule/tests/templates/test/zooming_image.yaml b/common/lib/xmodule/xmodule/tests/templates/test/zooming_image.yaml index dc79c75fff..bba08a0d7a 100644 --- a/common/lib/xmodule/xmodule/tests/templates/test/zooming_image.yaml +++ b/common/lib/xmodule/xmodule/tests/templates/test/zooming_image.yaml @@ -6,7 +6,7 @@ data: |

Some edX classes use extremely large, extremely detailed graphics. To make it easier to understand we can offer two versions of those graphics, with the zoomed section showing when you click on the main view.

The example below is from 7.00x: Introduction to Biology and shows a subset of the biochemical reactions that cells carry out.

You can view the chemical structures of the molecules by clicking on them. The magnified view also lists the enzymes involved in each step.

- +

Press spacebar to open the magifier.