Sha256: 79884254a89112827d6aa031cbd05df0360fb146d5b7e7697b588e1cf9fb9acb
Contents?: true
Size: 758 Bytes
Versions: 21
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, input.apply").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
21 entries across 21 versions & 1 rubygems