Commit 67845ba1 by Tim Krones

Address review comments.

- i18n: Use "example" instead of "e.g."
- No need to "preventDefault" for clickable elements that are now <button>s
parent dde1c6a0
...@@ -115,14 +115,14 @@ class DragAndDropBlock(XBlock, XBlockWithSettingsMixin, ThemableXBlockMixin): ...@@ -115,14 +115,14 @@ class DragAndDropBlock(XBlock, XBlockWithSettingsMixin, ThemableXBlockMixin):
item_background_color = String( item_background_color = String(
display_name=_("Item background color"), display_name=_("Item background color"),
help=_("The background color of draggable items in the problem (e.g. 'blue' or '#0000ff')."), help=_("The background color of draggable items in the problem (example: 'blue' or '#0000ff')."),
scope=Scope.settings, scope=Scope.settings,
default="", default="",
) )
item_text_color = String( item_text_color = String(
display_name=_("Item text color"), display_name=_("Item text color"),
help=_("Text color to use for draggable items (e.g. 'white' or '#ffffff')."), help=_("Text color to use for draggable items (example: 'white' or '#ffffff')."),
scope=Scope.settings, scope=Scope.settings,
default="", default="",
) )
......
...@@ -184,7 +184,6 @@ function DragAndDropEditBlock(runtime, element, params) { ...@@ -184,7 +184,6 @@ function DragAndDropEditBlock(runtime, element, params) {
$zoneTab $zoneTab
.on('click', '.add-zone', function(e) { .on('click', '.add-zone', function(e) {
e.preventDefault();
_fn.build.form.zone.add(); _fn.build.form.zone.add();
// Set focus to first field of the new zone. // Set focus to first field of the new zone.
$('.zones-form .zone-row:last input[type=text]:first', element).select(); $('.zones-form .zone-row:last input[type=text]:first', element).select();
...@@ -193,8 +192,6 @@ function DragAndDropEditBlock(runtime, element, params) { ...@@ -193,8 +192,6 @@ function DragAndDropEditBlock(runtime, element, params) {
.on('input', '.zone-row input', _fn.build.form.zone.changedInputHandler) .on('input', '.zone-row input', _fn.build.form.zone.changedInputHandler)
.on('change', '.align-select', _fn.build.form.zone.changedInputHandler) .on('change', '.align-select', _fn.build.form.zone.changedInputHandler)
.on('click', '.target-image-form button', function(e) { .on('click', '.target-image-form button', function(e) {
e.preventDefault();
var new_img_url = $.trim($('.target-image-form .background-url', element).val()); var new_img_url = $.trim($('.target-image-form .background-url', element).val());
if (new_img_url) { if (new_img_url) {
// We may need to 'expand' the URL before it will be valid. // We may need to 'expand' the URL before it will be valid.
...@@ -225,7 +222,6 @@ function DragAndDropEditBlock(runtime, element, params) { ...@@ -225,7 +222,6 @@ function DragAndDropEditBlock(runtime, element, params) {
$itemTab $itemTab
.on('click', '.add-item', function(e) { .on('click', '.add-item', function(e) {
e.preventDefault();
_fn.build.form.item.add(); _fn.build.form.item.add();
// Set focus to first field of the new item. // Set focus to first field of the new item.
$('.items-form .item:last input[type=text]:first', element).select(); $('.items-form .item:last input[type=text]:first', element).select();
...@@ -308,7 +304,6 @@ function DragAndDropEditBlock(runtime, element, params) { ...@@ -308,7 +304,6 @@ function DragAndDropEditBlock(runtime, element, params) {
uid = String($el.data('uid')), // cast to string since UID must be string but .data() converts data-uid="5" to 5 uid = String($el.data('uid')), // cast to string since UID must be string but .data() converts data-uid="5" to 5
array_index; array_index;
e.preventDefault();
$el.detach(); $el.detach();
// Find the uid of the zone in the array and remove it. // Find the uid of the zone in the array and remove it.
...@@ -447,7 +442,6 @@ function DragAndDropEditBlock(runtime, element, params) { ...@@ -447,7 +442,6 @@ function DragAndDropEditBlock(runtime, element, params) {
remove: function(e) { remove: function(e) {
var $el = $(e.currentTarget).closest('.item'); var $el = $(e.currentTarget).closest('.item');
e.preventDefault();
$el.detach(); $el.detach();
_fn.build.form.item.count--; _fn.build.form.item.count--;
...@@ -471,7 +465,6 @@ function DragAndDropEditBlock(runtime, element, params) { ...@@ -471,7 +465,6 @@ function DragAndDropEditBlock(runtime, element, params) {
} }
}, },
showAdvancedSettings: function(e) { showAdvancedSettings: function(e) {
e.preventDefault();
var $el = $(e.currentTarget).closest('.item'); var $el = $(e.currentTarget).closest('.item');
$el.find('.row.advanced').show(); $el.find('.row.advanced').show();
$el.find('.row.advanced-link').hide(); $el.find('.row.advanced-link').hide();
......
...@@ -171,7 +171,7 @@ msgid "Item background color" ...@@ -171,7 +171,7 @@ msgid "Item background color"
msgstr "" msgstr ""
#: drag_and_drop_v2.py #: drag_and_drop_v2.py
msgid "The background color of draggable items in the problem." msgid "The background color of draggable items in the problem (example: 'blue' or '#0000ff')."
msgstr "" msgstr ""
#: drag_and_drop_v2.py #: drag_and_drop_v2.py
...@@ -179,7 +179,7 @@ msgid "Item text color" ...@@ -179,7 +179,7 @@ msgid "Item text color"
msgstr "" msgstr ""
#: drag_and_drop_v2.py #: drag_and_drop_v2.py
msgid "Text color to use for draggable items." msgid "Text color to use for draggable items (example: 'white' or '#ffffff')."
msgstr "" msgstr ""
#: drag_and_drop_v2.py #: drag_and_drop_v2.py
......
...@@ -209,20 +209,20 @@ msgid "Item background color" ...@@ -209,20 +209,20 @@ msgid "Item background color"
msgstr "Ìtém ßäçkgröünd çölör Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, #" msgstr "Ìtém ßäçkgröünd çölör Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, #"
#: drag_and_drop_v2.py #: drag_and_drop_v2.py
msgid "The background color of draggable items in the problem." msgid "The background color of draggable items in the problem (example: 'blue' or '#0000ff')."
msgstr "" msgstr ""
"Thé ßäçkgröünd çölör öf dräggäßlé ïtéms ïn thé prößlém. Ⱡ'σяєм ιρѕυм ∂σłσя " "Thé ßäçkgröünd çölör öf dräggäßlé ïtéms ïn thé prößlém (éxämplé: 'ßlüé' ör '#0000ff'). "
"ѕιт αмєт, ¢σηѕє¢тєтυя α#" "Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢#"
#: drag_and_drop_v2.py #: drag_and_drop_v2.py
msgid "Item text color" msgid "Item text color"
msgstr "Ìtém téxt çölör Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт α#" msgstr "Ìtém téxt çölör Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт α#"
#: drag_and_drop_v2.py #: drag_and_drop_v2.py
msgid "Text color to use for draggable items." msgid "Text color to use for draggable items (example: 'white' or '#ffffff')."
msgstr "" msgstr ""
"Téxt çölör tö üsé för dräggäßlé ïtéms. Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, " "Téxt çölör tö üsé för dräggäßlé ïtéms (éxämplé: 'whïté' ör '#ffffff'). "
"¢σηѕє¢тєтυя#" "Ⱡ'σяєм ιρѕυм ∂σłσя ѕιт αмєт, ¢σηѕє¢тєтυя #"
#: drag_and_drop_v2.py #: drag_and_drop_v2.py
msgid "Problem data" msgid "Problem data"
......
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