mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
Fix more deprecations:
- Remove all `needs:` code
This commit is contained in:
@@ -1,11 +1,9 @@
|
||||
import { escapeExpression } from 'discourse/lib/utilities';
|
||||
|
||||
export default Ember.Controller.extend({
|
||||
needs: ['modal'],
|
||||
|
||||
sample: Em.computed.alias('model.sample'),
|
||||
errors: Em.computed.alias('model.errors'),
|
||||
count: Em.computed.alias('model.grant_count'),
|
||||
sample: Ember.computed.alias('model.sample'),
|
||||
errors: Ember.computed.alias('model.errors'),
|
||||
count: Ember.computed.alias('model.grant_count'),
|
||||
|
||||
count_warning: function() {
|
||||
if (this.get('count') <= 10) {
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
import { ajax } from 'discourse/lib/ajax';
|
||||
export default Ember.Controller.extend({
|
||||
needs: ['modal'],
|
||||
|
||||
modelChanged: function(){
|
||||
const model = this.get('model');
|
||||
|
||||
@@ -2,31 +2,27 @@ import ModalFunctionality from 'discourse/mixins/modal-functionality';
|
||||
import Backup from 'admin/models/backup';
|
||||
|
||||
export default Ember.Controller.extend(ModalFunctionality, {
|
||||
needs: ["adminBackupsLogs"],
|
||||
adminBackupsLogs: Ember.inject.controller(),
|
||||
|
||||
_startBackup: function (withUploads) {
|
||||
var self = this;
|
||||
Discourse.User.currentProp("hideReadOnlyAlert", true);
|
||||
Backup.start(withUploads).then(function() {
|
||||
self.get("controllers.adminBackupsLogs").clear();
|
||||
self.send("backupStarted");
|
||||
_startBackup(withUploads) {
|
||||
this.currentUser.set('hideReadOnlyAlert', true);
|
||||
Backup.start(withUploads).then(() => {
|
||||
this.get("adminBackupsLogs.logs").clear();
|
||||
this.send("backupStarted");
|
||||
});
|
||||
},
|
||||
|
||||
actions: {
|
||||
|
||||
startBackup: function () {
|
||||
startBackup() {
|
||||
this._startBackup();
|
||||
},
|
||||
|
||||
startBackupWithoutUpload: function () {
|
||||
startBackupWithoutUpload() {
|
||||
this._startBackup(false);
|
||||
},
|
||||
|
||||
cancel: function () {
|
||||
cancel() {
|
||||
this.send("closeModal");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user