mirror of
https://github.com/nasa/openmct.git
synced 2025-06-18 15:18:12 +00:00
[Code Style] Use prototypes in About bundle
WTD-1482.
This commit is contained in:
@ -41,31 +41,29 @@ define(
|
|||||||
* @param $window Angular-injected window object
|
* @param $window Angular-injected window object
|
||||||
*/
|
*/
|
||||||
function AboutController(versions, $window) {
|
function AboutController(versions, $window) {
|
||||||
return {
|
this.versionDefinitions = versions;
|
||||||
/**
|
this.$window = $window;
|
||||||
* Get version info. This is given as an array of
|
|
||||||
* objects, where each object is intended to appear
|
|
||||||
* as a line-item in the version information listing.
|
|
||||||
* @memberof AboutController#
|
|
||||||
* @returns {object[]} version information
|
|
||||||
* @memberof platform/commonUI/about.AboutController#
|
|
||||||
*/
|
|
||||||
versions: function () {
|
|
||||||
return versions;
|
|
||||||
},
|
|
||||||
/**
|
|
||||||
* Open a new window (or tab, depending on browser
|
|
||||||
* configuration) containing open source licenses.
|
|
||||||
* @memberof AboutController#
|
|
||||||
* @memberof platform/commonUI/about.AboutController#
|
|
||||||
*/
|
|
||||||
openLicenses: function () {
|
|
||||||
// Open a new browser window at the licenses route
|
|
||||||
$window.open("#/licenses");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get version info. This is given as an array of
|
||||||
|
* objects, where each object is intended to appear
|
||||||
|
* as a line-item in the version information listing.
|
||||||
|
* @returns {object[]} version information
|
||||||
|
*/
|
||||||
|
AboutController.prototype.versions = function () {
|
||||||
|
return this.versionDefinitions;
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Open a new window (or tab, depending on browser
|
||||||
|
* configuration) containing open source licenses.
|
||||||
|
*/
|
||||||
|
AboutController.prototype.openLicenses = function () {
|
||||||
|
// Open a new browser window at the licenses route
|
||||||
|
this.$window.open("#/licenses");
|
||||||
|
};
|
||||||
|
|
||||||
return AboutController;
|
return AboutController;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -33,18 +33,18 @@ define(
|
|||||||
* @constructor
|
* @constructor
|
||||||
*/
|
*/
|
||||||
function LicenseController(licenses) {
|
function LicenseController(licenses) {
|
||||||
return {
|
this.licenseDefinitions = licenses;
|
||||||
/**
|
|
||||||
* Get license information.
|
|
||||||
* @returns {Array} license extensions
|
|
||||||
* @memberof platform/commonUI/about.LicenseController#
|
|
||||||
*/
|
|
||||||
licenses: function () {
|
|
||||||
return licenses;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Get license information.
|
||||||
|
* @returns {Array} license extensions
|
||||||
|
* @memberof platform/commonUI/about.LicenseController#
|
||||||
|
*/
|
||||||
|
LicenseController.prototype.licenses = function () {
|
||||||
|
return this.licenseDefinitions;
|
||||||
|
};
|
||||||
|
|
||||||
return LicenseController;
|
return LicenseController;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@ -34,18 +34,18 @@ define(
|
|||||||
* @param {OverlayService} overlayService the overlay service
|
* @param {OverlayService} overlayService the overlay service
|
||||||
*/
|
*/
|
||||||
function LogoController(overlayService) {
|
function LogoController(overlayService) {
|
||||||
return {
|
this.overlayService = overlayService;
|
||||||
/**
|
|
||||||
* Display the About dialog.
|
|
||||||
* @memberof LogoController#
|
|
||||||
* @memberof platform/commonUI/about.LogoController#
|
|
||||||
*/
|
|
||||||
showAboutDialog: function () {
|
|
||||||
overlayService.createOverlay("overlay-about");
|
|
||||||
}
|
|
||||||
};
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Display the About dialog.
|
||||||
|
* @memberof LogoController#
|
||||||
|
* @memberof platform/commonUI/about.LogoController#
|
||||||
|
*/
|
||||||
|
LogoController.prototype.showAboutDialog = function () {
|
||||||
|
this.overlayService.createOverlay("overlay-about");
|
||||||
|
};
|
||||||
|
|
||||||
return LogoController;
|
return LogoController;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
Reference in New Issue
Block a user