From 63f3ccbfe693909e0400529aff810dba26787a90 Mon Sep 17 00:00:00 2001 From: Sridevi Date: Thu, 29 Dec 2016 11:20:26 +0200 Subject: [PATCH 01/12] api boomark shows 1962 --- bookmarks/client/bookmark.js | 6 ------ catalogue/client/catalogue.js | 2 ++ package.json | 24 ++++++++++++------------ 3 files changed, 14 insertions(+), 18 deletions(-) diff --git a/bookmarks/client/bookmark.js b/bookmarks/client/bookmark.js index 7035164a00..f21e0d00a8 100644 --- a/bookmarks/client/bookmark.js +++ b/bookmarks/client/bookmark.js @@ -7,8 +7,6 @@ Template.bookmark.created = function () { // Get reference to template instance const instance = this; - // subscribe to user bookmarks, creating reference to subscription - instance.bookmarksSubscription = instance.subscribe('myApiBookmarks'); }; Template.bookmark.events({ @@ -32,8 +30,6 @@ Template.bookmark.helpers({ // Get reference to template instance const instance = Template.instance(); - // Make sure bookmark subscription is ready - if (instance.bookmarksSubscription.ready()) { // Get current user bookmark (should be only one API Bookmarks result available) const userBookmarks = ApiBookmarks.findOne({ userId: Meteor.user()._id, apiIds: apiId }); @@ -41,8 +37,6 @@ Template.bookmark.helpers({ if (userBookmarks) { return true; } - return false; - } }, }); diff --git a/catalogue/client/catalogue.js b/catalogue/client/catalogue.js index e0b283c98e..9d2387c6a7 100644 --- a/catalogue/client/catalogue.js +++ b/catalogue/client/catalogue.js @@ -45,6 +45,8 @@ Template.catalogue.onCreated(function () { instance.subscribe('allApiLogo'); // Subscribe to all users, returns only usernames instance.subscribe('allUsers'); + // subscribe to user bookmarks, creating reference to subscription + instance.subscribe('myApiBookmarks'); // Watch for changes in the sort and filter settings instance.autorun(() => { diff --git a/package.json b/package.json index 0c75b03a6e..927ec46521 100644 --- a/package.json +++ b/package.json @@ -7,30 +7,30 @@ "doc": "docs" }, "dependencies": { - "babel-runtime": "^6.18.0", + "babel-runtime": "^6.20.0", "bcrypt": "^0.8.7", - "clipboard": "^1.5.12", + "clipboard": "^1.5.16", "crossfilter": "^1.3.12", "d3": "^3.5.17", "datatables": "^1.10.12", - "dc": "^2.0.0-beta.32", + "dc": "^2.0.0-beta.33", "elasticsearch": "^11.0.1", "github": "^1.4.0", - "intro.js": "^2.3.0", + "intro.js": "^2.4.0", "jquery": "^2.2.4", "jquery-bbq": "^1.0.0", "jquery.rateit": "^1.0.23", - "js-yaml": "^3.6.1", - "lodash": "^4.15.0", - "meteor-node-stubs": "^0.2.3", - "moment": "^2.14.1", - "simple-statistics": "^2.1.0", - "swagger-client": "^2.1.0", + "js-yaml": "^3.7.0", + "lodash": "^4.17.3", + "meteor-node-stubs": "^0.2.4", + "moment": "^2.17.1", + "simple-statistics": "^2.2.0", + "swagger-client": "^2.1.26", "swagger-parser": "^3.4.1", - "swagger-ui": "^2.2.3", + "swagger-ui": "^2.2.8", "swagger-ui-browserify": "^2.2.3-a", "tinycolor2": "^1.4.1", - "urijs": "^1.18.1" + "urijs": "^1.18.4" }, "devDependencies": { "babel-eslint": "^6.1.2", From 398547294495c9547a76f367716c9731f3be749d Mon Sep 17 00:00:00 2001 From: Brylie Christopher Oxley Date: Thu, 29 Dec 2016 12:11:39 +0200 Subject: [PATCH 02/12] Rename to apiBookmark --- apis/client/view/header/header.html | 2 +- bookmarks/client/bookmark.html | 2 +- bookmarks/client/bookmark.js | 6 +++--- catalogue/client/grid/grid.html | 2 +- catalogue/client/table/table.html | 2 +- 5 files changed, 7 insertions(+), 7 deletions(-) diff --git a/apis/client/view/header/header.html b/apis/client/view/header/header.html index cc445eea2c..9959db8dae 100644 --- a/apis/client/view/header/header.html +++ b/apis/client/view/header/header.html @@ -28,7 +28,7 @@

{{# if currentUser }} - {{> bookmark api=api }} + {{> apiBookmark api=api }} {{else}}
+