1
1
define ( [
2
2
"openmct" ,
3
- "./src/controllers/notebookController" ,
4
- "./src/controllers/newEntryController" ,
5
- "./src/controllers/selectSnapshotController" ,
3
+ "./src/controllers/NotebookController" ,
4
+ "./src/controllers/NewEntryController" ,
5
+ "./src/controllers/SelectSnapshotController" ,
6
+ "./src/controllers/LayoutNotebookController" ,
6
7
"./src/directives/MCTSnapshot" ,
7
- "./src/directives/entryDnd" ,
8
- "./src/actions/viewSnapshot" ,
9
- "./src/actions/annotateSnapshot" ,
10
- "./src/actions/removeEmbed" ,
11
- "./src/actions/createSnapshot" ,
12
- "./src/actions/removeSnapshot" ,
13
- "./src/actions/newEntryContextual" ,
14
- "./src/capabilities/notebookCapability" ,
15
- "./src/indicators/notificationIndicator"
8
+ "./src/directives/MCTModalNotebook" ,
9
+ "./src/directives/EntryDnd" ,
10
+ "./src/actions/ViewSnapshot" ,
11
+ "./src/actions/AnnotateSnapshot" ,
12
+ "./src/actions/RemoveEmbed" ,
13
+ "./src/actions/CreateSnapshot" ,
14
+ "./src/actions/RemoveSnapshot" ,
15
+ "./src/actions/NewEntryContextual" ,
16
+ "./src/capabilities/NotebookCapability" ,
17
+ "./src/policies/CompositionPolicy" ,
18
+ "./src/policies/ViewPolicy" ,
19
+
16
20
] , function (
17
21
openmct ,
18
- notebookController ,
19
- newEntryController ,
20
- selectSnapshotController ,
22
+ NotebookController ,
23
+ NewEntryController ,
24
+ SelectSnapshotController ,
25
+ LayoutNotebookController ,
21
26
MCTSnapshot ,
27
+ MCTModalNotebook ,
22
28
MCTEntryDnd ,
23
- viewSnapshotAction ,
29
+ ViewSnapshotAction ,
24
30
AnnotateSnapshotAction ,
25
- removeEmbedAction ,
26
- createSnapshotAction ,
27
- removeSnapshotAction ,
31
+ RemoveEmbedAction ,
32
+ CreateSnapshotAction ,
33
+ RemoveSnapshotAction ,
28
34
newEntryAction ,
29
35
NotebookCapability ,
30
- NotificationLaunchIndicator
36
+ CompositionPolicy ,
37
+ ViewPolicy
31
38
) {
32
39
openmct . legacyRegistry . register ( "example/notebook" , {
33
40
"name" : "Notebook Plugin" ,
34
41
"description" : "Create and save timestamped notes with embedded object snapshots." ,
35
42
"extensions" :
36
43
{
37
- "types" :[
38
- {
39
- "key" : "notebook" ,
40
- "name" : "Notebook" ,
41
- "cssClass" : "icon-notebook" ,
42
- "description" : "Create and save timestamped notes with embedded object snapshots." ,
43
- "features" : [ "creation" ] ,
44
- "model" : {
45
- "entries" :[
46
- { "createdOn" : 1507512539258 ,
47
- "text" : "Quis qui dolupti atempe non preicias qui dolorro" ,
48
- "embeds" :[ ]
49
- } ,
50
- { "createdOn" : 1507570153599 ,
51
- "text" : "Rehek rerspis nis dem re verae remporrunti sintis vendi comnimi ntiusapic teceseque."
52
- } ,
53
- { "createdOn" : 1507595098278 ,
54
- "text" : "Rehek rerspis nis dem re verae remporrunti sintis vendi comnimi ntiusapic teceseque."
55
- }
56
- ] ,
57
- "composition" :[ ] ,
58
- "entryTypes" :[ ]
59
- }
60
- }
61
- ] ,
62
- "views" : [
44
+ "types" :[
45
+ {
46
+ "key" : "notebook" ,
47
+ "name" : "Notebook" ,
48
+ "cssClass" : "icon-notebook" ,
49
+ "description" : "Create and save timestamped notes with embedded object snapshots." ,
50
+ "features" : [ "creation" ] ,
51
+ "model" : {
52
+ "entries" :[
53
+ { "createdOn" : 1507512539258 ,
54
+ "text" : "Quis qui dolupti atempe non preicias qui dolorro" ,
55
+ "embeds" :[ ]
56
+ } ,
57
+ { "createdOn" : 1507570153599 ,
58
+ "text" : "Rehek rerspis nis dem re verae remporrunti sintis vendi comnimi ntiusapic teceseque."
59
+ } ,
60
+ { "createdOn" : 1507595098278 ,
61
+ "text" : "Rehek rerspis nis dem re verae remporrunti sintis vendi comnimi ntiusapic teceseque."
62
+ }
63
+ ] ,
64
+ "composition" :[ ] ,
65
+ "entryTypes" :[ ]
66
+ }
67
+ }
68
+ ] ,
69
+ "views" : [
63
70
{
64
71
"key" : "notebook.view" ,
65
72
"type" : "notebook" ,
@@ -75,11 +82,42 @@ define([
75
82
"drop"
76
83
]
77
84
} ,
78
- ] ,
79
- "controllers" : [
85
+ {
86
+ "key" : "layoutNotebook" ,
87
+ "name" : "Display Layout" ,
88
+ "cssClass" : "icon-layout" ,
89
+ "type" : "layout" ,
90
+ "templateUrl" : "templates/layoutNotebook.html" ,
91
+ "editable" : true ,
92
+ "uses" : [ ] ,
93
+ "toolbar" : {
94
+ "sections" : [
95
+ {
96
+ "items" : [
97
+ {
98
+ "method" : "showFrame" ,
99
+ "cssClass" : "icon-frame-show" ,
100
+ "control" : "button" ,
101
+ "title" : "Show frame" ,
102
+ "description" : "Show frame"
103
+ } ,
104
+ {
105
+ "method" : "hideFrame" ,
106
+ "cssClass" : "icon-frame-hide" ,
107
+ "control" : "button" ,
108
+ "title" : "Hide frame" ,
109
+ "description" : "Hide frame"
110
+ }
111
+ ]
112
+ }
113
+ ]
114
+ }
115
+ }
116
+ ] ,
117
+ "controllers" : [
80
118
{
81
- "key" : "notebookController " ,
82
- "implementation" : notebookController ,
119
+ "key" : "NotebookController " ,
120
+ "implementation" : NotebookController ,
83
121
"depends" : [ "$scope" ,
84
122
"dialogService" ,
85
123
"popupService" ,
@@ -93,24 +131,33 @@ define([
93
131
]
94
132
} ,
95
133
{
96
- "key" : "newEntryController " ,
97
- "implementation" : newEntryController ,
134
+ "key" : "NewEntryController " ,
135
+ "implementation" : NewEntryController ,
98
136
"depends" : [ "$scope" ,
99
137
"$rootScope"
100
138
]
101
139
} ,
102
140
{
103
141
"key" : "selectSnapshotController" ,
104
- "implementation" : selectSnapshotController ,
142
+ "implementation" : SelectSnapshotController ,
105
143
"depends" : [ "$scope" ,
106
144
"$rootScope"
107
145
]
146
+ } ,
147
+ {
148
+ "key" : "LayoutNotebookController" ,
149
+ "implementation" : LayoutNotebookController ,
150
+ "depends" : [ "$scope" ]
108
151
}
109
- ] ,
152
+ ] ,
110
153
"representations" : [
111
154
{
112
155
"key" : "draggedEntry" ,
113
156
"templateUrl" : "templates/entry.html"
157
+ } ,
158
+ {
159
+ "key" : "frameLayoutNotebook" ,
160
+ "templateUrl" : "templates/frameLayoutNotebook.html"
114
161
}
115
162
] ,
116
163
"templates" : [
@@ -145,12 +192,19 @@ define([
145
192
"typeService" ,
146
193
"notificationService"
147
194
]
195
+ } ,
196
+ {
197
+ "key" : "mctModalNotebook" ,
198
+ "implementation" : MCTModalNotebook ,
199
+ "depends" : [
200
+ "$document"
201
+ ]
148
202
}
149
203
] ,
150
204
"actions" : [
151
205
{
152
206
"key" : "view-snapshot" ,
153
- "implementation" : viewSnapshotAction ,
207
+ "implementation" : ViewSnapshotAction ,
154
208
"name" : "View Snapshot" ,
155
209
"description" : "View the large image in a modal" ,
156
210
"category" : "embed" ,
@@ -174,7 +228,7 @@ define([
174
228
175
229
{
176
230
"key" : "remove-embed" ,
177
- "implementation" : removeEmbedAction ,
231
+ "implementation" : RemoveEmbedAction ,
178
232
"name" : "Remove..." ,
179
233
"cssClass" : "icon-trash labeled" ,
180
234
"description" : "Remove this embed" ,
@@ -188,7 +242,7 @@ define([
188
242
} ,
189
243
{
190
244
"key" : "remove-snapshot" ,
191
- "implementation" : removeSnapshotAction ,
245
+ "implementation" : RemoveSnapshotAction ,
192
246
"name" : "Remove Snapshot" ,
193
247
"cssClass" : "icon-trash labeled" ,
194
248
"description" : "Remove Snapshot of the embed" ,
@@ -199,7 +253,7 @@ define([
199
253
} ,
200
254
{
201
255
"key" : "create-snapshot" ,
202
- "implementation" : createSnapshotAction ,
256
+ "implementation" : CreateSnapshotAction ,
203
257
"name" : "Create Snapshot" ,
204
258
"description" : "Create a snapshot for the embed" ,
205
259
"category" : "embed-no-snap" ,
@@ -228,10 +282,16 @@ define([
228
282
"priority" : "preferred"
229
283
}
230
284
] ,
231
- "indicators " : [
285
+ "licenses " : [
232
286
{
233
- "implementation" : NotificationLaunchIndicator ,
234
- "priority" : "fallback"
287
+ "name" : "painterro" ,
288
+ "version" : "4.1.0" ,
289
+ "author" : "Mike Bostock" ,
290
+ "description" : "D3 (or D3.js) is a JavaScript library for visualizing data using web standards. D3 helps you bring data to life using SVG, Canvas and HTML. D3 combines powerful visualization and interaction techniques with a data-driven approach to DOM manipulation, giving you the full capabilities of modern browsers and the freedom to design the right visual interface for your data." ,
291
+ "website" : "https://d3js.org/" ,
292
+ "copyright" : "Copyright 2010-2016 Mike Bostock" ,
293
+ "license" : "BSD-3-Clause" ,
294
+ "link" : "https://github.com/d3/d3/blob/master/LICENSE"
235
295
}
236
296
] ,
237
297
"capabilities" : [
@@ -245,6 +305,17 @@ define([
245
305
]
246
306
}
247
307
] ,
308
+ "policies" : [
309
+ {
310
+ "category" : "composition" ,
311
+ "implementation" : CompositionPolicy ,
312
+ "message" : "Objects of this type cannot contain objects of that type."
313
+ } ,
314
+ {
315
+ "category" : "view" ,
316
+ "implementation" : ViewPolicy
317
+ }
318
+ ] ,
248
319
"controls" : [
249
320
{
250
321
"key" : "embed-control" ,
@@ -255,7 +326,7 @@ define([
255
326
"templateUrl" : "templates/controls/snapSelect.html"
256
327
}
257
328
] ,
258
- "stylesheets" : [
329
+ "stylesheets" : [
259
330
{
260
331
"stylesheetUrl" : "css/notebook.css" ,
261
332
"theme" : "espresso"
0 commit comments