Skip to content

Commit

Permalink
Refactor and remove FundSource model
Browse files Browse the repository at this point in the history
  • Loading branch information
lgn21st committed Apr 2, 2015
1 parent de56fb1 commit 47a170c
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 16 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ app.controller 'DepositsController', ['$scope', '$stateParams', '$http', '$gon',
$scope.currency = $stateParams.currency
$scope.current_user = current_user = $gon.current_user
$scope.name = current_user.name
$scope.fsources = FundSource.findAllBy('currency', $scope.currency)
$scope.fund_sources = $gon.fund_sources
$scope.account = Account.findBy('currency', $scope.currency)
$scope.deposit_channel = DepositChannel.findBy('currency', $scope.currency)

Expand Down
1 change: 0 additions & 1 deletion app/assets/javascripts/funds/funds.js.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ Deposit.initData gon.deposits
Account.initData gon.accounts
Currency.initData gon.currencies
Withdraw.initData gon.withdraws
FundSource.initData gon.fund_sources

window.app = app = angular.module 'funds', ["ui.router", "ngResource", "translateFilters", "textFilters", "precisionFilters", "ngDialog"]

12 changes: 0 additions & 12 deletions app/assets/javascripts/funds/models/fund_source.js.coffee

This file was deleted.

6 changes: 4 additions & 2 deletions public/templates/funds/deposit_cny.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,10 @@ <h2 class="panel-title">{{"funds.deposit_cny.title" | t}}</h2>
<tr>
<td>
<label class="select required control-label" for="deposit_fund_source">{{"funds.deposit_cny.deposit_account" | t}} (<a href="/cny_fund_sources/new">{{"funds.deposit_cny.add" | t}}</a>|<a href="/cny_fund_sources">{{ "funds.deposit_cny.manage" | t }}</a>)</label>
<select id="fund_source" class="select required form-control" name="fund_source" ng-model="depositsCtrl.deposit.fund_source" required>
<option value="{{fs.id}}" ng-repeat="fs in fsources">{{fs.label}}</option>
<select id="fund_source" class="select required form-control" name="fund_source"
ng-model="depositsCtrl.deposit.fund_source"
ng-options="fs.id as fs.label for fs in fund_sources | filter:{currency:currency}"
required>
</select>
</td>
<td><label class="optional control-label">{{"funds.deposit_cny.to_account" | t}}</label><p class="form-control-static">6214 8501 0176 3297</p></td>
Expand Down

0 comments on commit 47a170c

Please sign in to comment.