#12874 closed Bug (fixed)
Information about aggregated tasks should be somehow accessible in aggregator#finished
| Reported by: | Piotrek Koszuliński | Owned by: | Marek Lewandowski |
|---|---|---|---|
| Priority: | Normal | Milestone: | CKEditor 4.5.0 Beta |
| Component: | General | Version: | 4.5.0 Beta |
| Keywords: | Cc: |
Description
This should be somehow possible:
notification.on( 'finished', function() {
editor.showNotification( 'Uploaded ' + this.getDoneTasksCount() + ' files.', 'success', 2000 );
} );
The information may also be passed as evt.data's properties, but I think that this is much simpler, because we just need to move _reset() call after firing the #finished event. Note - aggregator must be reset even if the event is cancelled.
Besides that, it would be good to add this code snippet to API docs. This is so common scenario that it should be mentioned in the aggregator's class description and #finished event docs.
Change History (5)
comment:1 Changed 11 years ago by
comment:2 Changed 11 years ago by
| Owner: | set to Marek Lewandowski |
|---|---|
| Status: | new → review |
comment:3 Changed 11 years ago by
I have moved tests descriptions before tests declarations, because it was misleading and suggest that this was a comment to the first line of the test code. I also added one assertion to be sure that getDoneTasksCount() returns now proper value. Closed with git:a191bee.
comment:4 Changed 11 years ago by
| Resolution: | → fixed |
|---|---|
| Status: | review → closed |
comment:5 Changed 11 years ago by
Method getDoneTasksCount is not related with _finish so it should not be included in its test.
But you've pointed out that in fact getDoneTasksCount does not have any tests.
As a result TC was added in git:ec874ca and revert in git:2f235aa840.

Pushed to t/12874.