1

In Control Panel we can see the progress of a certain job. I would like to hook on events like "DONE" or "FAILED" and do certain things in Control Panel, e.g. reloading the page, or redirecting somewhere

Update: in Craft.js line 11429, I can find

// Fire a setJobInfo event
this.trigger('setJobInfo');

Maybe I can do something with it.

1

I found a solution. In my control panel module javascript, I can do

Craft.cp.on('setJobInfo', function(e){
  console.log(e);
});

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.