mirror of
https://github.com/nasa/openmct.git
synced 2025-06-22 17:08:57 +00:00
[Treeview] Error fixing
Trying to get mctSplitter error to be fixed. Reverting to an extent.
This commit is contained in:
@ -23,8 +23,7 @@
|
|||||||
|
|
||||||
<div class="object-browse-bar bar abs">
|
<div class="object-browse-bar bar abs">
|
||||||
|
|
||||||
<div class="ui-symbol left-pane-tabs"
|
<div class="ui-symbol left-pane-tabs">
|
||||||
ng-click="ngModel.leftPaneStatus = !ngModel.leftPaneStatus">
|
|
||||||
<
|
<
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -34,8 +34,7 @@
|
|||||||
anchor='left'>
|
anchor='left'>
|
||||||
|
|
||||||
<!--div class='split-pane-component treeview pane mobile-pane left-menu desktop-browse'-->
|
<!--div class='split-pane-component treeview pane mobile-pane left-menu desktop-browse'-->
|
||||||
<div class='split-pane-component treeview pane left'
|
<div class='split-pane-component treeview pane left'>
|
||||||
ng-class='{show: treeModel.leftPaneStatus}'>
|
|
||||||
|
|
||||||
<div class='holder tree-holder abs mobile-tree-holder'>
|
<div class='holder tree-holder abs mobile-tree-holder'>
|
||||||
<mct-representation key="'tree'"
|
<mct-representation key="'tree'"
|
||||||
@ -55,8 +54,7 @@
|
|||||||
<div class='holder abs'
|
<div class='holder abs'
|
||||||
id='content-area'>
|
id='content-area'>
|
||||||
<mct-representation mct-object="navigatedObject"
|
<mct-representation mct-object="navigatedObject"
|
||||||
key="'browse-object'"
|
key="'browse-object'">
|
||||||
ng-model="treeModel">
|
|
||||||
</mct-representation>
|
</mct-representation>
|
||||||
</div>
|
</div>
|
||||||
<!--div class="left s-very-subtle key-properties ui-symbol mobile-menu-icon button-pos"
|
<!--div class="left s-very-subtle key-properties ui-symbol mobile-menu-icon button-pos"
|
||||||
|
@ -63,6 +63,7 @@ define(
|
|||||||
// path to new, addressed, path based on
|
// path to new, addressed, path based on
|
||||||
// domainObject
|
// domainObject
|
||||||
$location.path(urlService.urlForLocation("browse", domainObject));
|
$location.path(urlService.urlForLocation("browse", domainObject));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Callback for updating the in-scope reference to the object
|
// Callback for updating the in-scope reference to the object
|
||||||
@ -125,36 +126,6 @@ define(
|
|||||||
navigateTo(domainObject);
|
navigateTo(domainObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Uses the current navigation to get the
|
|
||||||
// current ContextCapability, then the
|
|
||||||
// parent is gotten from that. If the parent
|
|
||||||
// is not the root, then user is navigated to
|
|
||||||
// parent
|
|
||||||
function navigateToParent() {
|
|
||||||
var parent = navigationService.getNavigation().getCapability('context').getParent(),
|
|
||||||
grandparent;
|
|
||||||
if (parent.getId() !== ROOT_ID) {
|
|
||||||
grandparent = parent.getCapability('context').getParent().getId();
|
|
||||||
navigateTo(parent);
|
|
||||||
if (grandparent && grandparent !== ROOT_ID) {
|
|
||||||
$scope.atRoot = false;
|
|
||||||
} else {
|
|
||||||
$scope.atRoot = true;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$scope.atRoot = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function checkRoot() {
|
|
||||||
var parent = navigationService.getNavigation().getCapability('context').getParent();
|
|
||||||
if (parent.getId() !== ROOT_ID) {
|
|
||||||
$scope.atRoot = false;
|
|
||||||
} else {
|
|
||||||
$scope.atRoot = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// Load the root object, put it in the scope.
|
// Load the root object, put it in the scope.
|
||||||
// Also, load its immediate children, and (possibly)
|
// Also, load its immediate children, and (possibly)
|
||||||
@ -169,13 +140,7 @@ define(
|
|||||||
$scope.treeModel = {
|
$scope.treeModel = {
|
||||||
selectedObject: navigationService.getNavigation()
|
selectedObject: navigationService.getNavigation()
|
||||||
};
|
};
|
||||||
|
|
||||||
// SlideMenu boolean used to hide and show
|
|
||||||
// tree menu
|
|
||||||
$scope.treeSlide = function () {
|
|
||||||
$scope.treeClass = !$scope.treeClass;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Listen for changes in navigation state.
|
// Listen for changes in navigation state.
|
||||||
navigationService.addListener(setNavigation);
|
navigationService.addListener(setNavigation);
|
||||||
|
|
||||||
@ -186,13 +151,7 @@ define(
|
|||||||
$scope.$on("$destroy", function () {
|
$scope.$on("$destroy", function () {
|
||||||
navigationService.removeListener(setNavigation);
|
navigationService.removeListener(setNavigation);
|
||||||
});
|
});
|
||||||
|
|
||||||
$scope.backArrow = navigateToParent;
|
|
||||||
|
|
||||||
$scope.checkRoot = checkRoot;
|
|
||||||
|
|
||||||
// TODO: shale sarah bleh
|
|
||||||
$scope.ngModel.leftPaneStatus = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return BrowseController;
|
return BrowseController;
|
||||||
|
Reference in New Issue
Block a user