[Templates] load plot templates with require

Load templates with requirejs.

https://github.com/nasa/openmctweb/issues/673
This commit is contained in:
Pete Richards 2016-03-01 10:52:07 -08:00
parent 748673f99b
commit 96d9f8c194
3 changed files with 12 additions and 4 deletions

View File

@ -47,6 +47,8 @@ define([
"text!./res/templates/menu-arrow.html",
"text!./res/templates/back-arrow.html",
"text!./res/templates/items/items.html",
"text!./res/templates/browse/object-properties.html",
"text!./res/templates/browse/inspector-region.html",
'legacyRegistry'
], function (
BrowseController,
@ -74,6 +76,8 @@ define([
menuArrowTemplate,
backArrowTemplate,
itemsTemplate,
objectPropertiesTemplate,
inspectorRegionTemplate,
legacyRegistry
) {
"use strict";
@ -226,11 +230,11 @@ define([
},
{
"key": "object-properties",
"templateUrl": "templates/browse/object-properties.html"
"template": objectPropertiesTemplate
},
{
"key": "inspector-region",
"templateUrl": "templates/browse/inspector-region.html"
"template": inspectorRegionTemplate
}
],
"services": [

View File

@ -27,6 +27,7 @@ define([
"./src/policies/PlotViewPolicy",
"./src/PlotOptionsController",
"text!./res/templates/plot.html",
"text!./res/templates/plot-options-browse.html",
'legacyRegistry'
], function (
MCTChart,
@ -34,6 +35,7 @@ define([
PlotViewPolicy,
PlotOptionsController,
plotTemplate,
plotOptionsBrowseTemplate,
legacyRegistry
) {
"use strict";
@ -101,7 +103,7 @@ define([
"representations": [
{
"key": "plot-options-browse",
"templateUrl": "templates/plot-options-browse.html"
"template": plotOptionsBrowseTemplate
}
]
}

View File

@ -38,6 +38,7 @@ define([
"text!./res/templates/controls/composite.html",
"text!./res/templates/controls/menu-button.html",
"text!./res/templates/controls/dialog.html",
"text!./res/templates/controls/radio.html",
'legacyRegistry'
], function (
MCTForm,
@ -56,6 +57,7 @@ define([
compositeTemplate,
menuButtonTemplate,
dialogTemplate,
radioTemplate,
legacyRegistry
) {
"use strict";
@ -89,7 +91,7 @@ define([
},
{
"key": "radio",
"templateUrl": "templates/controls/radio.html"
"template": radioTemplate
},
{
"key": "datetime",