Commit affe3f8a authored by alexpott's avatar alexpott

Issue #2471136 by eiriksm, nod_: Improve user interface for translating strings

parent 3a85c89b
......@@ -10,13 +10,13 @@
var $form = $("#locale-translate-edit-form").once('localetranslatedirty');
if ($form.length) {
// Display a notice if any row changed.
$form.one('change.localeTranslateDirty', 'table', function () {
$form.one('formUpdated.localeTranslateDirty', 'table', function () {
var $marker = $(Drupal.theme('localeTranslateChangedWarning')).hide();
$(this).addClass('changed').before($marker);
$marker.fadeIn('slow');
});
// Highlight changed row.
$form.on('change.localeTranslateDirty', 'tr', function () {
$form.on('formUpdated.localeTranslateDirty', 'tr', function () {
var
$row = $(this),
$rowToMark = $row.once('localemark'),
......@@ -34,7 +34,7 @@
if (trigger === 'unload') {
var $form = $("#locale-translate-edit-form").removeOnce('localetranslatedirty');
if ($form.length) {
$form.off('change.localeTranslateDirty');
$form.off('formUpdated.localeTranslateDirty');
}
}
}
......
......@@ -8,6 +8,7 @@ drupal.locale.admin:
dependencies:
- core/jquery
- core/drupal
- core/drupal.form
- core/jquery.once
drupal.locale.datepicker:
......
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