Commit f226f73d7276b2feaf8737d7f8454d15df4ec9a7
1 parent
1d87b77c
Exists in
colab_tag_merge
Added javascript to render feed_repository
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
Showing
1 changed file
with
20 additions
and
5 deletions
Show diff stats
colab/plugins/noosfero/static/noosfero/js/colab_integration.js
1 | 1 | ||
2 | -window.onload=transform_tags(); | 2 | +$(transform_tags) |
3 | 3 | ||
4 | function transform_tags() | 4 | function transform_tags() |
5 | { | 5 | { |
6 | - var tag = $('.software-community-dashboard'); | 6 | + discussion_tag(); |
7 | + feed_gitlab_tag(); | ||
8 | +} | ||
9 | + | ||
10 | +function feed_gitlab_tag() | ||
11 | +{ | ||
12 | + var tag = $('.software-community-feed_repository'); | ||
7 | var url = $(location).attr('pathname'); | 13 | var url = $(location).attr('pathname'); |
8 | var regex = new RegExp(/\/social\/(.+)\//g); | 14 | var regex = new RegExp(/\/social\/(.+)\//g); |
9 | var community = regex.exec(url)[1]; | 15 | var community = regex.exec(url)[1]; |
10 | - var MAX = '7' | ||
11 | - var request_path = '/spb/get_list/'+'?list_name='+community+'&'+'MAX='+MAX; | ||
12 | - | 16 | + var request_path = '/spb/feed_repository/'+'?group=software-publico&project=colab'; |
13 | tag.load(request_path) | 17 | tag.load(request_path) |
18 | +} | ||
19 | + | ||
20 | +function discussion_tag() | ||
21 | +{ | ||
22 | + var tag = $('.software-community-discussion'); | ||
23 | + var url = $(location).attr('pathname'); | ||
24 | + var regex = new RegExp(/\/social\/(.+)\//g); | ||
25 | + var community = regex.exec(url)[1]; | ||
26 | + var MAX = '7'; | ||
27 | + var request_path = '/spb/get_list/'+'?list_name=ListA'+'&'+'MAX='+MAX; | ||
28 | + tag.load(request_path); | ||
14 | } | 29 | } |