Sha256: 913702ae9f1c5b2d0ac3e84830140b0595604ab505a52f7f53ac3d6362d2e241

Contents?: true

Size: 723 Bytes

Versions: 1

Compression:

Stored size: 723 Bytes

Contents

ActsAsTalentedModule.controller("TabsController", function ($scope, $state) {

  $scope.tabClass = { myJobs: 'inactive', 
                      myJobs: 'inactive', 
                      searchCandidate: 'inactive', 
                      myProfile: 'inactive', 
                      'myApplicants.list': 'inactive'
                    }

  $scope.$on('$stateChangeSuccess', function(event, toState, toParams, fromState, fromParams) {
    $scope.tabClass[toState.name] = 'active';
  });

  $scope.makeActiveTab = function(tab) {

    angular.forEach($scope.tabClass, function(value, key) {
      if(key != tab)
        $scope.tabClass[key] = 'inactive';
      else
        $scope.tabClass[key] = 'active';
    });

  }
});

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
acts_as_talented-0.0.3 app/assets/javascripts/acts_as_talented/angularjs/TabsController.js