sort out import ordering in admin js

This commit is contained in:
Sam 2015-11-21 01:10:31 +11:00
parent 0c5d0ddb1b
commit 1c8b3c9447
5 changed files with 12 additions and 9 deletions

View File

@ -1,4 +1,3 @@
import AdminUser from 'admin/models/admin-user';
export default Ember.Component.extend({
classNames: ["ip-lookup"],
@ -44,6 +43,7 @@ export default Ember.Component.extend({
self.set("totalOthersWithSameIP", result.total);
});
const AdminUser = require('admin/models/admin-user').default;
AdminUser.findAll("active", data).then(function (users) {
self.setProperties({
other_accounts: users,

View File

@ -1,5 +1,3 @@
import Permalink from 'admin/models/permalink';
export default Ember.Component.extend({
classNames: ['permalink-form'],
formSubmitted: false,
@ -20,6 +18,8 @@ export default Ember.Component.extend({
actions: {
submit: function() {
const Permalink = require('admin/models/permalink').default;
if (!this.get('formSubmitted')) {
const self = this;
self.set('formSubmitted', true);

View File

@ -1,4 +1,4 @@
import ScreenedIpAddress from 'admin/models/screened_ip_address';
import ScreenedIpAddress from 'admin/models/screened-ip-address';
/**
A form to create an IP address that will be blocked or whitelisted.
Example usage:

View File

@ -1,11 +1,8 @@
import debounce from 'discourse/lib/debounce';
import EmailLog from 'admin/models/email-log';
export default Ember.Controller.extend({
filterEmailLogs: debounce(function() {
var self = this;
EmailLog.findAll(this.get("filter")).then(function(logs) {
self.set("model", logs);
});
const EmailLog = require('admin/models/email-log').default;
EmailLog.findAll(this.get("filter")).then(logs => this.set("model", logs));
}, 250).observes("filter.user", "filter.address", "filter.type", "filter.skipped_reason")
});

View File

@ -1,6 +1,12 @@
//= require_tree ./ember-addons
//= require admin/models/user-field
//= require admin/models/site-setting
//= require admin/models/screened-ip-address
//= require admin/models/api-key
//= require admin/models/tl3-requirements
//= require admin/models/admin-user
//= require_tree ./admin/models
//= require admin/routes/admin-email-logs
//= require admin/controllers/admin-email-skipped
//= require discourse/lib/export-result
//= require_tree ./admin