$(document).ready((function(){$(document).on("click",".button-save-theme-translations",(function(t){t.preventDefault();var a=$(t.currentTarget);a.addClass("button-loading");var e=a.closest("form"),n=[];$.each(e.find(".table tbody tr"),(function(t,a){n.push({key:$(a).find(".translation-key").val(),value:$(a).find(".translation-value").val()})})),$.ajax({url:e.prop("action"),type:"POST",data:{locale:e.find("input[name=locale]").val(),translations:JSON.stringify(n)},success:function(t){a.removeClass("button-loading"),t.error?Botble.showError(t.message):(Botble.showSuccess(t.message),e.removeClass("dirty"))},error:function(t){a.removeClass("button-loading"),Botble.handleError(t)}})}))}));
