call modal when edit btn is clicked on event view

This commit is contained in:
Andrew Bauer 2020-09-27 07:12:32 -05:00
parent 2655118cbd
commit a6413ccd7f
1 changed files with 16 additions and 1 deletions

View File

@ -950,8 +950,23 @@ function renameEvent() {
actQuery('rename', {eventName: newName}); actQuery('rename', {eventName: newName});
} }
// Manage the EDIT button
function editEvent() { function editEvent() {
createPopup('?view=eventdetail&eid='+eventData.Id, 'zmEventDetail', 'eventdetail'); $j.getJSON(thisUrl + '?request=modal&modal=eventdetail&eid='+eventData.Id)
.done(function(data) {
if ( $j('#eventDetailModal').length ) {
$j('#eventDetailModal').replaceWith(data.html);
} else {
$j("body").append(data.html);
}
$j('#eventDetailModal').modal('show');
// Manage the Save button
$j('#eventDetailSaveBtn').click(function(evt) {
evt.preventDefault();
$j('#eventDetailForm').submit();
});
})
.fail(logAjaxFail);
} }
function exportEvent() { function exportEvent() {