[Rt-commit] rt branch 5.0/dont-disable-inline-edit-after-errors created. rt-5.0.4-64-g538456bc9c
BPS Git Server
git at git.bestpractical.com
Thu Jul 27 16:39:29 UTC 2023
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "rt".
The branch, 5.0/dont-disable-inline-edit-after-errors has been created
at 538456bc9c08f339a62341519d7733d391d8b746 (commit)
- Log -----------------------------------------------------------------
commit 538456bc9c08f339a62341519d7733d391d8b746
Author: Ronaldo Richieri <ronaldo at bestpractical.com>
Date: Fri Jul 14 18:03:32 2023 -0300
Do not disable inline edit after errors
Inline edit could fail because of various reasons like network error,
timeout, etc. People may still want to submit again or change other
tickets, so it's good to not totally disable it after errors happen.
diff --git a/share/static/js/util.js b/share/static/js/util.js
index 4fa5bae7ae..2a39daa720 100644
--- a/share/static/js/util.js
+++ b/share/static/js/util.js
@@ -1140,11 +1140,6 @@ function filterSearchResults () {
/* inline edit */
jQuery(function () {
var inlineEditEnabled = true;
- var disableInlineEdit = function () {
- inlineEditEnabled = false;
- jQuery('.editable').removeClass('editing').removeClass('loading');
- jQuery('table.inline-edit').removeClass('inline-edit');
- };
var escapeKeyHandler = null;
@@ -1241,9 +1236,24 @@ jQuery(function () {
var renderError = function (error) {
jQuery.jGrowl(error, { sticky: true, themeState: 'none' });
- cell.addClass('error text-danger').html(loc_key('error'));
+ cell.removeClass('loading');
+ tbody.removeClass('refreshing');
+ editor.find(':input').removeAttr('disabled');
+ var errorMessage = jQuery('<div>'+loc_key('error')+'</div>')
+ .addClass('error text-danger').hide();
+ var fadeTime = 250;
+ cell.find('div.value').fadeOut(fadeTime,function () {
+ cell.append(errorMessage);
+ errorMessage.fadeIn(fadeTime, function () {
+ setTimeout(function () {
+ errorMessage.fadeOut(fadeTime, function () {
+ errorMessage.remove();
+ cell.find('div.value').fadeIn(fadeTime);
+ });
+ }, 2000);
+ });
+ });
jQuery(document).off('keyup', escapeKeyHandler);
- disableInlineEdit();
};
jQuery.ajax({
url : editor.attr('action'),
-----------------------------------------------------------------------
hooks/post-receive
--
rt
More information about the rt-commit
mailing list