From 7770d9d427826af0f0a833fdc8a6c5b6cb746247 Mon Sep 17 00:00:00 2001 From: Andy Armstrong Date: Mon, 17 Mar 2014 10:34:28 -0400 Subject: [PATCH 01/25] Implement editing from the Studio container page. STUD-1306 --- CHANGELOG.rst | 2 + .../component_settings_editor_helpers.py | 6 +- cms/djangoapps/contentstore/features/pages.py | 4 +- .../contentstore/features/transcripts.py | 16 +- .../contentstore/features/video-editor.py | 8 +- .../contentstore/views/component.py | 8 +- cms/djangoapps/contentstore/views/item.py | 4 +- cms/djangoapps/contentstore/views/preview.py | 3 +- .../views/tests/test_container.py | 39 ++- cms/static/coffee/spec/main.coffee | 7 +- cms/static/coffee/spec/main_spec.coffee | 2 +- .../coffee/spec/models/section_spec.coffee | 2 +- .../coffee/spec/views/assets_spec.coffee | 2 +- .../coffee/spec/views/course_info_spec.coffee | 2 +- .../coffee/spec/views/module_edit_spec.coffee | 23 +- .../coffee/spec/views/overview_spec.coffee | 2 +- .../coffee/spec/views/section_spec.coffee | 2 +- .../coffee/spec/views/textbook_spec.coffee | 2 +- .../coffee/spec/views/upload_spec.coffee | 2 +- .../coffee/src/views/module_edit.coffee | 121 +------ cms/static/js/models/xblock_info.js | 4 +- .../js/spec/views/modals/base_modal_spec.js | 35 ++ .../js/spec/views/modals/edit_xblock_spec.js | 94 ++++++ cms/static/js/spec/views/paging_spec.js | 2 +- cms/static/js/spec/views/unit_spec.js | 2 +- .../js/spec/views/xblock_container_spec.js | 80 +++++ .../js/spec/views/xblock_editor_spec.js | 76 +++++ cms/static/js/spec/views/xblock_spec.js | 2 +- .../js/{spec => spec_helpers}/create_sinon.js | 0 cms/static/js/spec_helpers/edit_helpers.js | 60 ++++ cms/static/js/views/baseview.js | 6 +- cms/static/js/views/modals/base_modal.js | 25 ++ cms/static/js/views/modals/edit_xblock.js | 160 ++++++++++ cms/static/js/views/overview.js | 4 +- cms/static/js/views/uploads.js | 10 +- .../js/views/video/transcripts/editor.js | 4 +- .../video/transcripts/message_manager.js | 2 +- .../video/transcripts/metadata_videolist.js | 4 +- cms/static/js/views/xblock.js | 48 ++- cms/static/js/views/xblock_container.js | 94 ++++++ cms/static/js/views/xblock_editor.js | 173 ++++++++++ cms/static/sass/_base.scss | 2 +- cms/static/sass/elements/_forms.scss | 14 + cms/static/sass/elements/_modal-window.scss | 297 +++++++++++++++++ cms/static/sass/elements/_uploads.scss | 6 + cms/static/sass/elements/_xblocks.scss | 14 +- cms/static/sass/style-app.scss | 1 + cms/static/sass/views/_container.scss | 58 +++- cms/static/sass/views/_static-pages.scss | 1 + cms/static/sass/views/_unit.scss | 9 +- cms/templates/container.html | 92 ++++-- cms/templates/edit-tabs.html | 10 + cms/templates/js/edit-xblock-modal.underscore | 30 ++ .../js/editor-mode-button.underscore | 3 + .../js/mock/mock-container-view.underscore | 122 +++++++ .../js/mock/mock-container-xblock.underscore | 300 ++++++++++++++++++ cms/templates/js/mock/mock-modal.underscore | 22 ++ .../js/mock/mock-xblock-editor.underscore | 8 + .../js/mock/mock-xmodule-editor.underscore | 170 ++++++++++ cms/templates/js/upload-dialog.underscore | 12 +- cms/templates/overview.html | 10 +- cms/templates/studio_xblock_wrapper.html | 16 +- cms/templates/textbooks.html | 2 +- cms/templates/unit.html | 25 +- cms/templates/ux/reference/container.html | 10 +- cms/templates/widgets/source-edit.html | 18 +- .../lib/xmodule/xmodule/css/problem/edit.scss | 2 +- .../xmodule/xmodule/js/spec/tabs/edit.coffee | 2 +- .../js/src/tabs/tabs-aggregator.coffee | 5 +- common/static/sass/_mixins.scss | 4 + ...odal.underscore => image-modal.underscore} | 0 lms/templates/courseware/courseware.html | 13 +- 72 files changed, 2133 insertions(+), 287 deletions(-) create mode 100644 cms/static/js/spec/views/modals/base_modal_spec.js create mode 100644 cms/static/js/spec/views/modals/edit_xblock_spec.js create mode 100644 cms/static/js/spec/views/xblock_container_spec.js create mode 100644 cms/static/js/spec/views/xblock_editor_spec.js rename cms/static/js/{spec => spec_helpers}/create_sinon.js (100%) create mode 100644 cms/static/js/spec_helpers/edit_helpers.js create mode 100644 cms/static/js/views/modals/base_modal.js create mode 100644 cms/static/js/views/modals/edit_xblock.js create mode 100644 cms/static/js/views/xblock_container.js create mode 100644 cms/static/js/views/xblock_editor.js create mode 100644 cms/static/sass/elements/_modal-window.scss create mode 100644 cms/templates/js/edit-xblock-modal.underscore create mode 100644 cms/templates/js/editor-mode-button.underscore create mode 100644 cms/templates/js/mock/mock-container-view.underscore create mode 100644 cms/templates/js/mock/mock-container-xblock.underscore create mode 100644 cms/templates/js/mock/mock-modal.underscore create mode 100644 cms/templates/js/mock/mock-xblock-editor.underscore create mode 100644 cms/templates/js/mock/mock-xmodule-editor.underscore rename common/templates/js/{imageModal.underscore => image-modal.underscore} (100%) diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 8ad10f8eca..7f736932fd 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. +Studio: Add edit button to leaf xblocks on the container page. STUD-1306. + Blades: Add LTI context_id parameter. BLD-584. Blades: Update LTI resource_link_id parameter. BLD-768. diff --git a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py index 60632f77a7..7431eb3ed9 100644 --- a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py +++ b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py @@ -107,7 +107,7 @@ def click_component_from_menu(category, component_type, is_advanced): def edit_component_and_select_settings(): world.wait_for(lambda _driver: world.css_visible('a.edit-button')) world.css_click('a.edit-button') - world.css_click('#settings-mode a') + world.css_click('.settings-button') @world.absorb @@ -174,7 +174,7 @@ def verify_all_setting_entries(expected_entries): @world.absorb def save_component(step): - world.css_click("a.save-button") + world.css_click("a.action-save") world.wait_for_ajax_complete() @@ -189,7 +189,7 @@ def save_component_and_reopen(step): @world.absorb def cancel_component(step): - world.css_click("a.cancel-button") + world.css_click("a.action-cancel") # We have a known issue that modifications are still shown within the edit window after cancel (though) # they are not persisted. Refresh the browser to make sure the changes were not persisted. reload_the_page(step) diff --git a/cms/djangoapps/contentstore/features/pages.py b/cms/djangoapps/contentstore/features/pages.py index e86177282d..2306dfb768 100644 --- a/cms/djangoapps/contentstore/features/pages.py +++ b/cms/djangoapps/contentstore/features/pages.py @@ -44,13 +44,13 @@ def click_edit_or_delete(step, edit_or_delete): @step(u'I change the name to "([^"]*)"$') def change_name(step, new_name): - settings_css = '#settings-mode a' + settings_css = '.settings-button' world.css_click(settings_css) input_css = 'input.setting-input' world.css_fill(input_css, new_name) if world.is_firefox(): world.trigger_event(input_css) - save_button = 'a.save-button' + save_button = 'a.action-save' world.css_click(save_button) diff --git a/cms/djangoapps/contentstore/features/transcripts.py b/cms/djangoapps/contentstore/features/transcripts.py index e198ee3f32..636b5dd83a 100644 --- a/cms/djangoapps/contentstore/features/transcripts.py +++ b/cms/djangoapps/contentstore/features/transcripts.py @@ -209,23 +209,31 @@ def check_text_in_the_captions(_step, text): @step('I see value "([^"]*)" in the field "([^"]*)"$') def check_transcripts_field(_step, values, field_name): - world.click_link_by_text('Advanced') + editor_tabs = world.browser.find_by_css('.editor-tabs a') + basic_tab = editor_tabs[0] + advanced_tab = editor_tabs[1] + advanced_tab.click() field_id = '#' + world.browser.find_by_xpath('//label[text()="%s"]' % field_name.strip())[0]['for'] values_list = [i.strip() == world.css_value(field_id) for i in values.split('|')] assert any(values_list) - world.click_link_by_text('Basic') + basic_tab.click() @step('I save changes$') def save_changes(_step): - save_css = 'a.save-button' + save_css = 'a.action-save' world.css_click(save_css) world.wait_for_ajax_complete() @step('I open tab "([^"]*)"$') def open_tab(_step, tab_name): - world.click_link_by_text(tab_name.strip()) + editor_tabs = world.browser.find_by_css('.editor-tabs a') + expected_tab_text = tab_name.strip().upper() + matching_tabs = [tab for tab in editor_tabs if tab.text == expected_tab_text] + assert len(matching_tabs) == 1 + tab = matching_tabs[0] + tab.click() world.wait_for_ajax_complete() diff --git a/cms/djangoapps/contentstore/features/video-editor.py b/cms/djangoapps/contentstore/features/video-editor.py index a7974f020f..abff4bd74a 100644 --- a/cms/djangoapps/contentstore/features/video-editor.py +++ b/cms/djangoapps/contentstore/features/video-editor.py @@ -113,10 +113,10 @@ def set_show_captions(step, setting): world.browser.cookies.delete('hide_captions') world.css_click('a.edit-button') - world.wait_for(lambda _driver: world.css_visible('a.save-button')) - world.click_link_by_text('Advanced') + world.wait_for(lambda _driver: world.css_visible('a.action-save')) + world.click_link_by_text('ADVANCED') world.browser.select('Transcript Display', setting) - world.css_click('a.save-button') + world.css_click('a.action-save') @step('when I view the video it (.*) show the captions$') @@ -161,7 +161,7 @@ def correct_video_settings(_step): @step('my video display name change is persisted on save$') def video_name_persisted(step): - world.css_click('a.save-button') + world.css_click('a.action-save') reload_the_page(step) world.wait_for_xmodule() world.edit_component() diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index e2152d9872..3161575309 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -273,6 +273,7 @@ def unit_handler(request, tag=None, package_id=None, branch=None, version_guid=N 'context_course': course, 'unit': item, 'unit_locator': locator, + 'xblocks': [xblock for xblock in xblocks], 'locators': locators, 'component_templates': component_templates, 'draft_preview_link': preview_lms_link, @@ -317,14 +318,17 @@ def container_handler(request, tag=None, package_id=None, branch=None, version_g while parent and parent.category != 'sequential': ancestor_xblocks.append(parent) parent = get_parent_xblock(parent) - ancestor_xblocks.reverse() + unit = None if not ancestor_xblocks else ancestor_xblocks[0] + unit_publish_state = None if not unit else compute_publish_state(unit) + return render_to_response('container.html', { 'context_course': course, 'xblock': xblock, 'xblock_locator': locator, - 'unit': None if not ancestor_xblocks else ancestor_xblocks[0], + 'unit': unit, + 'unit_publish_state': unit_publish_state, 'ancestor_xblocks': ancestor_xblocks, }) else: diff --git a/cms/djangoapps/contentstore/views/item.py b/cms/djangoapps/contentstore/views/item.py index 344c6d5c57..f27df9c1b5 100644 --- a/cms/djangoapps/contentstore/views/item.py +++ b/cms/djangoapps/contentstore/views/item.py @@ -34,6 +34,7 @@ from ..utils import get_modulestore from .access import has_course_access from .helpers import _xmodule_recurse +from contentstore.utils import compute_publish_state, PublishState from contentstore.views.preview import get_preview_fragment from edxmako.shortcuts import render_to_string from models.settings.course_grading import CourseGradingModel @@ -224,11 +225,12 @@ def xblock_view_handler(request, package_id, view_name, tag=None, branch=None, v }) elif view_name in ('student_view', 'container_preview'): is_container_view = (view_name == 'container_preview') + component_publish_state = compute_publish_state(component) + is_read_only_view = component_publish_state == PublishState.public # Only show the new style HTML for the container view, i.e. for non-verticals # Note: this special case logic can be removed once the unit page is replaced # with the new container view. - is_read_only_view = is_container_view context = { 'runtime_type': 'studio', 'container_view': is_container_view, diff --git a/cms/djangoapps/contentstore/views/preview.py b/cms/djangoapps/contentstore/views/preview.py index b3e4f0562e..17c1548299 100644 --- a/cms/djangoapps/contentstore/views/preview.py +++ b/cms/djangoapps/contentstore/views/preview.py @@ -1,7 +1,6 @@ from __future__ import absolute_import import logging -import hashlib from functools import partial from django.conf import settings @@ -170,7 +169,7 @@ def _studio_wrap_xblock(xblock, view, frag, context, display_name_only=False): """ # Only add the Studio wrapper when on the container page. The unit page will remain as is for now. if context.get('container_view', None) and view == 'student_view': - locator = loc_mapper().translate_location(xblock.course_id, xblock.location) + locator = loc_mapper().translate_location(xblock.course_id, xblock.location, published=False) template_context = { 'xblock_context': context, 'xblock': xblock, diff --git a/cms/djangoapps/contentstore/views/tests/test_container.py b/cms/djangoapps/contentstore/views/tests/test_container.py index 0752ca6141..fefc19ea21 100644 --- a/cms/djangoapps/contentstore/views/tests/test_container.py +++ b/cms/djangoapps/contentstore/views/tests/test_container.py @@ -3,6 +3,7 @@ Unit tests for the container view. """ from contentstore.tests.utils import CourseTestCase +from contentstore.utils import compute_publish_state, PublishState from contentstore.views.helpers import xblock_studio_url from xmodule.modulestore.tests.factories import ItemFactory @@ -26,13 +27,19 @@ class ContainerViewTestCase(CourseTestCase): category="video", display_name="My Video") def test_container_html(self): + branch_name = "MITx.999.Robot_Super_Course/branch/draft/block" self._test_html_content( self.child_vertical, - expected_section_tag='
', + branch_name=branch_name, + expected_section_tag=( + ' From d55ad61801cde33fa9490c92b57b353c3979286e Mon Sep 17 00:00:00 2001 From: Andy Armstrong Date: Wed, 9 Apr 2014 10:59:51 -0400 Subject: [PATCH 21/25] Make the LaText source compiler link visible --- cms/static/sass/elements/_modal-window.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cms/static/sass/elements/_modal-window.scss b/cms/static/sass/elements/_modal-window.scss index 7efff97f7a..f070422709 100644 --- a/cms/static/sass/elements/_modal-window.scss +++ b/cms/static/sass/elements/_modal-window.scss @@ -173,7 +173,7 @@ .modal-window { .CodeMirror { - height: 100%; + height: 390px; } .wrapper-comp-settings { From a3e26e682436fbcc37fd751f8c3b078d8da66a79 Mon Sep 17 00:00:00 2001 From: Andy Armstrong Date: Wed, 9 Apr 2014 12:15:38 -0400 Subject: [PATCH 22/25] Implement next round of code reviews --- .../contentstore/views/component.py | 1 - .../views/tests/test_container.py | 31 +- .../js/spec/views/pages/container_spec.js | 29 +- .../js/spec/views/xblock_editor_spec.js | 12 +- cms/static/js/spec/views/xblock_spec.js | 2 +- cms/static/js/spec_helpers/edit_helpers.js | 16 - cms/static/js/views/course_info_handout.js | 4 +- cms/static/js/views/course_info_update.js | 4 +- cms/static/js/views/list_textbooks.js | 4 +- cms/static/js/views/modals/edit_xblock.js | 12 +- cms/static/js/views/paging_footer.js | 2 +- cms/static/js/views/paging_header.js | 2 +- cms/static/sass/elements/_modal-window.scss | 2 +- .../js/mock/mock-container-xblock.underscore | 383 +++++------------- cms/templates/unit.html | 4 +- 15 files changed, 168 insertions(+), 340 deletions(-) diff --git a/cms/djangoapps/contentstore/views/component.py b/cms/djangoapps/contentstore/views/component.py index 8203952009..425b330353 100644 --- a/cms/djangoapps/contentstore/views/component.py +++ b/cms/djangoapps/contentstore/views/component.py @@ -273,7 +273,6 @@ def unit_handler(request, tag=None, package_id=None, branch=None, version_guid=N 'context_course': course, 'unit': item, 'unit_locator': locator, - 'xblocks': xblocks, 'locators': locators, 'component_templates': component_templates, 'draft_preview_link': preview_lms_link, diff --git a/cms/djangoapps/contentstore/views/tests/test_container.py b/cms/djangoapps/contentstore/views/tests/test_container.py index fefc19ea21..3c19efc896 100644 --- a/cms/djangoapps/contentstore/views/tests/test_container.py +++ b/cms/djangoapps/contentstore/views/tests/test_container.py @@ -5,6 +5,7 @@ Unit tests for the container view. from contentstore.tests.utils import CourseTestCase from contentstore.utils import compute_publish_state, PublishState from contentstore.views.helpers import xblock_studio_url +from xmodule.modulestore.django import modulestore from xmodule.modulestore.tests.factories import ItemFactory @@ -47,13 +48,33 @@ class ContainerViewTestCase(CourseTestCase): Create the scenario of an xblock with children (non-vertical) on the container page. This should create a container page that is a child of another container page. """ - xblock_with_child = ItemFactory.create(parent_location=self.child_vertical.location, - category="wrapper", display_name="Wrapper") - ItemFactory.create(parent_location=xblock_with_child.location, - category="html", display_name="Child HTML") + published_xblock_with_child = ItemFactory.create( + parent_location=self.child_vertical.location, + category="wrapper", display_name="Wrapper" + ) + ItemFactory.create( + parent_location=published_xblock_with_child.location, + category="html", display_name="Child HTML" + ) + draft_xblock_with_child = modulestore('draft').convert_to_draft(published_xblock_with_child.location) branch_name = "MITx.999.Robot_Super_Course/branch/draft/block" self._test_html_content( - xblock_with_child, + published_xblock_with_child, + branch_name=branch_name, + expected_section_tag=( + ' - - - - - - + + -
\ No newline at end of file diff --git a/cms/templates/unit.html b/cms/templates/unit.html index 4602b28e73..bc92ffced4 100644 --- a/cms/templates/unit.html +++ b/cms/templates/unit.html @@ -60,8 +60,8 @@ require(["domReady!", "jquery", "js/models/module_info", "coffee/src/views/unit"

    - % for (locator, xblock) in zip(locators, xblocks): -
  1. + % for locator in locators: +
  2. % endfor
  3. From b78508a1f90a0c7ff37666fb14ff83393fffb78c Mon Sep 17 00:00:00 2001 From: Andy Armstrong Date: Wed, 9 Apr 2014 13:33:01 -0400 Subject: [PATCH 23/25] Indicate LaTex problems with a specific class on the editor --- cms/templates/widgets/problem-edit.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cms/templates/widgets/problem-edit.html b/cms/templates/widgets/problem-edit.html index 6611a04ebf..5c3190d0e0 100644 --- a/cms/templates/widgets/problem-edit.html +++ b/cms/templates/widgets/problem-edit.html @@ -1,7 +1,13 @@ <%! from django.utils.translation import ugettext as _ %> <%namespace name='static' file='../static_content.html'/> +<% isLaTexProblem='source_code' in editable_metadata_fields and editable_metadata_fields['source_code']['explicitly_set'] and enable_latex_compiler %> + +% if isLaTexProblem: +
    +% else:
    +% endif
    %if enable_markdown: From 2bf64d76d79e5ce5bac0933fd56aae64a501ca8b Mon Sep 17 00:00:00 2001 From: Andy Armstrong Date: Wed, 9 Apr 2014 13:52:21 -0400 Subject: [PATCH 24/25] Remove feature flag for testing on container pages --- .../features/component_settings_editor_helpers.py | 5 ----- cms/envs/common.py | 3 --- 2 files changed, 8 deletions(-) diff --git a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py index 9ed0427730..85bffed9d9 100644 --- a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py +++ b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py @@ -55,11 +55,6 @@ def click_new_component_button(step, component_button_css): world.css_click(component_button_css) - if FEATURES['USE_CONTAINER_PAGE_FOR_TESTING']: - unit_url = world.browser.url - container_url = unit_url.replace('/unit/', '/container/') - world.visit(container_url) - def _click_advanced(): css = 'ul.problem-type-tabs a[href="#tab2"]' diff --git a/cms/envs/common.py b/cms/envs/common.py index a4b3a9ae62..022e9dd94b 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -99,9 +99,6 @@ FEATURES = { # Turn off Advanced Security by default 'ADVANCED_SECURITY': False, - - # Switch acceptance tests to use the container page instead of the unit page - 'USE_CONTAINER_PAGE_FOR_TESTING': False, } ENABLE_JASMINE = False From df0973e7710ee261e184947d07bc5804b3494019 Mon Sep 17 00:00:00 2001 From: Frances Botsford Date: Wed, 9 Apr 2014 16:26:29 -0400 Subject: [PATCH 25/25] addressing review feedback --- .../js/views/video/translations_editor.js | 2 +- cms/static/sass/elements/_modal-window.scss | 29 ++++++++++++------- cms/static/sass/elements/_xblocks.scss | 4 +++ cms/static/sass/views/_container.scss | 2 ++ cms/static/sass/views/_unit.scss | 15 +++++----- cms/templates/overview.html | 2 +- cms/templates/widgets/source-edit.html | 2 +- 7 files changed, 35 insertions(+), 21 deletions(-) diff --git a/cms/static/js/views/video/translations_editor.js b/cms/static/js/views/video/translations_editor.js index d2fc79c6e7..75e2a01c39 100644 --- a/cms/static/js/views/video/translations_editor.js +++ b/cms/static/js/views/video/translations_editor.js @@ -145,7 +145,7 @@ function($, _, AbstractEditor, FileUpload, UploadDialog) { target = $(event.currentTarget), lang = target.data('lang'), model = new FileUpload({ - title: gettext('Upload translation.'), + title: gettext('Upload translation'), fileFormats: ['srt'] }), view = new VideoUploadDialog({ diff --git a/cms/static/sass/elements/_modal-window.scss b/cms/static/sass/elements/_modal-window.scss index 7efff97f7a..9c0645fa95 100644 --- a/cms/static/sass/elements/_modal-window.scss +++ b/cms/static/sass/elements/_modal-window.scss @@ -17,6 +17,7 @@ text-align: left; .modal-content { + position: relative; box-shadow: 0 0 3px $shadow-d1; background-color: $white; padding: 5%; @@ -106,6 +107,7 @@ // large modals - component editors and interactives .modal-lg { width: 75%; + min-width: ($baseline*27.5); height: auto; &.modal-editor { @@ -114,12 +116,12 @@ margin: ($baseline/4) ($baseline/2); .title { - width: 48%; + width: 47%; display: inline-block; } .editor-modes { - width: 49%; + width: 48%; display: inline-block; text-align: right; @@ -173,7 +175,7 @@ .modal-window { .CodeMirror { - height: 100%; + height: 365px; } .wrapper-comp-settings { @@ -205,29 +207,34 @@ left: 10% !important; } - .modal-content { - padding: 2%; + .modal-header { + margin: ($baseline/2) 2%; .title { width: auto; + margin: 0 0 ($baseline/4) 0; } .editor-modes { display: none; } + } - input[type="file"] { - margin: $baseline 0; - } + .modal-content { + padding: 2%; .message { - margin: 0 0 $baseline 0; + margin: 0 ($baseline/4) ($baseline/4) ($baseline/4); } - .modal-actions { - padding: ($baseline/2) 0; + input[type="file"] { + margin: 0; } } + + .modal-actions { + padding: ($baseline/2) 0; + } } } diff --git a/cms/static/sass/elements/_xblocks.scss b/cms/static/sass/elements/_xblocks.scss index 5306e3e928..38157c8aa0 100644 --- a/cms/static/sass/elements/_xblocks.scss +++ b/cms/static/sass/elements/_xblocks.scss @@ -61,6 +61,10 @@ margin: 0 ($baseline/4); height: ($baseline*1.25); width: $baseline; + + &:focus { + outline: 0; + } } .action-view { diff --git a/cms/static/sass/views/_container.scss b/cms/static/sass/views/_container.scss index 1275bcac0e..a6a9147b87 100644 --- a/cms/static/sass/views/_container.scss +++ b/cms/static/sass/views/_container.scss @@ -30,6 +30,8 @@ body.view-container { .content-primary { margin-right: flex-gutter(); width: flex-grid(9,12); + box-shadow: none; + border: 0; .no-container-content { @extend %ui-well; diff --git a/cms/static/sass/views/_unit.scss b/cms/static/sass/views/_unit.scss index 6a3a7582ef..e2ff0a5b62 100644 --- a/cms/static/sass/views/_unit.scss +++ b/cms/static/sass/views/_unit.scss @@ -1313,17 +1313,18 @@ body.unit { // ==================== // Latex Compiler + +.wrapper-comp-editor.latex-problem { + margin-top: ($baseline*2.5); +} + .launch-latex-compiler { + position: absolute; + width: 100%; + top: 0; background-color: $white; padding: $baseline/2 0 $baseline/2 $baseline; border-bottom: 1px solid $gray-l2; - opacity: 0.8; - - - &:hover { - @include transition(opacity $tmg-f2 ease-in-out 0s); - opacity: 1.0s; - } } // hides latex compiler button if settings mode is-active diff --git a/cms/templates/overview.html b/cms/templates/overview.html index 68dd966a14..7e9fa5f8c5 100644 --- a/cms/templates/overview.html +++ b/cms/templates/overview.html @@ -293,7 +293,7 @@ require(["domReady!", "jquery", "js/models/location", "js/models/section", "js/v
  4. - +
  5. diff --git a/cms/templates/widgets/source-edit.html b/cms/templates/widgets/source-edit.html index fda097063b..30d0aaee2f 100644 --- a/cms/templates/widgets/source-edit.html +++ b/cms/templates/widgets/source-edit.html @@ -48,7 +48,7 @@ require(["jquery", "jquery.leanModal", "codemirror/stex"], function($) { ## cannot do this with css or it gets overwritten var editorH = $( window ).height() - 100; var editorW = $( window ).innerWidth() - 70; - hlsmodal.attr('style', function(i,s) { return s + 'margin: 2% 0 0 10% !important; left:0; height:' + editorH + 'px;'}); + hlsmodal.attr('style', function(i,s) { return s + 'margin: 2% 0 0 10% !important; left:10%; height:' + editorH + 'px;'}); ## setup file input ## need to insert this only after hls triggered, because otherwise it