[Templates] Include templates using text plugin

Resolves #673
This commit is contained in:
Victor Woeltjen
2016-02-26 13:07:50 -08:00
parent 60efdb4ad3
commit bf1fa0ac4c
22 changed files with 292 additions and 100 deletions

View File

@@ -29,6 +29,8 @@ define([
"./src/controllers/RefreshingController",
"./src/actions/StartTimerAction",
"./src/actions/RestartTimerAction",
"text!./res/templates/clock.html",
"text!./res/templates/timer.html",
'legacyRegistry'
], function (
ClockIndicator,
@@ -38,6 +40,8 @@ define([
RefreshingController,
StartTimerAction,
RestartTimerAction,
clockTemplate,
timerTemplate,
legacyRegistry
) {
"use strict";
@@ -116,13 +120,13 @@ define([
"key": "clock",
"type": "clock",
"editable": false,
"templateUrl": "templates/clock.html"
"template": clockTemplate
},
{
"key": "timer",
"type": "timer",
"editable": false,
"templateUrl": "templates/timer.html"
"template": timerTemplate
}
],
"actions": [

View File

@@ -25,11 +25,13 @@ define([
"./src/ConductorRepresenter",
"./src/ConductorTelemetryDecorator",
"./src/ConductorService",
"text!./res/templates/time-conductor.html",
'legacyRegistry'
], function (
ConductorRepresenter,
ConductorTelemetryDecorator,
ConductorService,
timeConductorTemplate,
legacyRegistry
) {
"use strict";
@@ -70,7 +72,7 @@ define([
"templates": [
{
"key": "time-conductor",
"templateUrl": "templates/time-conductor.html"
"template": timeConductorTemplate
}
],
"constants": [

View File

@@ -25,11 +25,13 @@ define([
"./src/EventListController",
"./src/directives/MCTDataTable",
"./src/policies/MessagesViewPolicy",
"text!./res/templates/messages.html",
'legacyRegistry'
], function (
EventListController,
MCTDataTable,
MessagesViewPolicy,
messagesTemplate,
legacyRegistry
) {
"use strict";
@@ -44,7 +46,7 @@ define([
"name": "Messages",
"glyph": "5",
"description": "Scrolling list of messages.",
"templateUrl": "templates/messages.html",
"template": messagesTemplate,
"needs": [
"telemetry"
],

View File

@@ -25,11 +25,13 @@ define([
"./src/policies/ImageryViewPolicy",
"./src/controllers/ImageryController",
"./src/directives/MCTBackgroundImage",
"text!./res/templates/imagery.html",
'legacyRegistry'
], function (
ImageryViewPolicy,
ImageryController,
MCTBackgroundImage,
imageryTemplate,
legacyRegistry
) {
"use strict";
@@ -42,7 +44,7 @@ define([
"name": "Imagery",
"key": "imagery",
"glyph": "ã",
"templateUrl": "templates/imagery.html",
"template": imageryTemplate,
"priority": "preferred",
"needs": [
"telemetry"

View File

@@ -25,11 +25,27 @@ define([
"./src/LayoutController",
"./src/FixedController",
"./src/LayoutCompositionPolicy",
"text!./res/templates/layout.html",
"text!./res/templates/fixed.html",
"text!./res/templates/frame.html",
"text!./res/templates/elements/telemetry.html",
"text!./res/templates/elements/box.html",
"text!./res/templates/elements/line.html",
"text!./res/templates/elements/text.html",
"text!./res/templates/elements/image.html",
'legacyRegistry'
], function (
LayoutController,
FixedController,
LayoutCompositionPolicy,
layoutTemplate,
fixedTemplate,
frameTemplate,
telemetryTemplate,
boxTemplate,
lineTemplate,
textTemplate,
imageTemplate,
legacyRegistry
) {
"use strict";
@@ -44,7 +60,7 @@ define([
"name": "Display Layout",
"glyph": "L",
"type": "layout",
"templateUrl": "templates/layout.html",
"template": layoutTemplate,
"editable": true,
"uses": []
},
@@ -53,7 +69,7 @@ define([
"name": "Fixed Position",
"glyph": "3",
"type": "telemetry.panel",
"templateUrl": "templates/fixed.html",
"template": fixedTemplate,
"uses": [
"composition"
],
@@ -191,7 +207,7 @@ define([
"representations": [
{
"key": "frame",
"templateUrl": "templates/frame.html"
"template": frameTemplate
}
],
"controllers": [
@@ -218,23 +234,23 @@ define([
"templates": [
{
"key": "fixed.telemetry",
"templateUrl": "templates/elements/telemetry.html"
"template": telemetryTemplate
},
{
"key": "fixed.box",
"templateUrl": "templates/elements/box.html"
"template": boxTemplate
},
{
"key": "fixed.line",
"templateUrl": "templates/elements/line.html"
"template": lineTemplate
},
{
"key": "fixed.text",
"templateUrl": "templates/elements/text.html"
"template": textTemplate
},
{
"key": "fixed.image",
"templateUrl": "templates/elements/image.html"
"template": imageTemplate
}
],
"policies": [

View File

@@ -23,9 +23,11 @@
define([
"./src/EmbeddedPageController",
"text!./res/iframe.html",
'legacyRegistry'
], function (
EmbeddedPageController,
iframeTemplate,
legacyRegistry
) {
"use strict";
@@ -54,7 +56,7 @@ define([
],
"views": [
{
"templateUrl": "iframe.html",
"template": iframeTemplate,
"name": "Page",
"type": "example.page",
"key": "example.page",

View File

@@ -25,11 +25,13 @@ define([
"./src/MCTChart",
"./src/PlotController",
"./src/policies/PlotViewPolicy",
"text!./res/templates/plot.html",
'legacyRegistry'
], function (
MCTChart,
PlotController,
PlotViewPolicy,
plotTemplate,
legacyRegistry
) {
"use strict";
@@ -42,7 +44,7 @@ define([
"name": "Plot",
"key": "plot",
"glyph": "6",
"templateUrl": "templates/plot.html",
"template": plotTemplate,
"needs": [
"telemetry"
],

View File

@@ -25,11 +25,13 @@ define([
"./src/RTEventListController",
"./src/directives/MCTRTDataTable",
"./src/policies/RTMessagesViewPolicy",
"text!./res/templates/rtmessages.html",
'legacyRegistry'
], function (
RTEventListController,
MCTRTDataTable,
RTMessagesViewPolicy,
rtmessagesTemplate,
legacyRegistry
) {
"use strict";
@@ -44,7 +46,7 @@ define([
"name": "RT Messages",
"glyph": "5",
"description": "Scrolling list of real time messages.",
"templateUrl": "templates/rtmessages.html",
"template": rtmessagesTemplate,
"needs": [
"telemetry"
],

View File

@@ -23,9 +23,11 @@
define([
"./src/RTScrollingListController",
"text!./res/templates/rtscrolling.html",
'legacyRegistry'
], function (
RTScrollingListController,
rtscrollingTemplate,
legacyRegistry
) {
"use strict";
@@ -40,7 +42,7 @@ define([
"name": "Scrolling",
"glyph": "5",
"description": "Scrolling list of data values.",
"templateUrl": "templates/rtscrolling.html",
"template": rtscrollingTemplate,
"needs": [
"telemetry"
],

View File

@@ -23,9 +23,11 @@
define([
"./src/ScrollingListController",
"text!./res/templates/scrolling.html",
'legacyRegistry'
], function (
ScrollingListController,
scrollingTemplate,
legacyRegistry
) {
"use strict";
@@ -40,7 +42,7 @@ define([
"name": "Scrolling",
"glyph": "5",
"description": "Scrolling list of data values.",
"templateUrl": "templates/scrolling.html",
"template": scrollingTemplate,
"needs": [
"telemetry"
],

View File

@@ -23,9 +23,11 @@
define([
"text!./res/markup.html",
'legacyRegistry'
], function (
markupTemplate,
legacyRegistry
) {
"use strict";
@@ -45,7 +47,7 @@ define([
],
"views": [
{
"templateUrl": "markup.html",
"template": markupTemplate,
"name": "Static Markup",
"type": "static.markup",
"key": "static.markup"

View File

@@ -38,6 +38,16 @@ define([
"./src/directives/MCTSwimlaneDrop",
"./src/directives/MCTSwimlaneDrag",
"./src/services/ObjectLoader",
"text!./res/templates/values.html",
"text!./res/templates/timeline.html",
"text!./res/templates/activity-gantt.html",
"text!./res/templates/tabular-swimlane-cols-tree.html",
"text!./res/templates/tabular-swimlane-cols-data.html",
"text!./res/templates/resource-graphs.html",
"text!./res/templates/resource-graph-labels.html",
"text!./res/templates/legend-item.html",
"text!./res/templates/ticks.html",
"text!./res/templates/controls/datetime.html",
'legacyRegistry'
], function (
TimelineController,
@@ -56,6 +66,16 @@ define([
MCTSwimlaneDrop,
MCTSwimlaneDrag,
ObjectLoader,
valuesTemplate,
timelineTemplate,
activityGanttTemplate,
tabularSwimlaneColsTreeTemplate,
tabularSwimlaneColsDataTemplate,
resourceGraphsTemplate,
resourceGraphLabelsTemplate,
legendItemTemplate,
ticksTemplate,
datetimeTemplate,
legacyRegistry
) {
"use strict";
@@ -226,7 +246,7 @@ define([
"key": "values",
"name": "Values",
"glyph": "A",
"templateUrl": "templates/values.html",
"template": valuesTemplate,
"type": "mode",
"uses": [
"cost"
@@ -239,7 +259,7 @@ define([
"glyph": "S",
"type": "timeline",
"description": "A timeline view of Timelines and Activities.",
"templateUrl": "templates/timeline.html",
"template": timelineTemplate,
"editable": true,
"toolbar": {
"sections": [
@@ -335,7 +355,7 @@ define([
"representations": [
{
"key": "gantt",
"templateUrl": "templates/activity-gantt.html",
"template": activityGanttTemplate,
"uses": [
"timespan",
"type"
@@ -346,42 +366,42 @@ define([
{
"key": "timeline-tabular-swimlane-cols-tree",
"priority": "mandatory",
"templateUrl": "templates/tabular-swimlane-cols-tree.html"
"template": tabularSwimlaneColsTreeTemplate
},
{
"key": "timeline-tabular-swimlane-cols-data",
"priority": "mandatory",
"templateUrl": "templates/tabular-swimlane-cols-data.html"
"template": tabularSwimlaneColsDataTemplate
},
{
"key": "timeline-resource-graphs",
"priority": "mandatory",
"templateUrl": "templates/resource-graphs.html"
"template": resourceGraphsTemplate
},
{
"key": "timeline-resource-graph-labels",
"priority": "mandatory",
"templateUrl": "templates/resource-graph-labels.html"
"template": resourceGraphLabelsTemplate
},
{
"key": "timeline-legend-item",
"priority": "mandatory",
"templateUrl": "templates/legend-item.html"
"template": legendItemTemplate
},
{
"key": "timeline-ticks",
"priority": "mandatory",
"templateUrl": "templates/ticks.html"
"template": ticksTemplate
}
],
"controls": [
{
"key": "timeline-datetime",
"templateUrl": "templates/controls/datetime.html"
"template": datetimeTemplate
},
{
"key": "duration",
"templateUrl": "templates/controls/datetime.html"
"template": datetimeTemplate
}
],
"controllers": [