Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixin popup closed after subnet add from ipcalc #2993 #2994

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 13 additions & 1 deletion js/magic.js
Expand Up @@ -1880,8 +1880,15 @@ $(document).on("click", ".editSubnetSubmit, .editSubnetSubmitDelete", function()
else if(subnetData.search("freespace") != -1) {
setTimeout(function (){window.location.reload();}, 1500);
}
//from ipcalc - ignore
//from ipcalc - hide popup and results
else if (subnetData.search("ipcalc") != -1) {
setTimeout(function (){
hideSpinner();
hidePopups();
$('#selectSectionfromIPCalc option:first').prop('selected', true);
$('tr#selectSection').hide();
$('div.ipCalcResult').fadeOut('fast');
}, 1500);
}
//from admin
else {
Expand Down Expand Up @@ -1999,6 +2006,11 @@ $(document).on("change", "select#selectSectionfromIPCalc", function() {
//load add Subnet form / popup
$.post('app/admin/subnets/edit.php', postdata , function(data) {
$('#popupOverlay div.popup_w700').html(data);
// hide section selector in ip calc and reset otion to first value (need select)
$(document).on("click", ".hidePopups", function() {
$('#selectSectionfromIPCalc option:first').prop('selected', true);
$('.ipCalcResult tr#selectSection').hide();
});
showPopup('popup_w700');
hideSpinner();
}).fail(function(jqxhr, textStatus, errorThrown) { showError(jqxhr.statusText + "<br>Status: " + textStatus + "<br>Error: "+errorThrown); });
Expand Down