Added additional account edit form

This commit is contained in:
RainLoop Team 2014-10-21 20:49:15 +04:00
parent c6ec3fb311
commit ebb6a06c65
36 changed files with 149 additions and 59 deletions

View file

@ -51,6 +51,14 @@
require('Knoin/Knoin').showScreenPopup(require('View/Popup/AddAccount'));
};
AccountsUserSetting.prototype.editAccount = function (oAccountItem)
{
if (oAccountItem && oAccountItem.canBeEdit())
{
require('Knoin/Knoin').showScreenPopup(require('View/Popup/AddAccount'), [oAccountItem]);
}
};
/**
* @param {AccountModel} oAccountToRemove
*/
@ -94,6 +102,21 @@
}
};
AccountsUserSetting.prototype.onBuild = function (oDom)
{
var self = this;
oDom
.on('click', '.account-item .e-action', function () {
var oAccountItem = ko.dataFor(this);
if (oAccountItem)
{
self.editAccount(oAccountItem);
}
})
;
};
module.exports = AccountsUserSetting;
}());