Skip to content

Commit

Permalink
Re-enable cancel on exiting edit_link_save()
Browse files Browse the repository at this point in the history
Fixes a flaw in `edit_link_save()` in insert.js:

On exit, `edit_link_save()` correctly ends the loading state of the cancel button (i.e. the element with id `edit-close-y...`), but leaves the element disabled. This gets evident if and only if the ajax call (`action=edit_save`) returns with a `status` of `fail`, since only then the edit row with the disabled cancel button will not be faded out.
  • Loading branch information
BstName committed Mar 21, 2016
1 parent 1481bef commit 60931f4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions js/insert.js
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,7 @@ function edit_link_save(id) {
}
feedback(data.message, data.status);
end_loading("#edit-close-" + id);
end_disable("#edit-close-" + id);
end_disable("#actions-" + id + ' .button');
}
);
Expand Down

0 comments on commit 60931f4

Please sign in to comment.