Revision 40a87146
b/ui/static/synnefo.js | ||
---|---|---|
2343 | 2343 |
|
2344 | 2344 |
// remove garbage rows that stay in DOM between requests |
2345 | 2345 |
$(".removable-field-row:hidden").remove(); |
2346 |
$("#invform #removable-name-container-1").dynamicField(); |
|
2346 |
|
|
2347 |
try { |
|
2348 |
$("#invform #removable-name-container-1").dynamicField(); |
|
2349 |
} catch (err) { |
|
2350 |
close_all_overlays(); |
|
2351 |
} |
|
2347 | 2352 |
|
2348 | 2353 |
$(".invitations-left").hide(); |
2349 | 2354 |
$("#notification-box .header-box").html(""); |
... | ... | |
2352 | 2357 |
form.submit(function(evn){ |
2353 | 2358 |
evn.preventDefault(); |
2354 | 2359 |
$.post(form.attr("action"), form.serialize(), function(data) { |
2355 |
$(cont).html(data); |
|
2356 |
handle_invitations(cont); |
|
2360 |
if (data.redirect) { |
|
2361 |
$.ajax({url: data.redirect, success: function(){ |
|
2362 |
handle_invitations(el) |
|
2363 |
}}); |
|
2364 |
} else { |
|
2365 |
$(cont).html(data); |
|
2366 |
handle_invitations(cont); |
|
2367 |
} |
|
2357 | 2368 |
}); |
2358 | 2369 |
return false; |
2359 | 2370 |
}); |
Also available in: Unified diff