Commit 84df3d2c283cac1e69a9ceb59f83dea181a49198
Committed by
Sergio Oliveira
1 parent
ce7c9854
Exists in
master
and in
31 other branches
Added script to insert html content
Signed-off-by: Macartur Sousa <macartur.sc@gmail.com> Signed-off-by: Alexandre Barbosa <alexandrealmeidabarbosa@gmail.com>
Showing
2 changed files
with
21 additions
and
0 deletions
Show diff stats
colab/plugins/noosfero/static/noosfero/js/colab_integration.js
0 → 100644
@@ -0,0 +1,20 @@ | @@ -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,4 +24,5 @@ | ||
24 | {{ block.super }} | 24 | {{ block.super }} |
25 | <script src="{% static 'noosfero/js/jquery.dropdown.js' %}" type="text/javascript"></script> | 25 | <script src="{% static 'noosfero/js/jquery.dropdown.js' %}" type="text/javascript"></script> |
26 | <script src="{% static 'noosfero/js/collapse.js' %}" type="text/javascript"></script> | 26 | <script src="{% static 'noosfero/js/collapse.js' %}" type="text/javascript"></script> |
27 | + <script src="{% static 'noosfero/js/colab_integration.js' %}"></script> | ||
27 | {% endblock %} | 28 | {% endblock %} |