From 0ecb43200626e87babc0a1e2fb5027ce690b12a9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gabriel=20Baz=C3=A1n?= Date: Fri, 5 Feb 2016 13:00:40 -0300 Subject: [PATCH] search box --- public/views/walletHome.html | 4 ++-- src/js/controllers/index.js | 11 +++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/public/views/walletHome.html b/public/views/walletHome.html index d62f1c9df..1f2c3f697 100644 --- a/public/views/walletHome.html +++ b/public/views/walletHome.html @@ -195,9 +195,9 @@ -
+ class="row collapse last-transactions-content">
sync diff --git a/src/js/controllers/index.js b/src/js/controllers/index.js index 3d301b4b5..05e7b4980 100644 --- a/src/js/controllers/index.js +++ b/src/js/controllers/index.js @@ -916,6 +916,17 @@ angular.module('copayApp.controllers').controller('indexController', function($r }, 100); }; + self.filter = function(search) { + if (lodash.isEmpty(search)) return self.txHistory; + var result = lodash.filter(self.txHistory, function(tx) { + return lodash.includes(tx.amountStr, search) || + lodash.includes(tx.message, search) || + lodash.includes(self.addressbook[tx.addressTo], search) || + lodash.includes(tx.addressTo, search); + }); + return result; + } + self.getTxsFromServer = function(client, skip, endingTxid, limit, cb) { var res = [];