Commit 51b158b040169688dfffa82bc87c114c3571791e
Exists in
production
Merge branch 'master' into production
Showing
1 changed file
with
3 additions
and
3 deletions
Show diff stats
js/main.js
@@ -130,7 +130,7 @@ define(['jquery', 'handlebars', 'fastclick', 'proposal_app', 'handlebars_helpers | @@ -130,7 +130,7 @@ define(['jquery', 'handlebars', 'fastclick', 'proposal_app', 'handlebars_helpers | ||
130 | url += '/' + childId; | 130 | url += '/' + childId; |
131 | } | 131 | } |
132 | //url += '?private_token=' + private_token + '&limit=1&order=random()&_='+new Date().getTime()+'&fields=id,name,slug,abstract,created_by&content_type=ProposalsDiscussionPlugin::Proposal'; | 132 | //url += '?private_token=' + private_token + '&limit=1&order=random()&_='+new Date().getTime()+'&fields=id,name,slug,abstract,created_by&content_type=ProposalsDiscussionPlugin::Proposal'; |
133 | - url += '?limit=1&order=random()&_='+new Date().getTime()+'&fields=id,name,slug,abstract,created_by&content_type=ProposalsDiscussionPlugin::Proposal'; | 133 | + url += '?limit=1&order=random()&_='+new Date().getTime()+'&fields[]=id&fields[]=name&fields[]=slug&fields[]=abstract&fields[]=created_by&content_type=ProposalsDiscussionPlugin::Proposal'; |
134 | 134 | ||
135 | $.getJSON(url).done(function( data ) { | 135 | $.getJSON(url).done(function( data ) { |
136 | $loading.hide(); | 136 | $loading.hide(); |
@@ -558,7 +558,7 @@ define(['jquery', 'handlebars', 'fastclick', 'proposal_app', 'handlebars_helpers | @@ -558,7 +558,7 @@ define(['jquery', 'handlebars', 'fastclick', 'proposal_app', 'handlebars_helpers | ||
558 | $proposal.show(); | 558 | $proposal.show(); |
559 | 559 | ||
560 | //var url = host + '/api/v1/articles/' + proposal_id + '?private_token=' + Main.private_token + '&fields=id,body&content_type=ProposalsDiscussionPlugin::Topic'; | 560 | //var url = host + '/api/v1/articles/' + proposal_id + '?private_token=' + Main.private_token + '&fields=id,body&content_type=ProposalsDiscussionPlugin::Topic'; |
561 | - var url = host + '/api/v1/articles/' + proposal_id + '?fields=id,body&content_type=ProposalsDiscussionPlugin::Topic'; | 561 | + var url = host + '/api/v1/articles/' + proposal_id + '?fields=id&fields[]=body&content_type=ProposalsDiscussionPlugin::Topic'; |
562 | $.getJSON(url).done(function( data ) { | 562 | $.getJSON(url).done(function( data ) { |
563 | $('#proposal-item-' + proposal_id + ' .body-content').replaceWith(data.article.body); | 563 | $('#proposal-item-' + proposal_id + ' .body-content').replaceWith(data.article.body); |
564 | }) | 564 | }) |
@@ -1127,7 +1127,7 @@ define(['jquery', 'handlebars', 'fastclick', 'proposal_app', 'handlebars_helpers | @@ -1127,7 +1127,7 @@ define(['jquery', 'handlebars', 'fastclick', 'proposal_app', 'handlebars_helpers | ||
1127 | })(); | 1127 | })(); |
1128 | 1128 | ||
1129 | 1129 | ||
1130 | - var noosferoAPI = host + '/api/v1/articles/' + proposal_discussion + '?private_token=' + Main.private_token + '&fields=id,children,categories,abstract,title,image,url,setting,position'; | 1130 | + var noosferoAPI = host + '/api/v1/articles/' + proposal_discussion + '?private_token=' + Main.private_token + '&fields=id&fields[]=children&fields[]=categories&fields[]=abstract&fields[]=title&fields[]=image&fields[]=url&fields[]=setting&fields[]=position'; |
1131 | 1131 | ||
1132 | $.getJSON(noosferoAPI) | 1132 | $.getJSON(noosferoAPI) |
1133 | .done(function( data ) { | 1133 | .done(function( data ) { |