mirror of
https://github.com/nasa/openmct.git
synced 2025-06-15 21:58:13 +00:00
[Code Style] Run gulp fixstyle
...to apply code style settings from #142.
This commit is contained in:
@ -40,7 +40,7 @@ define(
|
||||
function BannerController($scope, notificationService, dialogService) {
|
||||
$scope.active = notificationService.active;
|
||||
|
||||
$scope.action = function (action, $event){
|
||||
$scope.action = function (action, $event) {
|
||||
/*
|
||||
Prevents default 'maximize' behaviour when clicking on
|
||||
notification button
|
||||
@ -48,19 +48,19 @@ define(
|
||||
$event.stopPropagation();
|
||||
return action();
|
||||
};
|
||||
$scope.dismiss = function(notification, $event) {
|
||||
$scope.dismiss = function (notification, $event) {
|
||||
$event.stopPropagation();
|
||||
notification.dismissOrMinimize();
|
||||
};
|
||||
$scope.maximize = function(notification) {
|
||||
if (notification.model.severity !== "info"){
|
||||
$scope.maximize = function (notification) {
|
||||
if (notification.model.severity !== "info") {
|
||||
|
||||
notification.model.cancel = function(){
|
||||
notification.model.cancel = function () {
|
||||
dialogService.dismiss();
|
||||
};
|
||||
//If the notification is dismissed by the user, close
|
||||
// the dialog.
|
||||
notification.onDismiss(function(){
|
||||
notification.onDismiss(function () {
|
||||
dialogService.dismiss();
|
||||
});
|
||||
|
||||
@ -69,4 +69,4 @@ define(
|
||||
};
|
||||
}
|
||||
return BannerController;
|
||||
});
|
||||
});
|
||||
|
@ -65,7 +65,7 @@ define(
|
||||
* Get the current state of the toggle.
|
||||
* @return {boolean} true if active
|
||||
*/
|
||||
ClickAwayController.prototype.isActive =function () {
|
||||
ClickAwayController.prototype.isActive = function () {
|
||||
return this.state;
|
||||
};
|
||||
|
||||
|
@ -21,7 +21,7 @@
|
||||
*****************************************************************************/
|
||||
|
||||
define(
|
||||
[ 'moment' ],
|
||||
['moment'],
|
||||
function (moment) {
|
||||
|
||||
var TIME_NAMES = {
|
||||
|
@ -28,7 +28,7 @@ define(
|
||||
function () {
|
||||
|
||||
/**
|
||||
* The ObjectInspectorController gets and formats the data for
|
||||
* The ObjectInspectorController gets and formats the data for
|
||||
* the inspector display
|
||||
*
|
||||
* @constructor
|
||||
@ -37,67 +37,67 @@ define(
|
||||
$scope.primaryParents = [];
|
||||
$scope.contextutalParents = [];
|
||||
//$scope.isLink = false;
|
||||
|
||||
|
||||
// Gets an array of the contextual parents/anscestors of the selected object
|
||||
function getContextualPath() {
|
||||
var currentObj = $scope.ngModel.selectedObject,
|
||||
currentParent,
|
||||
parents = [];
|
||||
|
||||
|
||||
currentParent = currentObj &&
|
||||
currentObj.hasCapability('context') &&
|
||||
currentObj.getCapability('context').getParent();
|
||||
|
||||
|
||||
while (currentParent && currentParent.getModel().type !== 'root' &&
|
||||
currentParent.hasCapability('context')) {
|
||||
// Record this object
|
||||
// Record this object
|
||||
parents.unshift(currentParent);
|
||||
|
||||
// Get the next one up the tree
|
||||
|
||||
// Get the next one up the tree
|
||||
currentObj = currentParent;
|
||||
currentParent = currentObj.getCapability('context').getParent();
|
||||
}
|
||||
|
||||
|
||||
$scope.contextutalParents = parents;
|
||||
}
|
||||
|
||||
// Gets an array of the parents/anscestors of the selected object's
|
||||
|
||||
// Gets an array of the parents/anscestors of the selected object's
|
||||
// primary location (locational of original non-link)
|
||||
function getPrimaryPath(current) {
|
||||
var location;
|
||||
|
||||
|
||||
// If this the the initial call of this recursive function
|
||||
if (!current) {
|
||||
current = $scope.ngModel.selectedObject;
|
||||
$scope.primaryParents = [];
|
||||
}
|
||||
|
||||
|
||||
location = current.getModel().location;
|
||||
|
||||
|
||||
if (location && location !== 'root') {
|
||||
objectService.getObjects([location]).then(function (obj) {
|
||||
var next = obj[location];
|
||||
|
||||
|
||||
$scope.primaryParents.unshift(next);
|
||||
getPrimaryPath(next);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
// Gets the metadata for the selected object
|
||||
function getMetadata() {
|
||||
$scope.metadata = $scope.ngModel.selectedObject &&
|
||||
$scope.ngModel.selectedObject.hasCapability('metadata') &&
|
||||
$scope.ngModel.selectedObject.useCapability('metadata');
|
||||
}
|
||||
|
||||
// Set scope variables when the selected object changes
|
||||
|
||||
// Set scope variables when the selected object changes
|
||||
$scope.$watch('ngModel.selectedObject', function () {
|
||||
$scope.isLink = $scope.ngModel.selectedObject &&
|
||||
$scope.ngModel.selectedObject.hasCapability('location') &&
|
||||
$scope.ngModel.selectedObject.getCapability('location').isLink();
|
||||
|
||||
|
||||
if ($scope.isLink) {
|
||||
getPrimaryPath();
|
||||
getContextualPath();
|
||||
@ -105,11 +105,11 @@ define(
|
||||
$scope.primaryParents = [];
|
||||
getContextualPath();
|
||||
}
|
||||
|
||||
|
||||
getMetadata();
|
||||
});
|
||||
}
|
||||
|
||||
return ObjectInspectorController;
|
||||
}
|
||||
);
|
||||
);
|
||||
|
@ -69,7 +69,9 @@ define(
|
||||
function updateList(ids) {
|
||||
function updateSelectedObjects(objects) {
|
||||
// Look up from the
|
||||
function getObject(id) { return objects[id]; }
|
||||
function getObject(id) {
|
||||
return objects[id];
|
||||
}
|
||||
self.selectedObjects =
|
||||
ids.filter(getObject).map(getObject);
|
||||
}
|
||||
|
Reference in New Issue
Block a user