mirror of
https://github.com/nasa/openmct.git
synced 2025-06-16 14:18:16 +00:00
[About] Add controllers
Add initial implementations of controllers to support showing the About dialog on logo click, WTD-667.
This commit is contained in:
@ -1,2 +1,4 @@
|
|||||||
<mct-include ng-click="" key="'app-logo'">
|
<span ng-controller="LogoController as logo">
|
||||||
</mct-include>
|
<mct-include ng-click="show-about-dialog" key="'app-logo'">
|
||||||
|
</mct-include>
|
||||||
|
</span>
|
||||||
|
21
platform/commonUI/about/src/AboutController.js
Normal file
21
platform/commonUI/about/src/AboutController.js
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
/*global define*/
|
||||||
|
|
||||||
|
define(
|
||||||
|
[],
|
||||||
|
function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
function AboutController(versions, $window) {
|
||||||
|
return {
|
||||||
|
versions: function () {
|
||||||
|
return versions;
|
||||||
|
},
|
||||||
|
openLicenses: function () {
|
||||||
|
$window.open("#/licenses", "_blank");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return AboutController;
|
||||||
|
}
|
||||||
|
);
|
18
platform/commonUI/about/src/LogoController.js
Normal file
18
platform/commonUI/about/src/LogoController.js
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
/*global define*/
|
||||||
|
|
||||||
|
define(
|
||||||
|
[],
|
||||||
|
function () {
|
||||||
|
"use strict";
|
||||||
|
|
||||||
|
function LogoController(overlayService) {
|
||||||
|
return {
|
||||||
|
showAboutDialog: function () {
|
||||||
|
overlayService.createOverlay("overlay-about");
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
return LogoController;
|
||||||
|
}
|
||||||
|
);
|
Reference in New Issue
Block a user