Skip to content

Commit e27198a

Browse files
committed
Integrate ngDialog
1 parent 3c74e71 commit e27198a

File tree

10 files changed

+1131
-3
lines changed

10 files changed

+1131
-3
lines changed

app/assets/javascripts/funds.js.coffee

+2
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
#= require ./lib/pusher_connection
1212
#= require ./lib/pusher_subscriber
1313

14+
#= require ngDialog/ngDialog
15+
1416
#= require_self
1517
#= require ./funds/funds
1618

app/assets/javascripts/funds/controllers/withdraws_controller.js.coffee

+6-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
app.controller 'WithdrawsController', ($scope, $stateParams, $http) ->
1+
app.controller 'WithdrawsController', ['$scope', '$stateParams', '$http', 'ngDialog', ($scope, $stateParams, $http, ngDialog) ->
22
@withdraw = {}
33
$scope.currency = $stateParams.currency
44
$scope.name = current_user.name
@@ -37,6 +37,9 @@ app.controller 'WithdrawsController', ($scope, $stateParams, $http) ->
3737
@withdrawAll = ->
3838
@withdraw.sum = Number($scope.account.balance)
3939

40+
$scope.openFundSourceManagerPanel = ->
41+
ngDialog.open
42+
template: '/templates/fund_sources/index.html'
4043

4144
$scope.sms_and_app_activated = ->
4245
current_user.app_activated and current_user.sms_activated
@@ -52,3 +55,5 @@ app.controller 'WithdrawsController', ($scope, $stateParams, $http) ->
5255
setTimeout(->
5356
$.publish "two_factor_init"
5457
, 100)
58+
59+
]

app/assets/javascripts/funds/funds.js.coffee

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ Currency.initData window.currencies
1818
Withdraw.initData window.withdraws
1919
FundSource.initData window.fund_sources
2020

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

app/assets/stylesheets/application.css.scss

+3
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,9 @@
2525
@import 'features/simple_captcha';
2626
@import 'features/custom';
2727

28+
@import 'ngDialog/ngDialog';
29+
@import 'ngDialog/ngDialog-theme-default';
30+
2831
/* layouts
2932
-------------------------------------------------------------- */
3033
html, body {
+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<h3>Fund source index</h3>

public/templates/funds/withdraw_cny.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ <h2 class="panel-title">{{"funds.withdraw_cny.title" | t}}</h2>
2929
</select>
3030

3131
</div>
32-
<span class="col-sm-6 help-block"><a href="/cny_fund_sources">{{"funds.withdraw_cny.manage_withdraw" | t}}</a></span>
32+
<span class="col-sm-6 help-block"><a href="javascript:;" ng-click="openFundSourceManagerPanel()" ng-bind="'funds.withdraw_cny.manage_withdraw' | t"></a></span>
3333
</div>
3434

3535
<div class="form-group">

0 commit comments

Comments
 (0)