From 30efec00901d6656db66bf17661c107df835564a Mon Sep 17 00:00:00 2001 From: Dave Date: Thu, 9 Jul 2015 10:53:03 -0700 Subject: [PATCH] [Mobile] Angular Replaced document usage with angular calls that change the ternary op to flip the slide. --- .../commonUI/browse/res/templates/browse.html | 46 ++++++++++--------- .../commonUI/browse/src/BrowseController.js | 16 ++----- 2 files changed, 28 insertions(+), 34 deletions(-) diff --git a/platform/commonUI/browse/res/templates/browse.html b/platform/commonUI/browse/res/templates/browse.html index 081785c491..f20c1a3ce1 100644 --- a/platform/commonUI/browse/res/templates/browse.html +++ b/platform/commonUI/browse/res/templates/browse.html @@ -19,30 +19,32 @@ this source code distribution or the Licensing information page available at runtime from the About dialog for additional information. --> -
- -
- -
- - -
- +
+
+ +
+ +
+ +
+ + +
-
- -
-
- - + +
+
+ + +
-
- -
T
+ +
T
+
+
-
diff --git a/platform/commonUI/browse/src/BrowseController.js b/platform/commonUI/browse/src/BrowseController.js index fd18e385ab..22330e5671 100644 --- a/platform/commonUI/browse/src/BrowseController.js +++ b/platform/commonUI/browse/src/BrowseController.js @@ -142,18 +142,10 @@ define( }; $scope.treeSlide = function () { - console.log("Clicked"); - if (document.getElementById("myElement"). - className.match(/(?:^|\s)holder-hide(?!\S)/)) { - document.getElementById("myElement").className = - 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"; + if ($scope.treeCl) { + $scope.treeCl = false; + } else if (!$scope.treeCl) { + $scope.treeCl = true; } };