Files
digiproof/js/store.js
git@daemon.de 81aa7e83e4 bugfix: an asset associated to default successor didn't appear in the printout.
cause: the default successor (id=0) is loaded on startup (kind of a fixture)
but it wasn't comitted and therefore the hasMany property wasn't updated when
the asset were saved.
2013-09-13 08:09:19 +02:00

35 lines
987 B
JavaScript

App.store = DS.Store.createWithMixins({
revision: 12,
adapter: DS.LSAdapter.create({
namespace: 'digiproof'
}),
init: function() {
this._super();
this.loadMany(App.Import,[ { 'id': 0, 'importdata': '' }]);
if(lang === 'de') {
this.loadMany(App.Order,
[
{ 'id': 0, 'name': 'weiter zu betreiben' },
{ 'id': 1, 'name': 'zu kündigen' },
{ 'id': 2, 'name': 'zu übertragen' },
{ 'id': 3, 'name': 'nach Gutdünken abzuwickeln' },
]
);
this.loadMany(App.Successor, [{ 'id': 0, 'name': 'Mein(e) regulären Erbe(n)' }]);
}
else {
this.loadMany(App.Order,
[
{ 'id': 0, 'name': 'maintain' },
{ 'id': 1, 'name': 'liquidate' },
{ 'id': 2, 'name': 'transfer' },
{ 'id': 3, 'name': 'decide herself' },
]
);
this.loadMany(App.Successor, [{ 'id': 0, 'name': 'My regular legal succesor(s)' }]);
}
this.commit();
}
});