2015-01-29 05:24:58 +08:00
|
|
|
|
|
|
|
(function () {
|
|
|
|
|
|
|
|
'use strict';
|
|
|
|
|
|
|
|
var
|
2015-02-08 09:11:13 +08:00
|
|
|
_ = require('_'),
|
2015-02-06 23:26:20 +08:00
|
|
|
ko = require('ko')
|
2015-01-29 05:24:58 +08:00
|
|
|
;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @constructor
|
|
|
|
*/
|
|
|
|
function IdentityUserStore()
|
|
|
|
{
|
|
|
|
this.identities = ko.observableArray([]);
|
|
|
|
this.identities.loading = ko.observable(false).extend({'throttle': 100});
|
2015-02-08 09:11:13 +08:00
|
|
|
|
|
|
|
this.identitiesIDS = ko.computed(function () {
|
|
|
|
return _.compact(_.map(this.identities(), function (oItem) {
|
|
|
|
return oItem ? oItem.id : null;
|
|
|
|
}));
|
|
|
|
}, this);
|
2015-01-29 05:24:58 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = new IdentityUserStore();
|
|
|
|
|
|
|
|
}());
|