AJS.Attachments={showOlderVersions:function(A){A(".attachment-history a").click(function(D){var B=A(this).parents("table.tableview");var C=A(this).parents("tr:first")[0].id.substr(11);var E=A(".history-"+C,B);A(this).toggleClass("open");E.toggleClass("hidden");return AJS.stopEvent(D)})}};AJS.toInit(function(A){var B=A("#more-attachments-link");B.click(function(C){A(".more-attachments").removeClass("hidden");B.addClass("hidden");return AJS.stopEvent(C)});AJS.Attachments.showOlderVersions(A);A(".removeAttachmentLink").click(function(D){var C=A.trim(A(".filename",A(this).parents("tr")).attr("data-filename"));if(confirm(AJS.format(AJS.params.removeAttachmentWarning,C))){return true}else{return AJS.stopEvent(D)}})});

