mirror of
https://github.com/nasa/openmct.git
synced 2024-12-24 07:16:39 +00:00
[API] Begin moving out type
This commit is contained in:
parent
0c660238f2
commit
a6996df3df
@ -9,18 +9,6 @@ define([
|
||||
"name": "To-do Plugin",
|
||||
"description": "Allows creating and editing to-do lists.",
|
||||
"extensions": {
|
||||
"types": [
|
||||
{
|
||||
"key": "example.todo",
|
||||
"name": "To-Do List",
|
||||
"glyph": "2",
|
||||
"description": "A list of things that need to be done.",
|
||||
"features": ["creation"],
|
||||
"model": {
|
||||
"tasks": []
|
||||
}
|
||||
}
|
||||
],
|
||||
"views": [
|
||||
{
|
||||
"key": "example.todo",
|
||||
|
19
tutorials/todo/todo.js
Normal file
19
tutorials/todo/todo.js
Normal file
@ -0,0 +1,19 @@
|
||||
define(function () {
|
||||
return function todoPlugin(mct) {
|
||||
var todoType = new mct.Type({
|
||||
metadata: {
|
||||
label: "To-Do List",
|
||||
glyph: "2",
|
||||
description: "A list of things that need to be done."
|
||||
},
|
||||
initialize: function (model) {
|
||||
model.tasks = [];
|
||||
},
|
||||
creatable: true
|
||||
});
|
||||
|
||||
mct.type('example.todo', todoType);
|
||||
|
||||
return mct;
|
||||
};
|
||||
});
|
Loading…
Reference in New Issue
Block a user