Merge Request #84

Closed
softwarepublico/colab!84
Created by Macartur Sousa

Insert tag html

Added javascript in noosferoplugin to change tag software-community-dashboard.

Closed by Sergio Oliveira

Changes were not merged into target branch

Commits (2)
3 participants
colab/plugins/noosfero/static/noosfero/js/colab_integration.js 0 → 100644
... ... @@ -0,0 +1,14 @@
  1 +
  2 +window.onload=transform_tags();
  3 +
  4 +function transform_tags()
  5 +{
  6 + var tag = $('.software-community-dashboard');
  7 + var url = $(location).attr('pathname');
  8 + var regex = new RegExp(/\/social\/(.+)\//g);
  9 + var community = regex.exec(url)[1];
  10 + var MAX = '7'
  11 + var request_path = '/spb/get_list/'+'?list_name='+community+'&'+'MAX='+MAX;
  12 +
  13 + tag.load(request_path)
  14 +}
... ...
colab/plugins/noosfero/templates/proxy/noosfero.html
... ... @@ -24,4 +24,5 @@
24 24 {{ block.super }}
25 25 <script src="{% static 'noosfero/js/jquery.dropdown.js' %}" type="text/javascript"></script>
26 26 <script src="{% static 'noosfero/js/collapse.js' %}" type="text/javascript"></script>
  27 + <script src="{% static 'noosfero/js/colab_integration.js' %}"></script>
27 28 {% endblock %}
... ...