mirror of
https://github.com/nasa/openmct.git
synced 2025-06-04 16:40:53 +00:00
[Fixed Position] Add text, image properties
Add buttons for text, image properties to the Fixed Position toolbar, WTD-881.
This commit is contained in:
parent
0030efc29e
commit
1c69d1f2da
@ -101,8 +101,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"property": "url",
|
"property": "url",
|
||||||
"glyph": "",
|
"glyph": "\u2353",
|
||||||
"control": "dialog",
|
"control": "dialog-button",
|
||||||
"title": "Image Properties",
|
"title": "Image Properties",
|
||||||
"dialog": {
|
"dialog": {
|
||||||
"control": "textfield",
|
"control": "textfield",
|
||||||
@ -112,8 +112,8 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"property": "text",
|
"property": "text",
|
||||||
"glyph": "",
|
"glyph": "p",
|
||||||
"control": "dialog",
|
"control": "dialog-button",
|
||||||
"title": "Text Properties",
|
"title": "Text Properties",
|
||||||
"dialog": {
|
"dialog": {
|
||||||
"control": "textfield",
|
"control": "textfield",
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
/*global define*/
|
/*global define*/
|
||||||
|
|
||||||
define(
|
define(
|
||||||
['./TelemetryProxy', './ElementProxy', './LineProxy', './BoxProxy', './TextProxy'],
|
['./TelemetryProxy', './ImageProxy', './LineProxy', './BoxProxy', './TextProxy'],
|
||||||
function (TelemetryProxy, ElementProxy, LineProxy, BoxProxy, TextProxy) {
|
function (TelemetryProxy, ImageProxy, LineProxy, BoxProxy, TextProxy) {
|
||||||
"use strict";
|
"use strict";
|
||||||
|
|
||||||
return {
|
return {
|
||||||
"fixed.telemetry": TelemetryProxy,
|
"fixed.telemetry": TelemetryProxy,
|
||||||
"fixed.line": LineProxy,
|
"fixed.line": LineProxy,
|
||||||
"fixed.box": BoxProxy,
|
"fixed.box": BoxProxy,
|
||||||
"fixed.image": ElementProxy,
|
"fixed.image": ImageProxy,
|
||||||
"fixed.text": TextProxy
|
"fixed.text": TextProxy
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -49,6 +49,10 @@
|
|||||||
{
|
{
|
||||||
"key": "menu-button",
|
"key": "menu-button",
|
||||||
"templateUrl": "templates/controls/menu-button.html"
|
"templateUrl": "templates/controls/menu-button.html"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "dialog-button",
|
||||||
|
"templateUrl": "templates/controls/dialog.html"
|
||||||
}
|
}
|
||||||
],
|
],
|
||||||
"controllers": [
|
"controllers": [
|
||||||
@ -64,6 +68,11 @@
|
|||||||
{
|
{
|
||||||
"key": "ColorController",
|
"key": "ColorController",
|
||||||
"implementation": "controllers/ColorController.js"
|
"implementation": "controllers/ColorController.js"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"key": "DialogButtonController",
|
||||||
|
"implementation": "controllers/DialogButtonController.js",
|
||||||
|
"depends": [ "$scope", "dialogService" ]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
<mct-control ng-controller="DialogButtonController as dialog"
|
<span ng-controller="DialogButtonController as dialog">
|
||||||
key="'button'"
|
<mct-control key="'button'"
|
||||||
structure="dialog.getStructure()">
|
structure="dialog.getButtonStructure()">
|
||||||
</mct-control>
|
</mct-control>
|
||||||
|
</span>
|
@ -25,8 +25,12 @@ define(
|
|||||||
|
|
||||||
// Prompt for user input
|
// Prompt for user input
|
||||||
function showDialog() {
|
function showDialog() {
|
||||||
dialogService.getUserInput(buttonForm, $scope.ngModel)
|
// Prepare initial state
|
||||||
.then(storeResult);
|
var state = {};
|
||||||
|
state[$scope.field] = $scope.ngModel[$scope.field];
|
||||||
|
|
||||||
|
// Show dialog, then store user input (if any)
|
||||||
|
dialogService.getUserInput(buttonForm, state).then(storeResult);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Refresh state based on structure for this control
|
// Refresh state based on structure for this control
|
||||||
|
Loading…
x
Reference in New Issue
Block a user