Showing with 8 additions and 4 deletions.
  1. +8 −4 app/webroot/js/transcriptions.edit_in_place.js
@@ -22,12 +22,13 @@ $(document).ready(function() {
// Show the transcribe buttons if there are some
// hidden transcriptions
$('.needsReview:hidden').each(function(index) {
/* Move the toggling button in the menu */
/* Move the show button in the menu */
transcr = $(this);
menu = transcr.closest(".sentences_set").find('.transcribe-buttons');
button = transcr.find('.transcribe.option');
button.click(function(event) {
transcr.toggle();
button.remove();
transcr.toggle(true);
});
button.toggle(true);
menu.append(button);
@@ -74,8 +75,11 @@ $(document).ready(function() {
var contents = $('<span>').html(value);
return contents.find('.markup').text() || contents.text();
},
callback : function(result, settings) {
div.parent().replaceWith(result);
ajaxoptions : {
success : function(result, status) {
div.editing = false;
div.parent().replaceWith(result);
}
},
onsubmit : function(settings, self) {
// Save the submitted value to restore it on error