Hide flag modal while flag is submitted

This commit is contained in:
Neil Lalonde 2013-09-05 15:14:07 -04:00
parent cde631cbd1
commit c2f37d36ab
1 changed files with 2 additions and 0 deletions

View File

@ -58,9 +58,11 @@ Discourse.FlagController = Discourse.ObjectController.extend(Discourse.ModalFunc
if (opts) params = $.extend(params, opts); if (opts) params = $.extend(params, opts);
$('#discourse-modal').modal('hide');
postAction.act(params).then(function() { postAction.act(params).then(function() {
flagController.send('closeModal'); flagController.send('closeModal');
}, function(errors) { }, function(errors) {
$('#discourse-modal').modal('show');
flagController.displayErrors(errors); flagController.displayErrors(errors);
}); });
}, },