From 042cb5c6988bbc311cd4447482fe785bea5d48fa Mon Sep 17 00:00:00 2001 From: polesye Date: Fri, 29 Nov 2013 08:23:24 +0200 Subject: [PATCH] BLD-206: Add template for the zooming image in Studio. --- CHANGELOG.rst | 2 ++ .../contentstore/features/component.feature | 2 ++ .../contentstore/features/component.py | 2 ++ cms/static/sass/elements/_vendor.scss | 9 +++++++ .../xmodule/templates/html/zooming_image.yaml | 26 +++++++++++++++++++ 5 files changed, 41 insertions(+) create mode 100644 common/lib/xmodule/xmodule/templates/html/zooming_image.yaml diff --git a/CHANGELOG.rst b/CHANGELOG.rst index cb86593a92..518cfd5066 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -5,6 +5,8 @@ These are notable changes in edx-platform. This is a rolling list of changes, in roughly chronological order, most recent first. Add your entries at or near the top. Include a label indicating the component affected. +Blades: Add template for the zooming image in studio. BLD-206. + Blades: Update behavior of start/end time fields. BLD-506. Blades: Make LTI module not send grade_back_url if has_score=False. BLD-561. diff --git a/cms/djangoapps/contentstore/features/component.feature b/cms/djangoapps/contentstore/features/component.feature index e75e88e17a..285f7bcb0d 100644 --- a/cms/djangoapps/contentstore/features/component.feature +++ b/cms/djangoapps/contentstore/features/component.feature @@ -19,10 +19,12 @@ Feature: CMS.Component Adding | Component | | Text | | Announcement | + | Zooming Image | Then I see HTML components in this order: | Component | | Text | | Announcement | + | Zooming Image | Scenario: I can add Latex HTML components Given I am in Studio editing a new unit diff --git a/cms/djangoapps/contentstore/features/component.py b/cms/djangoapps/contentstore/features/component.py index 505ac9bad3..387510b5ea 100644 --- a/cms/djangoapps/contentstore/features/component.py +++ b/cms/djangoapps/contentstore/features/component.py @@ -57,6 +57,8 @@ def see_a_multi_step_component(step, category): '\n \n', 'Announcement': '

Words of encouragement! This is a short note that most students will read.

', + 'Zooming Image': + '

ZOOMING DIAGRAMS

', 'E-text Written in LaTeX': '

Example: E-text page

', } diff --git a/cms/static/sass/elements/_vendor.scss b/cms/static/sass/elements/_vendor.scss index 0e47c9c48e..961f575d7b 100644 --- a/cms/static/sass/elements/_vendor.scss +++ b/cms/static/sass/elements/_vendor.scss @@ -63,3 +63,12 @@ .ui-timepicker-list { z-index: 100000 !important; } + +//jQuery loupeAndLightbox Plugin +.zooming-image-place { + .larger { + left: 0 !important; + bottom: 100% !important; + } +} +// ==================== diff --git a/common/lib/xmodule/xmodule/templates/html/zooming_image.yaml b/common/lib/xmodule/xmodule/templates/html/zooming_image.yaml new file mode 100644 index 0000000000..dc79c75fff --- /dev/null +++ b/common/lib/xmodule/xmodule/templates/html/zooming_image.yaml @@ -0,0 +1,26 @@ +--- +metadata: + display_name: Zooming Image +data: | +

ZOOMING DIAGRAMS

+

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.

+ +
+ + magnify + +
+
+ +
+