
$(document).ready(function()
{$('#deleteProcessLibrary').click(showDeleteProcessDlg);$('#btnDeleteProcessFirst').click(showDeleteProcessFinalDlg);$('#btnCancelDelete').click(cancelDeleteProcess);$('#btnDeleteProcessFinal').click(deleteProcess);$('#btnCancelDeleteFinal').click(cancelDeleteProcessFinal);});function showDeleteProcessDlg()
{$('#deleteProcessDlg').slideUp('fast');$('#deleteProcessDlg').css({'top':$(this).position().top-545,'right':$(window).width()-($(this).parent().position().left+($(this).parent().outerWidth()))}).slideDown('fast',function(){});}
function showDeleteProcessFinalDlg()
{$('#deleteProcessDlg').slideUp('fast');$('#deleteProcessFinalDlg').slideUp('fast');$('#deleteProcessFinalDlg').insertAfter('#deleteProcessDlg');$('#deleteProcessFinalDlg').css({'top':$('#deleteProcessLibrary').position().top-370,'right':$(window).width()-($('#deleteProcessLibrary').parent().position().left+($('#deleteProcessLibrary').parent().outerWidth()))}).slideDown('fast',function(){});}
function deleteProcess()
{$('#deleteProcessFinalDlg').slideUp('fast');$('#deleteProcessLibrary a').text('Deleting...');$('#deleteProcessFinalDlg').slideUp('fast',function()
{$('#deleteProcess').effect('pulsate',{times:2},500,function()
{$('#deleteProcessLibrary a').text('Deleted');});});var dSend={reposName:reposName};$.ajax({type:'POST',contentType:"application/json; charset=utf-8",dataType:"json",data:JSON.stringify(dSend),url:_reposRoot+'/ProcessDefinition.asmx/DeleteProcessLibrary',success:function(data){onDeleteProcess();}});return false;}
function onDeleteProcess()
{$('#deleteProcessLibrary a').css('cursor','default');window.location.href=siteRoot;}
function cancelDeleteProcess()
{$('#deleteProcessDlg').slideUp('fast');return false;}
function cancelDeleteProcessFinal()
{$('#deleteProcessFinalDlg').slideUp('fast');return false;}