use proper case & remove unused view
This commit is contained in:
parent
216a5a87cb
commit
15a5d06495
|
@ -23,14 +23,14 @@ export default Ember.Component.extend({
|
|||
}
|
||||
|
||||
if (!this.get("other_accounts")) {
|
||||
this.set("other_accounts_loading", true);
|
||||
this.set("otherAccountsLoading", true);
|
||||
Discourse.AdminUser.findAll("active", {
|
||||
"ip": this.get("ip"),
|
||||
"exclude": this.get("user_id")
|
||||
}).then(function (users) {
|
||||
self.setProperties({
|
||||
other_accounts: users,
|
||||
other_accounts_loading: false,
|
||||
otherAccountsLoading: false,
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
|
@ -1,29 +0,0 @@
|
|||
Discourse.AdminIpLocatorView = Discourse.View.extend({
|
||||
templateName: 'admin/templates/ip_locator',
|
||||
classNames: ["iplocator"],
|
||||
actions: {
|
||||
hideBox: function(){
|
||||
this.set("showBox", false);
|
||||
},
|
||||
lookup: function(){
|
||||
if (!this.get("location")){
|
||||
$.get("http://ipinfo.io/" + this.get("ip"), function(response) {
|
||||
this.set("location", response);
|
||||
}.bind(this), "jsonp");
|
||||
}
|
||||
|
||||
if (!this.get("other_accounts")){
|
||||
this.set("other_accounts_loading", true);
|
||||
Discourse.ajax("/admin/users/list/active.json", {
|
||||
data: {"ip": this.get("ip"),
|
||||
"exclude": this.get("controller.id")
|
||||
}
|
||||
}).then(function (users) {
|
||||
this.set("other_accounts", users.map(function(u) { return Discourse.AdminUser.create(u);}));
|
||||
this.set("other_accounts_loading", false);
|
||||
}.bind(this));
|
||||
}
|
||||
this.set("showBox", true);
|
||||
}
|
||||
}
|
||||
});
|
|
@ -38,7 +38,7 @@
|
|||
|
||||
<dt>{{i18n ip_lookup.other_accounts}} <strong>{{other_accounts.length}}</strong></dt>
|
||||
<dd class="other-accounts">
|
||||
{{#loading-spinner size="small" condition=other_accounts_loading}}
|
||||
{{#loading-spinner size="small" condition=otherAccountsLoading}}
|
||||
{{#if other_accounts}}
|
||||
<ul>
|
||||
{{#each other_accounts}}
|
||||
|
|
Loading…
Reference in New Issue