From 1a71a3c080ab00175d691a509aeb3bd522bc3eac Mon Sep 17 00:00:00 2001 From: Macartur Sousa Date: Thu, 23 Jul 2015 17:32:08 -0300 Subject: [PATCH] Added script to insert html content --- colab/plugins/noosfero/static/noosfero/js/colab_integration.js | 20 ++++++++++++++++++++ colab/plugins/noosfero/templates/proxy/noosfero.html | 1 + 2 files changed, 21 insertions(+), 0 deletions(-) create mode 100644 colab/plugins/noosfero/static/noosfero/js/colab_integration.js diff --git a/colab/plugins/noosfero/static/noosfero/js/colab_integration.js b/colab/plugins/noosfero/static/noosfero/js/colab_integration.js new file mode 100644 index 0000000..e761c4e --- /dev/null +++ b/colab/plugins/noosfero/static/noosfero/js/colab_integration.js @@ -0,0 +1,20 @@ + +window.onload=transform_tag_Welcome(); + +function httpGet(theUrl) +{ + var xmlHttp = new XMLHttpRequest(); + xmlHttp.open( "GET", theUrl, false ); + xmlHttp.send( null ); + return xmlHttp.responseText; +} + + +function transform_tag_Welcome() +{ + var tag = document.getElementsByClassName('foswikiToc'); + var text = httpGet('http://localhost:8000/spb/get_list/?list_name=ListB&MAX=5'); + tag[0].innerHTML= text; + + var current = url = window.location.href +} diff --git a/colab/plugins/noosfero/templates/proxy/noosfero.html b/colab/plugins/noosfero/templates/proxy/noosfero.html index 36a2d3e..8923cec 100644 --- a/colab/plugins/noosfero/templates/proxy/noosfero.html +++ b/colab/plugins/noosfero/templates/proxy/noosfero.html @@ -24,4 +24,5 @@ {{ block.super }} + {% endblock %} -- libgit2 0.21.2