Sortable accounts list

This commit is contained in:
RainLoop Team 2015-01-28 02:16:00 +04:00
parent 965ea317e4
commit b563528be7
10 changed files with 150 additions and 28 deletions

View file

@ -12,7 +12,8 @@
Translator = require('Common/Translator'),
Links = require('Common/Links'),
Data = require('Storage/User/Data'),
AccountStore = require('Stores/User/Account'),
Remote = require('Storage/User/Remote')
;
@ -21,10 +22,10 @@
*/
function AccountsUserSettings()
{
this.accounts = Data.accounts;
this.accounts = AccountStore.collection;
this.processText = ko.computed(function () {
return Data.accountsLoading() ? Translator.i18n('SETTINGS_ACCOUNTS/LOADING_PROCESS') : '';
return AccountStore.loading() ? Translator.i18n('SETTINGS_ACCOUNTS/LOADING_PROCESS') : '';
}, this);
this.visibility = ko.computed(function () {
@ -46,6 +47,13 @@
]});
}
AccountsUserSettings.prototype.scrollableOptions = function ()
{
return {
};
};
AccountsUserSettings.prototype.addNewAccount = function ()
{
require('Knoin/Knoin').showScreenPopup(require('View/Popup/AddAccount'));