In this below script, open a calendar item in a modal dialog

function openDialog(pageUrl) {
var options = {
title : "calender",
width : 500,
height : 400,
url : pageUrl
};
SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
}
$('.ms-acal-month').ready(function () {
setTimeout(function() {
$('a[href*="DispForm.aspx"]').each(function() {
$(this).attr('onclick', 'openDialog("' + $(this).attr('href') + '")');
$(this).attr('href','javascript:void(0)');
});
}, 1000);
});
var options = {
title : "calender",
width : 500,
height : 400,
url : pageUrl
};
SP.SOD.execute('sp.ui.dialog.js', 'SP.UI.ModalDialog.showModalDialog', options);
}
$('.ms-acal-month').ready(function () {
setTimeout(function() {
$('a[href*="DispForm.aspx"]').each(function() {
$(this).attr('onclick', 'openDialog("' + $(this).attr('href') + '")');
$(this).attr('href','javascript:void(0)');
});
}, 1000);
});
No comments:
Post a Comment