1
1
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" ,
6
8
"./src/actions/viewSnapshot" ,
7
9
"./src/actions/annotateSnapshot" ,
8
10
"./src/actions/removeEmbed" ,
9
11
"./src/actions/createSnapshot" ,
10
12
"./src/actions/removeSnapshot" ,
11
13
"./src/actions/newEntryContextual" ,
12
14
"./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"
18
16
] , function (
19
17
openmct ,
20
- notebookController ,
18
+ notebookController ,
19
+ newEntryController ,
20
+ selectSnapshotController ,
21
21
MCTSnapshot ,
22
22
MCTEntryDnd ,
23
23
viewSnapshotAction ,
@@ -28,10 +28,7 @@ define([
28
28
newEntryAction ,
29
29
NotebookCapability ,
30
30
NotificationLaunchIndicator ,
31
- embedControlTemplate ,
32
- frameTemplate ,
33
- annotateSnapshot ,
34
- notificationTemplate
31
+ legacyRegistry
35
32
) {
36
33
openmct . legacyRegistry . register ( "example/notebook" , {
37
34
"name" : "Notebook Plugin" ,
@@ -69,7 +66,7 @@ define([
69
66
"cssClass" : "icon-notebook" ,
70
67
"name" : "notebook" ,
71
68
"templateUrl" : "templates/notebook.html" ,
72
- "editable" : true ,
69
+ "editable" : false ,
73
70
"uses" : [
74
71
"composition" ,
75
72
"action"
@@ -89,31 +86,47 @@ define([
89
86
"agentService" ,
90
87
"now" ,
91
88
"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"
93
105
]
94
106
}
95
107
] ,
96
108
"representations" : [
97
109
{
98
110
"key" : "draggedEntry" ,
99
- "template " : frameTemplate
111
+ "templateUrl " : "templates/entry.html"
100
112
}
101
113
] ,
102
114
"templates" : [
103
115
{
104
116
"key" : "annotate-snapshot" ,
105
- "template " : annotateSnapshot
117
+ "templateUrl " : "templates/annotation.html"
106
118
} ,
107
119
{
108
120
"key" : "notificationTemplate" ,
109
- "template " : notificationTemplate
121
+ "templateUrl " : "templates/notifications.html"
110
122
}
111
123
] ,
112
124
"directives" : [
113
125
{
114
126
"key" : "mctSnapshot" ,
115
127
"implementation" : MCTSnapshot ,
116
128
"depends" : [
129
+ "$rootScope" ,
117
130
"$document" ,
118
131
"exportImageService" ,
119
132
"dialogService" ,
@@ -124,7 +137,7 @@ define([
124
137
"key" : "mctEntryDnd" ,
125
138
"implementation" : MCTEntryDnd ,
126
139
"depends" : [
127
- "$document " , "dndService" , "typeService"
140
+ "$rootScope" , "$compile ", "dndService" , "typeService"
128
141
]
129
142
}
130
143
] ,
@@ -168,7 +181,10 @@ define([
168
181
"name" : "Create Snapshot" ,
169
182
"description" : "Create a snapshot for the embed" ,
170
183
"category" : "embed-no-snap" ,
171
- "priority" : "preferred"
184
+ "priority" : "preferred" ,
185
+ "depends" :[
186
+ "$compile"
187
+ ]
172
188
} ,
173
189
{
174
190
"key" : "remove-embed" ,
@@ -185,19 +201,23 @@ define([
185
201
]
186
202
} ,
187
203
{
188
- "key" : "new-entry-contextual " ,
204
+ "key" : "notebook- new-entry" ,
189
205
"implementation" : newEntryAction ,
190
206
"name" : "New Notebook Entry" ,
191
207
"cssClass" : "icon-notebook labeled" ,
192
208
"description" : "Add a new entry" ,
193
209
"category" : [
194
- "contextual"
210
+ "contextual" ,
211
+ "view-control"
195
212
] ,
196
213
"depends" :[
214
+ "$compile" ,
215
+ "$rootScope" ,
197
216
"dialogService" ,
198
217
"notificationService" ,
199
218
"linkService"
200
- ]
219
+ ] ,
220
+ "priority" : "preferred"
201
221
}
202
222
] ,
203
223
"indicators" : [
@@ -220,8 +240,12 @@ define([
220
240
"controls" : [
221
241
{
222
242
"key" : "embed-control" ,
223
- "template " : embedControlTemplate
243
+ "templateUrl " : "templates/controls/embedControl.html"
224
244
} ,
245
+ {
246
+ "key" : "snapshot-select" ,
247
+ "templateUrl" : "templates/controls/snapSelect.html"
248
+ }
225
249
] ,
226
250
"stylesheets" : [
227
251
{
0 commit comments