Permalink
Browse files

fix(reportedcontent): show spinner during ajax delete/archive

  • Loading branch information...
mrclay committed Oct 13, 2016
1 parent b3e5dee commit 5de1c90a7b9bd3a0ec0a52da8cb42f9e46abbb7a
Showing with 7 additions and 2 deletions.
  1. +7 −2 mod/reportedcontent/views/default/elgg/reportedcontent.js
@@ -1,6 +1,7 @@
define(function (require) {
- var elgg = require('elgg'),
- $ = require('jquery');
+ var elgg = require('elgg');
+ var $ = require('jquery');
+ var spinner = require('elgg/spinner');
$('.elgg-menu-item-report-this a, .elgg-menu-item-reportuser a').each(function () {
if (!/address=/.test(this.href)) {
@@ -13,6 +14,8 @@ define(function (require) {
e.preventDefault();
var $form = $(this);
elgg.action($form[0].action, {
+ beforeSend: spinner.start,
+ complete: spinner.stop,
data: $form.serialize(),
success: function (data) {
if (data.status == 0) {
@@ -55,6 +58,8 @@ define(function (require) {
var action = $clicked.data('elggAction');
elgg.action(action.name, {
+ beforeSend: spinner.start,
+ complete: spinner.stop,
data: action.data,
success: function (data) {
if (data.status == -1) {

0 comments on commit 5de1c90

Please sign in to comment.