Skip to content
This repository has been archived by the owner on Dec 2, 2020. It is now read-only.

Commit

Permalink
operation type fix for editor page #64
Browse files Browse the repository at this point in the history
  • Loading branch information
talhasch committed Jun 9, 2018
1 parent e815047 commit e89b672
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/templates/editor.html
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
<div class="form-inline pull-left">
<div class="form-group">
<label for="reward-select">{{ 'REWARDS' | translate }}</label>
<select class="form-control" id="reward-select" ng-model="operationType">
<select class="form-control" id="reward-select" ng-model="operationType.val">
<option value='default'>{{ 'DEFAULT' | translate }}</option>
<option value='sp'>{{ 'POWERUP' | translate }}</option>
<option value='dp'>{{ 'DECLINE_PAYOUT' | translate }}</option>
Expand Down
8 changes: 4 additions & 4 deletions src/controllers/editor.js
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export default ($scope, $rootScope, $routeParams, $filter, $location, $window, $
$scope.title = undefined;
$scope.body = $scope.tempBody = undefined;
$scope.tags = undefined;
$scope.operationType = 'default';
$scope.operationType = {val: 'default'};
$scope.vote = {checked: false};

$scope.saving = false;
Expand Down Expand Up @@ -388,7 +388,7 @@ export default ($scope, $rootScope, $routeParams, $filter, $location, $window, $
const permlink = createPermlink(title);
const meta = extractMetadata(body);
const jsonMeta = makeJsonMetadata(meta, tags, appVersion);
const options = makeOptions(activeUsername(), permlink, $scope.operationType);
const options = makeOptions(activeUsername(), permlink, $scope.operationType.val);
const voteWeight = $scope.vote.checked ? (helperService.getVotePerc(activeUsername()) * 100) : null;

$scope.posting = true;
Expand Down Expand Up @@ -562,7 +562,7 @@ export default ($scope, $rootScope, $routeParams, $filter, $location, $window, $
return $scope.tags.split(' ');
},
operationType: () => {
return $scope.operationType;
return $scope.operationType.val;
},
vote: () => {
return $scope.vote.checked;
Expand All @@ -583,7 +583,7 @@ export default ($scope, $rootScope, $routeParams, $filter, $location, $window, $
$scope.title = '';
$scope.body = $scope.tempBody = '';
$scope.tags = '';
$scope.operationType = 'default';
$scope.operationType.val = 'default';
$scope.vote.checked = false;

$scope.draftId = null;
Expand Down

0 comments on commit e89b672

Please sign in to comment.