This commit is contained in:
Roman Sandler 2015-07-10 16:15:00 +10:00
Родитель 7bf99d4db5
Коммит 38f0ef937e
1 изменённых файлов: 1 добавлений и 10 удалений

11
app.js
Просмотреть файл

@ -13,7 +13,6 @@
'getTickets.done': 'onGetTicketsDone', 'getTickets.done': 'onGetTicketsDone',
'getOrganizationTickets.done': 'onGetOrganizationTicketsDone', 'getOrganizationTickets.done': 'onGetOrganizationTicketsDone',
'getTicketAudits.done': 'getTicketAuditsDone', 'getTicketAudits.done': 'getTicketAuditsDone',
'getCurrentUserLocale.done': 'onGetCurrentUserLocaleDone',
// UI // UI
'click .expand-bar': 'onClickExpandBar', 'click .expand-bar': 'onClickExpandBar',
@ -28,10 +27,6 @@
}, },
requests: { requests: {
getCurrentUserLocale: {
url: '/api/v2/users/me.json'
},
getLocales: { getLocales: {
url: '/api/v2/locales.json' url: '/api/v2/locales.json'
}, },
@ -262,7 +257,7 @@
this.storage.selectedKeys = JSON.parse(this.setting('selectedFields') || defaultSelection); this.storage.selectedKeys = JSON.parse(this.setting('selectedFields') || defaultSelection);
var defaultOrgSelection = '[]'; var defaultOrgSelection = '[]';
this.storage.selectedOrgKeys = JSON.parse(this.setting('orgFields') || defaultOrgSelection); this.storage.selectedOrgKeys = JSON.parse(this.setting('orgFields') || defaultOrgSelection);
if (!this.locale) { this.countedAjax('getCurrentUserLocale'); } if (!this.locale) { this.locale = this.currentUser().locale(); }
if (this.ticket().requester()) { if (this.ticket().requester()) {
this.requesterEmail = this.ticket().requester().email(); this.requesterEmail = this.ticket().requester().email();
this.countedAjax('getUser', this.ticket().requester().id()); this.countedAjax('getUser', this.ticket().requester().id());
@ -371,10 +366,6 @@
// REQUESTS ================================================================ // REQUESTS ================================================================
onGetCurrentUserLocaleDone: function(data) {
this.locale = data.user.locale;
},
onGetLocalesDone: function(data) { onGetLocalesDone: function(data) {
var locales = {}; var locales = {};
_.each(data.locales, function(obj) { _.each(data.locales, function(obj) {