Skip to content

Commit

Permalink
Fixed #235
Browse files Browse the repository at this point in the history
  • Loading branch information
poonwu committed Oct 18, 2016
1 parent cee6589 commit dfcfb2d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions app/js/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -743,14 +743,15 @@ angular.module('reachRabbitApp.influencer.controller', ['reachRabbitApp.service'
.controller('InfluencerCampaignListController', ['$scope', '$state', 'CampaignService', 'DataService', 'ExampleCampaigns', '$rootScope',
function ($scope, $state, CampaignService, DataService, ExampleCampaigns, $rootScope) {
$scope.params = {};
$scope.filter = {};

$scope.handleUserClickThumbnail = function (c) {
$state.go('influencer-campaign-detail', {
campaignId: c.campaignId
});
};
$scope.$watch('filter', function () {
$scope.load(_.extend($scope.params, { mediaId: $scope.filter }));
$scope.$watch('filter.value', function () {
$scope.load(_.extend($scope.params, { mediaId: $scope.filter.value }));
});

//Load campaign data
Expand Down
2 changes: 1 addition & 1 deletion app/view/influencer-campaign-list.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ <h1>งานทั้งหมด</h1>
<div class="action-btn-for-header">
<div class="form-group">
<div class="input-dropdown">
<select class="form-control" ng-model="filter" ng-options="x.mediaId as x.mediaName for x in filters"></select>
<select class="form-control" ng-model="filter.value" ng-options="x.mediaId as x.mediaName for x in filters"></select>
<i class="fa fa-caret-down"></i>
</div>
</div>
Expand Down

0 comments on commit dfcfb2d

Please sign in to comment.