Skip to content

Commit 3fab80c

Browse files
Code updates:
-Topcoder final fixes -NASA review fixes
1 parent 16e0eef commit 3fab80c

File tree

20 files changed

+709
-299
lines changed

20 files changed

+709
-299
lines changed

example/notebook/bundle.js

Lines changed: 49 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,23 @@
11
define([
2-
'openmct',
3-
'./src/controllers/notebookController',
4-
'./src/MCTSnapshot',
5-
'./src/entryDnd',
2+
"openmct",
3+
"./src/controllers/notebookController",
4+
"./src/controllers/newEntryController",
5+
"./src/controllers/selectSnapshotController",
6+
"./src/MCTSnapshot",
7+
"./src/entryDnd",
68
"./src/actions/viewSnapshot",
79
"./src/actions/annotateSnapshot",
810
"./src/actions/removeEmbed",
911
"./src/actions/createSnapshot",
1012
"./src/actions/removeSnapshot",
1113
"./src/actions/newEntryContextual",
1214
"./src/capabilities/notebookCapability",
13-
"./src/indicators/notificationIndicator",
14-
"text!./res/templates/controls/embedControl.html",
15-
"text!./res/templates/entry.html",
16-
"text!./res/templates/annotation.html",
17-
"text!./res/templates/notifications.html"
15+
"./src/indicators/notificationIndicator"
1816
], function (
1917
openmct,
20-
notebookController,
18+
notebookController,
19+
newEntryController,
20+
selectSnapshotController,
2121
MCTSnapshot,
2222
MCTEntryDnd,
2323
viewSnapshotAction,
@@ -28,10 +28,7 @@ define([
2828
newEntryAction,
2929
NotebookCapability,
3030
NotificationLaunchIndicator,
31-
embedControlTemplate,
32-
frameTemplate,
33-
annotateSnapshot,
34-
notificationTemplate
31+
legacyRegistry
3532
) {
3633
openmct.legacyRegistry.register("example/notebook", {
3734
"name": "Notebook Plugin",
@@ -69,7 +66,7 @@ define([
6966
"cssClass": "icon-notebook",
7067
"name": "notebook",
7168
"templateUrl": "templates/notebook.html",
72-
"editable": true,
69+
"editable": false,
7370
"uses": [
7471
"composition",
7572
"action"
@@ -89,31 +86,47 @@ define([
8986
"agentService",
9087
"now",
9188
"actionService",
92-
"$timeout"
89+
"$timeout",
90+
"$element"
91+
]
92+
},
93+
{
94+
"key": "newEntryController",
95+
"implementation": newEntryController,
96+
"depends": [ "$scope",
97+
"$rootScope"
98+
]
99+
},
100+
{
101+
"key": "selectSnapshotController",
102+
"implementation": selectSnapshotController,
103+
"depends": [ "$scope",
104+
"$rootScope"
93105
]
94106
}
95107
],
96108
"representations": [
97109
{
98110
"key": "draggedEntry",
99-
"template": frameTemplate
111+
"templateUrl": "templates/entry.html"
100112
}
101113
],
102114
"templates": [
103115
{
104116
"key": "annotate-snapshot",
105-
"template": annotateSnapshot
117+
"templateUrl": "templates/annotation.html"
106118
},
107119
{
108120
"key": "notificationTemplate",
109-
"template": notificationTemplate
121+
"templateUrl": "templates/notifications.html"
110122
}
111123
],
112124
"directives": [
113125
{
114126
"key": "mctSnapshot",
115127
"implementation": MCTSnapshot,
116128
"depends": [
129+
"$rootScope",
117130
"$document",
118131
"exportImageService",
119132
"dialogService",
@@ -124,7 +137,7 @@ define([
124137
"key": "mctEntryDnd",
125138
"implementation": MCTEntryDnd,
126139
"depends": [
127-
"$document","dndService","typeService"
140+
"$rootScope","$compile","dndService","typeService"
128141
]
129142
}
130143
],
@@ -168,7 +181,10 @@ define([
168181
"name": "Create Snapshot",
169182
"description": "Create a snapshot for the embed",
170183
"category": "embed-no-snap",
171-
"priority": "preferred"
184+
"priority": "preferred",
185+
"depends":[
186+
"$compile"
187+
]
172188
},
173189
{
174190
"key": "remove-embed",
@@ -185,19 +201,23 @@ define([
185201
]
186202
},
187203
{
188-
"key": "new-entry-contextual",
204+
"key": "notebook-new-entry",
189205
"implementation": newEntryAction,
190206
"name": "New Notebook Entry",
191207
"cssClass": "icon-notebook labeled",
192208
"description": "Add a new entry",
193209
"category": [
194-
"contextual"
210+
"contextual",
211+
"view-control"
195212
],
196213
"depends":[
214+
"$compile",
215+
"$rootScope",
197216
"dialogService",
198217
"notificationService",
199218
"linkService"
200-
]
219+
],
220+
"priority": "preferred"
201221
}
202222
],
203223
"indicators": [
@@ -220,8 +240,12 @@ define([
220240
"controls": [
221241
{
222242
"key": "embed-control",
223-
"template": embedControlTemplate
243+
"templateUrl": "templates/controls/embedControl.html"
224244
},
245+
{
246+
"key": "snapshot-select",
247+
"templateUrl": "templates/controls/snapSelect.html"
248+
}
225249
],
226250
"stylesheets": [
227251
{

0 commit comments

Comments
 (0)