From ea03b87a7e0c88d1b16b3d527e9fe9de372055f5 Mon Sep 17 00:00:00 2001 From: Kosta Korenkov <7r0ggy@gmail.com> Date: Thu, 3 Sep 2015 14:44:50 +0300 Subject: [PATCH] Create availableBalance directive for Send screen ..so it can be decorated by addon. --- public/views/includes/available-balance.html | 15 +++++++++++++++ public/views/walletHome.html | 16 +--------------- src/js/directives/directives.js | 7 +++++++ 3 files changed, 23 insertions(+), 15 deletions(-) create mode 100644 public/views/includes/available-balance.html diff --git a/public/views/includes/available-balance.html b/public/views/includes/available-balance.html new file mode 100644 index 000000000..465edf2df --- /dev/null +++ b/public/views/includes/available-balance.html @@ -0,0 +1,15 @@ +
+
+ +
+
+ + Available Balance: + {{index.availableBalanceStr }} + + + {{index.lockedBalanceStr}} + locked by pending payments + +
+
diff --git a/public/views/walletHome.html b/public/views/walletHome.html index e7a4d7dd6..b5898cc3a 100644 --- a/public/views/walletHome.html +++ b/public/views/walletHome.html @@ -299,21 +299,7 @@ translate> Send All -
-
- -
-
- - Available Balance: - {{index.availableBalanceStr }} - - - {{index.lockedBalanceStr}} - locked by pending payments - -
-
+
diff --git a/src/js/directives/directives.js b/src/js/directives/directives.js index 2816a7509..cc4064db9 100644 --- a/src/js/directives/directives.js +++ b/src/js/directives/directives.js @@ -316,4 +316,11 @@ angular.module('copayApp.directives') replace: true, template: 'Copay' } + }) + .directive('availableBalance', function() { + return { + restrict: 'E', + replace: true, + templateUrl: 'views/includes/available-balance.html' + } });