diff --git a/platform/features/layout/bundle.json b/platform/features/layout/bundle.json
index dabe340036..3a3cf86c60 100644
--- a/platform/features/layout/bundle.json
+++ b/platform/features/layout/bundle.json
@@ -101,8 +101,8 @@
},
{
"property": "url",
- "glyph": "",
- "control": "dialog",
+ "glyph": "\u2353",
+ "control": "dialog-button",
"title": "Image Properties",
"dialog": {
"control": "textfield",
@@ -112,8 +112,8 @@
},
{
"property": "text",
- "glyph": "",
- "control": "dialog",
+ "glyph": "p",
+ "control": "dialog-button",
"title": "Text Properties",
"dialog": {
"control": "textfield",
diff --git a/platform/features/layout/src/elements/ElementProxies.js b/platform/features/layout/src/elements/ElementProxies.js
index 125d0c7f10..8c828cbb83 100644
--- a/platform/features/layout/src/elements/ElementProxies.js
+++ b/platform/features/layout/src/elements/ElementProxies.js
@@ -1,15 +1,15 @@
/*global define*/
define(
- ['./TelemetryProxy', './ElementProxy', './LineProxy', './BoxProxy', './TextProxy'],
- function (TelemetryProxy, ElementProxy, LineProxy, BoxProxy, TextProxy) {
+ ['./TelemetryProxy', './ImageProxy', './LineProxy', './BoxProxy', './TextProxy'],
+ function (TelemetryProxy, ImageProxy, LineProxy, BoxProxy, TextProxy) {
"use strict";
return {
"fixed.telemetry": TelemetryProxy,
"fixed.line": LineProxy,
"fixed.box": BoxProxy,
- "fixed.image": ElementProxy,
+ "fixed.image": ImageProxy,
"fixed.text": TextProxy
};
}
diff --git a/platform/forms/bundle.json b/platform/forms/bundle.json
index f7a3c33ae4..c5d064d81f 100644
--- a/platform/forms/bundle.json
+++ b/platform/forms/bundle.json
@@ -49,6 +49,10 @@
{
"key": "menu-button",
"templateUrl": "templates/controls/menu-button.html"
+ },
+ {
+ "key": "dialog-button",
+ "templateUrl": "templates/controls/dialog.html"
}
],
"controllers": [
@@ -64,6 +68,11 @@
{
"key": "ColorController",
"implementation": "controllers/ColorController.js"
+ },
+ {
+ "key": "DialogButtonController",
+ "implementation": "controllers/DialogButtonController.js",
+ "depends": [ "$scope", "dialogService" ]
}
]
}
diff --git a/platform/forms/res/templates/controls/dialog.html b/platform/forms/res/templates/controls/dialog.html
index 05b0d39d43..d32c29807f 100644
--- a/platform/forms/res/templates/controls/dialog.html
+++ b/platform/forms/res/templates/controls/dialog.html
@@ -1,4 +1,5 @@
-
-
\ No newline at end of file
+
+
+
+
\ No newline at end of file
diff --git a/platform/forms/src/controllers/DialogButtonController.js b/platform/forms/src/controllers/DialogButtonController.js
index 809ba58f45..622122e6d8 100644
--- a/platform/forms/src/controllers/DialogButtonController.js
+++ b/platform/forms/src/controllers/DialogButtonController.js
@@ -25,8 +25,12 @@ define(
// Prompt for user input
function showDialog() {
- dialogService.getUserInput(buttonForm, $scope.ngModel)
- .then(storeResult);
+ // Prepare initial state
+ 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