[Mobile] Angular

Replaced document usage with
angular calls that change the ternary
op to flip the slide.
This commit is contained in:
Dave 2015-07-09 10:53:03 -07:00
parent b9371ea03d
commit 30efec0090
2 changed files with 28 additions and 34 deletions

View File

@ -19,30 +19,32 @@
this source code distribution or the Licensing information page available this source code distribution or the Licensing information page available
at runtime from the About dialog for additional information. at runtime from the About dialog for additional information.
--> -->
<div id="myElement" content="jquery-wrapper" class="abs holder-all browse-mode holder-hide"> <div ng-controller="BrowseController">
<mct-include key="'topbar-browse'"></mct-include> <div content="jquery-wrapper" class="abs holder-all browse-mode holder-hide" ng-class="treeCl ? 'holder-show' : 'holder-hide'">
<div class="holder browse-area s-browse-area abs" ng-controller="BrowseController"> <mct-include key="'topbar-browse'"></mct-include>
<mct-split-pane class='contents abs' anchor='left'> <div class="holder browse-area s-browse-area abs">
<div class='split-pane-component treeview pane browse-manage createtreebtns'> <mct-split-pane class='contents abs' anchor='left'>
<mct-representation key="'create-button'" mct-object="navigatedObject"> <div class='split-pane-component treeview pane browse-manage createtreebtns'>
</mct-representation> <mct-representation key="'create-button'" mct-object="navigatedObject">
<div class='holder tree-holder abs'>
<mct-representation key="'tree'"
mct-object="domainObject"
ng-model="treeModel">
</mct-representation> </mct-representation>
<div class='holder tree-holder abs'>
<mct-representation key="'tree'"
mct-object="domainObject"
ng-model="treeModel">
</mct-representation>
</div>
</div> </div>
</div> <mct-splitter></mct-splitter>
<mct-splitter></mct-splitter> <div class='split-pane-component items pane'>
<div class='split-pane-component items pane'> <div class='holder abs hider-check' id='content-area'>
<div class='holder abs hider-check' id='content-area'> <mct-representation mct-object="navigatedObject" key="'browse-object'">
<mct-representation mct-object="navigatedObject" key="'browse-object'"> </mct-representation>
</mct-representation> </div>
</div> </div>
</div> </mct-split-pane>
</mct-split-pane> <div class="btn s-btn s-icon-btn s-very-subtle key-properties button-hide"
<div class="btn s-btn s-icon-btn s-very-subtle key-properties button-hide" ng-click="treeSlide()">T</div>
ng-click="treeSlide()">T</div> </div>
<mct-include key="'bottombar'"></mct-include>
</div> </div>
<mct-include key="'bottombar'"></mct-include>
</div> </div>

View File

@ -142,18 +142,10 @@ define(
}; };
$scope.treeSlide = function () { $scope.treeSlide = function () {
console.log("Clicked"); if ($scope.treeCl) {
if (document.getElementById("myElement"). $scope.treeCl = false;
className.match(/(?:^|\s)holder-hide(?!\S)/)) { } else if (!$scope.treeCl) {
document.getElementById("myElement").className = $scope.treeCl = true;
document.getElementById("myElement")
.className.replace(/(?:^|\s)holder-hide(?!\S)/g, '');
document.getElementById("myElement").className += " holder-show";
} else {
document.getElementById("myElement").className =
document.getElementById("myElement")
.className.replace(/(?:^|\s)holder-show(?!\S)/g, '');
document.getElementById("myElement").className += " holder-hide";
} }
}; };