From c70083d5863da518a648d6f4e16f07078be37770 Mon Sep 17 00:00:00 2001 From: Rupesh Manandhar Date: Thu, 21 Sep 2017 09:53:36 +0545 Subject: [PATCH] [#828] Push nation feature --- app/MyApp/app/Router.js | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/app/MyApp/app/Router.js b/app/MyApp/app/Router.js index 00027923a..12ce1681d 100644 --- a/app/MyApp/app/Router.js +++ b/app/MyApp/app/Router.js @@ -1283,9 +1283,9 @@ $(function() { var index = alreadySyncedPublications.map(function (element) { return element.get('_id'); }).indexOf(publicationDistribDocsFromNation[i].publicationId); + console.log(index) if (index > -1) {//code here - /* var pubId = publicationDistribDocsFromNation[i].publicationId; - + var pubId = publicationDistribDocsFromNation[i].publicationId; var nationUrl = 'http://' + publicationDistribDocsFromNation[i].createrNationName + ':' + App.password + '@' + publicationDistribDocsFromNation[i].createrNationUrl + '/publications/' + pubId; $.ajax({ @@ -1296,7 +1296,6 @@ $(function() { if(publicationDoc.downloadedByNation && publicationDoc.downloadedByNation != undefined) { if(publicationDoc.downloadedByNation.indexOf(currentBellName) == -1) { publicationDoc.downloadedByNation.push(currentBellName); - console.log(publicationDoc.downloadedByNation) var courseModel = new App.Models.Publication({ _id: publicationDoc._id }) @@ -1359,7 +1358,7 @@ $(function() { error: function(jqXHR, status, errorThrown){ console.log(status); } - });*/ + }); // don't increment newPublicationsCount cuz this publicationId already exists in the already synced publications at // local server } else {