Commit 84df3d2c283cac1e69a9ceb59f83dea181a49198

Authored by Macartur Sousa
Committed by Sergio Oliveira
1 parent ce7c9854

Added script to insert html content

Signed-off-by: Macartur Sousa <macartur.sc@gmail.com>
Signed-off-by: Alexandre Barbosa <alexandrealmeidabarbosa@gmail.com>
colab/plugins/noosfero/static/noosfero/js/colab_integration.js 0 → 100644
... ... @@ -0,0 +1,20 @@
  1 +
  2 +window.onload=transform_tag_Welcome();
  3 +
  4 +function httpGet(theUrl)
  5 +{
  6 + var xmlHttp = new XMLHttpRequest();
  7 + xmlHttp.open( "GET", theUrl, false );
  8 + xmlHttp.send( null );
  9 + return xmlHttp.responseText;
  10 +}
  11 +
  12 +
  13 +function transform_tag_Welcome()
  14 +{
  15 + var tag = document.getElementsByClassName('foswikiToc');
  16 + var text = httpGet('http://localhost:8000/spb/get_list/?list_name=ListB&MAX=5');
  17 + tag[0].innerHTML= text;
  18 +
  19 + var current = url = window.location.href
  20 +}
... ...
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 %}
... ...