Sha256: 1dfc6491255cf9b372870d1a492e71596a328c56b986dd95372d699bd9da1f74

Contents?: true

Size: 1.14 KB

Versions: 2

Compression:

Stored size: 1.14 KB

Contents

ActsAsTalentedModule.controller("ApplicantsController", function ($scope, ApplicantsFactory) {
 
  // init variables
  $scope.no_messages=true;
  $scope.focusedMsg = null ;

  $scope.filter_position = [
    {name: "Vigilante"}, 
    {name: "Coder"}, 
    {name: "Gamer"}
  ];

  // PRIVATE FUNCTIONS 
  var requestSuccess = function () {
    // notificationFactory.success();
  }

  var requestError = function () {
    // notificationFactory.error();    
  }

  // Get all items from the server
  $scope.getAllItems = function () {
    $scope.loading = true;
    // $scope.applicantsList = ApplicantsFactory.fac(function (success) {
    //   $scope.loading = false;
    // }, requestError);
    $scope.applicantsList = ApplicantsFactory.messages();

    $scope.loading = false;
    if($scope.applicantsList.length > 0){
      $scope.no_messages = false;
      $scope.msgInit();
    }    
  }

  // LOADS ALL ITEMS
  // $scope.getAllItems();

  $scope.msgInit = function(){
    $scope.focusedMsg = $scope.applicantsList[0];
    $scope.no_messages = false;    
  }

  $scope.getMsg = function(msg){
    $scope.focusedMsg = msg;
    $scope.no_messages = false;    
  }

});

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
acts_as_talented-0.0.3 app/assets/javascripts/acts_as_talented/angularjs/applicant/ApplicantsController.js
acts_as_talented-0.0.2 app/assets/javascripts/acts_as_talented/angularjs/applicant/ApplicantsController.js