Commit 8821e1b1 by Matjaz Gregoric

[TNL-6024] Move close button to beginning of dialog.

parent 8cb4774d
...@@ -675,11 +675,24 @@ ...@@ -675,11 +675,24 @@
z-index: 1500; z-index: 1500;
} }
.xblock--drag-and-drop .modal-dismiss-button {
font-size: 24px;
position: absolute;
top: 3px;
right: 3px;
padding: 5px 8px;
}
.xblock--drag-and-drop .modal-header h2 {
height: 30px;
line-height: 30px;
margin-bottom: 5px;
}
.xblock--drag-and-drop .modal-content { .xblock--drag-and-drop .modal-content {
border-radius: 5px; border-radius: 5px;
background-color: #ffffff; background-color: #ffffff;
margin-bottom: 5px; padding: 8px;
padding: 5px;
} }
.xblock--drag-and-drop .modal-content li { .xblock--drag-and-drop .modal-content li {
......
...@@ -261,8 +261,12 @@ function DragAndDropTemplates(configuration) { ...@@ -261,8 +261,12 @@ function DragAndDropTemplates(configuration) {
h('div.keyboard-help-dialog', [ h('div.keyboard-help-dialog', [
h('div.modal-window-overlay'), h('div.modal-window-overlay'),
h('div.modal-window', {attributes: {role: 'dialog', 'aria-labelledby': labelledby_id, tabindex: -1}}, [ h('div.modal-window', {attributes: {role: 'dialog', 'aria-labelledby': labelledby_id, tabindex: -1}}, [
h('button.modal-dismiss-button.unbutton', {attributes: {tabindex: 1}}, [
h('span.fa.fa-remove', {attributes: {'aria-hidden': true}}),
h('span.sr', gettext('Close'))
]),
h('div.modal-header', [ h('div.modal-header', [
h('h2.modal-window-title#'+labelledby_id, gettext('Keyboard Help')) h('h2.modal-window-title', {id: labelledby_id}, gettext('Keyboard Help'))
]), ]),
h('div.modal-content', [ h('div.modal-content', [
h('p.sr', gettext('This is a screen reader-friendly problem.')), h('p.sr', gettext('This is a screen reader-friendly problem.')),
...@@ -275,9 +279,6 @@ function DragAndDropTemplates(configuration) { ...@@ -275,9 +279,6 @@ function DragAndDropTemplates(configuration) {
h('li', gettext('Press ESC if you want to cancel the drop operation (for example, to select a different item).')), h('li', gettext('Press ESC if you want to cancel the drop operation (for example, to select a different item).')),
h('li', gettext('TAB back to the list of draggable items and repeat this process until all of the draggable items have been placed on their respective dropzones.')), h('li', gettext('TAB back to the list of draggable items and repeat this process until all of the draggable items have been placed on their respective dropzones.')),
]) ])
]),
h('div.modal-actions', [
h('button.modal-dismiss-button', gettext("OK"))
]) ])
]) ])
]) ])
......
...@@ -527,7 +527,7 @@ msgid "" ...@@ -527,7 +527,7 @@ msgid ""
msgstr "" msgstr ""
#: public/js/drag_and_drop.js #: public/js/drag_and_drop.js
msgid "OK" msgid "Close"
msgstr "" msgstr ""
#: public/js/drag_and_drop.js #: public/js/drag_and_drop.js
......
...@@ -627,8 +627,8 @@ msgstr "" ...@@ -627,8 +627,8 @@ msgstr ""
"ηση ρяσι∂єηт, ѕυηт ιη ¢υłρα qυι σƒƒι¢ια ∂єѕєяυηт мσłłιт αηιм ι∂ є#" "ηση ρяσι∂єηт, ѕυηт ιη ¢υłρα qυι σƒƒι¢ια ∂єѕєяυηт мσłłιт αηιм ι∂ є#"
#: public/js/drag_and_drop.js #: public/js/drag_and_drop.js
msgid "OK" msgid "Close"
msgstr "ÖK Ⱡ'σя#" msgstr "Çlösé Ⱡ'σя#"
#: public/js/drag_and_drop.js #: public/js/drag_and_drop.js
msgid "Problem" msgid "Problem"
......
...@@ -310,6 +310,10 @@ class InteractionTestBase(object): ...@@ -310,6 +310,10 @@ class InteractionTestBase(object):
def assertNotDraggable(self, item_value): def assertNotDraggable(self, item_value):
self.assertFalse(self._get_draggable_property(item_value)) self.assertFalse(self._get_draggable_property(item_value))
def assertFocused(self, element):
focused_element = self.browser.switch_to.active_element
self.assertTrue(element == focused_element, 'expected element to have focus')
@staticmethod @staticmethod
def wait_until_ondrop_xhr_finished(elem): def wait_until_ondrop_xhr_finished(elem):
""" """
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment