From fbf7c8a002d96e0327cb009c997e6a6c5f154174 Mon Sep 17 00:00:00 2001 From: luchenqun Date: Fri, 14 Apr 2017 10:50:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=90=9C=E7=B4=A2=E5=A6=82=E6=9E=9C=E6=9C=89?= =?UTF-8?q?=E4=B9=A6=E7=AD=BE=E7=BC=96=E8=BE=91=EF=BC=8C=E9=82=A3=E4=B9=88?= =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- public/scripts/controllers/search-controller.js | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/public/scripts/controllers/search-controller.js b/public/scripts/controllers/search-controller.js index 61b6849..93b1f26 100644 --- a/public/scripts/controllers/search-controller.js +++ b/public/scripts/controllers/search-controller.js @@ -227,6 +227,18 @@ app.controller('searchCtr', ['$scope', '$state', '$stateParams', '$filter', '$wi $('.ui.dropdown.js-search-tags .text').text(text); } + pubSubService.subscribe('EditCtr.inserBookmarsSuccess', $scope, function(event, data) { + console.log('subscribe EditCtr.inserBookmarsSuccess', JSON.stringify(data)); + $scope.searchBookmarks.forEach((bookmark) => { + if(bookmark.id == data.id){ + bookmark.title = data.title; + bookmark.url = data.url; + bookmark.description = data.description; + bookmark.tags = data.tags; + } + }) + }); + function searchBookmarks(params) { $scope.loading = true; $('.js-table-search').transition('hide');