[Treeview] Clicking toggles model property

Clicking on the pane tab icon toggles ngModel.pane
This commit is contained in:
slhale 2015-08-19 16:29:51 -07:00
parent 8108a3b81c
commit 4a730f875f
4 changed files with 11 additions and 5 deletions

View File

@ -23,7 +23,8 @@
<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.pane = !ngModel.pane; log(ngModel.pane)">
< <
</div> </div>

View File

@ -50,8 +50,9 @@
<div class='split-pane-component items pane'> <div class='split-pane-component items pane'>
<div class='holder abs' <div class='holder abs'
id='content-area'> id='content-area'>
<mct-representation mct-object="navigatedObject" <mct-representation key="'browse-object'"
key="'browse-object'"> mct-object="navigatedObject"
ng-model="paneModel">
</mct-representation> </mct-representation>
</div> </div>
</div> </div>

View File

@ -141,12 +141,10 @@ define(
selectedObject: navigationService.getNavigation() selectedObject: navigationService.getNavigation()
}; };
/*
// Provide a model for the left pane // Provide a model for the left pane
$scope.paneModel = { $scope.paneModel = {
selectedObject: navigationService.getNavigation() selectedObject: navigationService.getNavigation()
}; };
*/
// Listen for changes in navigation state. // Listen for changes in navigation state.
navigationService.addListener(setNavigation); navigationService.addListener(setNavigation);

View File

@ -64,8 +64,14 @@ define(
} }
} }
$scope.ngModel.pane = true;
$scope.$watch('domainObject', setViewForDomainObject); $scope.$watch('domainObject', setViewForDomainObject);
$scope.$watch('representation.selected.key', updateQueryParam); $scope.$watch('representation.selected.key', updateQueryParam);
$scope.log = function (c) {
console.log(c);
};
} }
return BrowseObjectController; return BrowseObjectController;