mirror of
https://github.com/discourse/discourse.git
synced 2024-11-24 20:26:35 +08:00
c0b277d273
This change is discussed here: https://meta.discourse.org/t/deprecating-es6-compatibility-layer/35821 Prior to this change we were not booting correctly with DISCOURSE_NO_CONSTANTS
30 lines
701 B
JavaScript
30 lines
701 B
JavaScript
import { exportEntity } from 'discourse/lib/export-csv';
|
|
import { outputExportResult } from 'discourse/lib/export-result';
|
|
import ScreenedEmail from 'admin/models/screened-email';
|
|
|
|
export default Ember.ArrayController.extend({
|
|
loading: false,
|
|
|
|
actions: {
|
|
clearBlock(row){
|
|
row.clearBlock().then(function(){
|
|
// feeling lazy
|
|
window.location.reload();
|
|
});
|
|
},
|
|
|
|
exportScreenedEmailList() {
|
|
exportEntity('screened_email').then(outputExportResult);
|
|
}
|
|
},
|
|
|
|
show() {
|
|
var self = this;
|
|
self.set('loading', true);
|
|
ScreenedEmail.findAll().then(function(result) {
|
|
self.set('model', result);
|
|
self.set('loading', false);
|
|
});
|
|
}
|
|
});
|