From 1b011af7e2eddba700aca4e629660613cd956ea6 Mon Sep 17 00:00:00 2001 From: muhammad-ammar Date: Wed, 4 Jan 2017 11:02:18 +0500 Subject: [PATCH] move dialog TNL-6047 --- .../component_settings_editor_helpers.py | 4 +- cms/djangoapps/contentstore/features/pages.py | 2 +- .../contentstore/views/tests/utils.py | 7 +- cms/static/cms/js/spec/main.js | 1 + cms/static/js/spec/views/container_spec.js | 4 +- .../js/spec/views/modals/move_xblock_spec.js | 36 ++++++++++ .../js/spec/views/pages/container_spec.js | 22 ++++++- cms/static/js/views/modals/base_modal.js | 28 +++++--- .../js/views/modals/course_outline_modals.js | 2 +- cms/static/js/views/modals/edit_xblock.js | 34 ++-------- .../js/views/modals/move_xblock_modal.js | 53 +++++++++++++++ cms/static/js/views/pages/container.js | 20 ++++-- cms/static/js/views/utils/xblock_utils.js | 47 +++++++++---- cms/static/sass/elements/_controls.scss | 12 +++- cms/templates/component.html | 18 +++-- .../js/mock/mock-container-xblock.underscore | 66 ++++++++++++------- cms/templates/js/move-xblock-modal.underscore | 4 ++ cms/templates/studio_xblock_wrapper.html | 25 ++++--- .../common/js/components/views/feedback.js | 9 +-- .../test/acceptance/pages/studio/container.py | 8 +-- 20 files changed, 290 insertions(+), 112 deletions(-) create mode 100644 cms/static/js/spec/views/modals/move_xblock_spec.js create mode 100644 cms/static/js/views/modals/move_xblock_modal.js create mode 100644 cms/templates/js/move-xblock-modal.underscore diff --git a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py index 6f572e9ae6..0a342f08e8 100644 --- a/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py +++ b/cms/djangoapps/contentstore/features/component_settings_editor_helpers.py @@ -129,8 +129,8 @@ def edit_component(index=0): # Verify that the "loading" indication has been hidden. world.wait_for_loading() # Verify that the "edit" button is present. - world.wait_for(lambda _driver: world.css_visible('a.edit-button')) - world.css_click('a.edit-button', index) + world.wait_for(lambda _driver: world.css_visible('.edit-button')) + world.css_click('.edit-button', index) world.wait_for_ajax_complete() diff --git a/cms/djangoapps/contentstore/features/pages.py b/cms/djangoapps/contentstore/features/pages.py index bb3e113b64..f16aec9d60 100644 --- a/cms/djangoapps/contentstore/features/pages.py +++ b/cms/djangoapps/contentstore/features/pages.py @@ -38,7 +38,7 @@ def not_see_any_static_pages(step): @step(u'I "(edit|delete)" the static page$') def click_edit_or_delete(step, edit_or_delete): - button_css = 'ul.component-actions a.%s-button' % edit_or_delete + button_css = 'ul.component-actions .%s-button' % edit_or_delete world.css_click(button_css) diff --git a/cms/djangoapps/contentstore/views/tests/utils.py b/cms/djangoapps/contentstore/views/tests/utils.py index 094a789214..00358d005f 100644 --- a/cms/djangoapps/contentstore/views/tests/utils.py +++ b/cms/djangoapps/contentstore/views/tests/utils.py @@ -54,9 +54,10 @@ class StudioPageTestCase(CourseTestCase): # Verify that there are no action buttons for public blocks expected_button_html = [ - '', - '', - '' + '
  • - + +
  • +
  • +
  • - +
  • diff --git a/cms/templates/js/mock/mock-container-xblock.underscore b/cms/templates/js/mock/mock-container-xblock.underscore index 606f1ff037..e66ca58701 100644 --- a/cms/templates/js/mock/mock-container-xblock.underscore +++ b/cms/templates/js/mock/mock-container-xblock.underscore @@ -44,16 +44,19 @@