mirror of
https://github.com/nasa/openmct.git
synced 2024-12-23 06:52:24 +00:00
[API] Update todo tutorial
...to expect new domain object API (instead of explicitly wrapping it.)
This commit is contained in:
parent
1147f3aa47
commit
8295a0bed1
@ -48,7 +48,6 @@ define([
|
||||
var self = this;
|
||||
this.destroy();
|
||||
|
||||
mct.Objects.get(utils.parseKeyString(self.domainObject.getId())).then(function (object) {
|
||||
self.$els = $(todoTemplate);
|
||||
self.$buttons = {
|
||||
all: self.$els.find('.example-todo-button-all'),
|
||||
@ -60,10 +59,9 @@ define([
|
||||
|
||||
|
||||
self.initialize();
|
||||
self.objectChanged(object);
|
||||
self.objectChanged(this.domainObject);
|
||||
|
||||
mct.selection.on('change', self.render);
|
||||
});
|
||||
};
|
||||
|
||||
TodoView.prototype.destroy = function () {
|
||||
@ -148,9 +146,7 @@ define([
|
||||
var self = this;
|
||||
this.destroy();
|
||||
|
||||
mct.Objects.get(utils.parseKeyString(this.domainObject.getId())).then(function (wrappedObject){
|
||||
|
||||
self.mutableObject = mct.Objects.getMutable(wrappedObject);
|
||||
self.mutableObject = mct.Objects.getMutable(this.domainObject);
|
||||
|
||||
var $els = $(toolbarTemplate);
|
||||
var $add = $els.find('a.example-add');
|
||||
@ -188,7 +184,6 @@ define([
|
||||
self.$remove = $remove;
|
||||
self.handleSelectionChange();
|
||||
mct.selection.on('change', self.handleSelectionChange);
|
||||
});
|
||||
};
|
||||
|
||||
TodoToolbarView.prototype.handleSelectionChange = function () {
|
||||
|
Loading…
Reference in New Issue
Block a user