Sha256: 56e95cafb67aad6833fc4ffc50f5166e2e8302637e47876d694249e1506dcf93
Contents?: true
Size: 758 Bytes
Versions: 14
Compression:
Stored size: 758 Bytes
Contents
$(function () { // Copy text action $(".translations .actions .copy").click(function (e) { e.preventDefault(); var row = $(this).parents("tr") , original_text = row.find(".original textarea").val(); row.find(".translation textarea").val(original_text.trim()).trigger("change"); }); // avoid lose data $(".translations textarea").bind("keydown", function () { window.onbeforeunload = confirm; }); $(".translations textarea").bind("change", function () { window.onbeforeunload = confirm; }); $("input.save-translations").click(function () { window.onbeforeunload = null; }); function confirm() { return "You are leaving this page with non-saved data. Are you sure you want to continue?"; } });
Version data entries
14 entries across 14 versions & 1 rubygems