ACMS.Dispatch._revision=function(context){$(".js-get_revision_preview").click(function(){var $url=$(this).attr("href");var $rvid=ACMS.Library.getParameterByName("rvid",$url);var query={rvid:$rvid};if(!!ACMS.Config.aid){query.aid=ACMS.Config.aid}var $url=ACMS.Library.acmsLink({eid:ACMS.Config.eid,tpl:"ajax/revision-preview.html",Query:query},true);window.open($url,"_blank");return false});$(".js-revision_delete").click(function(){var $id=$(this).attr("id");var $row=$(this).parents("tr");if(!$id.match(/^(\d+)-(\d+)-(\d+)$/)){return false}else{var _bid=RegExp.$1,_eid=RegExp.$2,_rvid=RegExp.$3}if(confirm(ACMS.i18n("revision.message1"))){var url=ACMS.Library.acmsLink({eid:_eid,bid:_bid,Query:{rvid:_rvid}},true);$.ajax({url:url,type:"post",dataType:"html",data:{ACMS_POST_Revision_Delete:true,formToken:window.csrfToken},success:function(res){if(res=="OK"){$(this).unbind();$row.fadeOut("slow");$row.remove()}}})}else{return false}})};