remove duplicated getModal and pass fid=fid to getModal

This commit is contained in:
Isaac Connor 2021-05-07 15:34:08 -04:00
parent ea3bffb402
commit ff0d6e8e0f
1 changed files with 1 additions and 21 deletions

View File

@ -393,27 +393,7 @@ function delTerm( element ) {
} }
function debugFilter() { function debugFilter() {
getModal('filterdebug'); getModal('filterdebug', 'fid='+filterid);
}
// Load the Delete Confirmation Modal HTML via Ajax call
function getModal(id) {
$j.getJSON(thisUrl + '?request=modal&modal='+id+'&fid='+filterid)
.done(function(data) {
if ( !data ) {
console.error("Get modal returned no data");
return;
}
insertModalHtml(id, data.html);
manageModalBtns(id);
modal = $j('#'+id+'Modal');
if ( ! modal.length ) {
console.log("No modal found");
}
$j('#'+id+'Modal').modal('show');
})
.fail(logAjaxFail);
} }
function manageModalBtns(id) { function manageModalBtns(id) {