diff --git a/platform/commonUI/general/bundle.json b/platform/commonUI/general/bundle.json index 54399c428e..46ccc4d9da 100644 --- a/platform/commonUI/general/bundle.json +++ b/platform/commonUI/general/bundle.json @@ -11,6 +11,10 @@ { "key": "action-button", "templateUrl": "templates/controls/action-button.html" + }, + { + "key": "indicator", + "templateUrl": "templates/indicator.html" } ], "controllers": [ diff --git a/platform/commonUI/general/res/templates/bottombar.html b/platform/commonUI/general/res/templates/bottombar.html index 67a7e5731d..1036fbc336 100644 --- a/platform/commonUI/general/res/templates/bottombar.html +++ b/platform/commonUI/general/res/templates/bottombar.html @@ -1,23 +1,9 @@
-
- - {{indicator.getGlyph()}} - - - {{indicator.getText()}} - - - G - -
+ +
\ No newline at end of file diff --git a/platform/commonUI/general/res/templates/indicator.html b/platform/commonUI/general/res/templates/indicator.html new file mode 100644 index 0000000000..06d0e4ec1e --- /dev/null +++ b/platform/commonUI/general/res/templates/indicator.html @@ -0,0 +1,17 @@ +
+ + {{ngModel.getGlyph()}} + + + {{ngModel.getText()}} + + + G + +
\ No newline at end of file diff --git a/platform/commonUI/general/src/BottomBarController.js b/platform/commonUI/general/src/BottomBarController.js index 0c94d94802..05eee9c61a 100644 --- a/platform/commonUI/general/src/BottomBarController.js +++ b/platform/commonUI/general/src/BottomBarController.js @@ -11,13 +11,17 @@ define( * @constructor */ function BottomBarController(indicators) { - // Utility function used to instantiate indicators - // from their injected constructors. - function instantiate(Indicator) { - return new Indicator(); + // Utility function used to make indicators presentable + // for display. + function present(Indicator) { + return { + template: Indicator.template || "indicator", + ngModel: typeof Indicator === 'function' ? + new Indicator() : Indicator + }; } - indicators = indicators.map(instantiate); + indicators = indicators.map(present); return { /**