2014-12-22 11:17:04 -05:00
|
|
|
import { outputExportResult } from 'discourse/lib/export-result';
|
2014-12-06 23:15:22 -05:00
|
|
|
|
2014-07-22 23:20:45 -04:00
|
|
|
export default Ember.ArrayController.extend(Discourse.Presence, {
|
2013-08-14 16:40:12 -04:00
|
|
|
loading: false,
|
|
|
|
|
2014-09-11 16:30:47 -04:00
|
|
|
actions: {
|
|
|
|
clearBlock: function(row){
|
|
|
|
row.clearBlock().then(function(){
|
|
|
|
// feeling lazy
|
|
|
|
window.location.reload();
|
|
|
|
});
|
2014-12-06 23:15:22 -05:00
|
|
|
},
|
|
|
|
|
|
|
|
exportScreenedEmailList: function(subject) {
|
|
|
|
Discourse.ExportCsv.exportScreenedEmailList().then(outputExportResult);
|
2014-09-11 16:30:47 -04:00
|
|
|
}
|
2014-06-02 02:52:43 -04:00
|
|
|
},
|
|
|
|
|
2013-08-14 16:40:12 -04:00
|
|
|
show: function() {
|
|
|
|
var self = this;
|
2014-12-06 23:15:22 -05:00
|
|
|
self.set('loading', true);
|
2013-08-14 16:40:12 -04:00
|
|
|
Discourse.ScreenedEmail.findAll().then(function(result) {
|
2014-10-31 17:35:27 -04:00
|
|
|
self.set('model', result);
|
2013-08-14 16:40:12 -04:00
|
|
|
self.set('loading', false);
|
|
|
|
});
|
|
|
|
}
|
|
|
|
});
|