From 4ef4c1190a8138dec3e3e25e54d2f10aff870149 Mon Sep 17 00:00:00 2001 From: DRoarty Date: Sun, 30 Nov 2014 10:23:38 -0600 Subject: [PATCH] another light touch completed navigation through the second half of the demo. --- javascript/js/controllers.js | 29 +++++++++++++++++++++++++++++ nbproject/private/private.xml | 4 ++++ partials/comparePrediction.html | 2 +- partials/moreInfo.html | 2 +- partials/solveIt.html | 2 +- 5 files changed, 36 insertions(+), 3 deletions(-) create mode 100644 nbproject/private/private.xml diff --git a/javascript/js/controllers.js b/javascript/js/controllers.js index af2a58b..e2e2956 100644 --- a/javascript/js/controllers.js +++ b/javascript/js/controllers.js @@ -4,6 +4,7 @@ var bpControllers=angular.module('bpControllers',[]); bpControllers.controller('NameCtrl', ['$scope','$rootScope', '$location', '$http', function ($scope,$rootScope,$location, $http) { var rt=$rootScope; + activateTab("#/name"); $scope.msg=""; $scope.btnMsg="Create New Student Record"; window.setTimeout(function(){$("input[ng-model='name']").focus();},500); @@ -64,6 +65,7 @@ bpControllers.controller('NameCtrl', ['$scope','$rootScope', '$location', '$http bpControllers.controller('PredictCtrl', ['$scope','$rootScope', '$location','$http', function ($scope,$rootScope,$location,$http) { var rt=$rootScope; + activateTab("#/predict"); //redirect to home page if we don't have a student answeo object... if(!rt.sa) $location.path("/name"); //if we already have a prediction, draw it... @@ -108,6 +110,7 @@ bpControllers.controller('PredictCtrl', ['$scope','$rootScope', '$location','$ht bpControllers.controller('ComparePredictionCtrl', ['$scope','$rootScope', '$location','$http', function ($scope,$rootScope, $location,$http) { var rt=$rootScope; + activateTab("#/comparePredictions"); //redirect to home page if we don't have a student answeo object... if(!rt.sa) $location.path("/name"); //redraw my prediction... @@ -134,3 +137,29 @@ bpControllers.controller('ComparePredictionCtrl', ['$scope','$rootScope', '$loca ]); +/* allow student to choose information needed to solve */ +bpControllers.controller('MoreInfoCtrl', ['$scope','$rootScope', '$location','$http', + function ($scope,$rootScope, $location,$http) { + activateTab("#/moreInfo"); + } +]); + +/* Student documents and draws solution */ +bpControllers.controller('SolveItCtrl', ['$scope','$rootScope', '$location','$http', + function ($scope,$rootScope, $location,$http) { + activateTab("#/solveIt"); + } +]); + +/* fetch all student solutions and display */ +bpControllers.controller('CompareSolutionCtrl', ['$scope','$rootScope', '$location','$http', + function ($scope,$rootScope, $location,$http) { + activateTab("#/compareSolution"); + } +]); + +//sets active nav link in the top nav bar... +var activateTab=function(href){ + $("ul.nav li.active").removeClass("active"); + $("ul.nav a[href='"+href+"']").parent().addClass("active"); +} \ No newline at end of file diff --git a/nbproject/private/private.xml b/nbproject/private/private.xml new file mode 100644 index 0000000..4750962 --- /dev/null +++ b/nbproject/private/private.xml @@ -0,0 +1,4 @@ + + + + diff --git a/partials/comparePrediction.html b/partials/comparePrediction.html index 7396d2a..a3b3297 100644 --- a/partials/comparePrediction.html +++ b/partials/comparePrediction.html @@ -17,5 +17,5 @@

Compare your Predictions

-
Done, Go To Next Step
+
Done, Go To Next Step
diff --git a/partials/moreInfo.html b/partials/moreInfo.html index 1d316a6..d3a22d0 100644 --- a/partials/moreInfo.html +++ b/partials/moreInfo.html @@ -9,5 +9,5 @@

More Info

  • Diameter of 30lb weight
  • ...
  • -
    Done, Go To Next Step
    +
    Done, Go To Next Step
    diff --git a/partials/solveIt.html b/partials/solveIt.html index 0f95902..e0763f0 100644 --- a/partials/solveIt.html +++ b/partials/solveIt.html @@ -3,5 +3,5 @@

    Solve It

    Use the space below to solve the problem and explain how you got your answer. Then click continue.
    -
    Submit your Answer
    +
    Submit your Answer