| | 2082 | dispose: function() { |
| | 2083 | if ( this.disposing ) |
| | 2084 | return media.View.prototype.dispose.apply( this, arguments ); |
| | 2085 | |
| | 2086 | // Run remove on `dispose`, so we can be sure to refresh the |
| | 2087 | // uploader with a view-less DOM. Track whether we're disposing |
| | 2088 | // so we don't trigger an infinite loop. |
| | 2089 | this.disposing = true; |
| | 2090 | return this.remove(); |
| | 2091 | }, |
| | 2092 | |
| | 2093 | remove: function() { |
| | 2094 | var result = media.View.prototype.remove.apply( this, arguments ); |
| | 2095 | this.refresh(); |
| | 2096 | return result; |
| | 2097 | }, |
| | 2098 | |
| | 2099 | refresh: function() { |
| | 2100 | var uploader = this.controller.uploader; |
| | 2101 | |
| | 2102 | if ( uploader ) |
| | 2103 | uploader.refresh(); |
| | 2104 | }, |
| | 2105 | |