<script type="text/javascript">
$(document).ready(function () {
$('.deleteDoc').attr('href', 'javascript://');
$('.deleteDoc').unbind("click");
$('.deleteDoc').click(function () {
$dialog.data('id', $(this).attr('id')).data('contdocId', $(this).attr('contdocId')).dialog("open");
});
var $dialog = $('<div/>')
.html("Warning: This will remove the selected Document.Only remove this Document if you intend not to use it again.<br/><br/>Do you wish to continue?")
.dialog({
autoOpen: false,
resizable: false,
height: 250,
modal: true,
title: 'Remove Document',
buttons:
[
{
text: "Continue",
id: "continuebtn",
click: function () {
var id = $(this).data('id');
var contId = $(this).data('contdocId');
var _parameters = { id: id, contId: contId };
$.ajax({
url: "/DocSet/Delete",
type: "GET",
data: _parameters,
success: function (data, textStatus, jqXHR) {
$('#contractDocIndex').html(data);
$('#contdocId').val("");
}
});
$(this).dialog('close');
}
},
{
text: "Cancel",
id: "cancelbtn",
click: function () {
$(this).dialog("close");
}
}]
});
</script>