diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/site-media/js/jquery.meetingtools.js | 28 | ||||
-rw-r--r-- | src/templates/apps/room/rss2.xml | 23 | ||||
-rw-r--r-- | src/templates/apps/room/widget-test.html | 8 |
3 files changed, 59 insertions, 0 deletions
diff --git a/src/site-media/js/jquery.meetingtools.js b/src/site-media/js/jquery.meetingtools.js new file mode 100644 index 0000000..5bed8f3 --- /dev/null +++ b/src/site-media/js/jquery.meetingtools.js @@ -0,0 +1,28 @@ +/* + * + * + * + */ + +jQuery.fn.meetingtools = function(options) { + + this.each(function() { + var tags = options.tags; + var url = options.url; + if (!url) { + url = 'http://localhost:8000'; + } + var url = url+'/room/+'+tags+'.json' + var div = $(this) + $.getJSON(url,function(data) { + div.append("<ul style=\"list-style: none;\">") + $.each(data,function(room) { + div.append("<li style=\"display: list-item; list-style: none; padding: 2px; 5px;\" class=\"ui-helper-reset ui-widget ui-state-highlight ui-corner-all\">"); + div.append(room['url']); + div.append("</li>"); + }); + div.append("</ul>") + }); + + }); +}
\ No newline at end of file diff --git a/src/templates/apps/room/rss2.xml b/src/templates/apps/room/rss2.xml new file mode 100644 index 0000000..c5b3016 --- /dev/null +++ b/src/templates/apps/room/rss2.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8"?> +<rss version="2.0" + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:content="http://purl.org/rss/1.0/modules/content/"> + <channel> + <title>{{title}}</title> + <description>{{description}}</description> + <!-- {{tags}} --> + <lastBuildDate>{{date}}</lastBuildDate> + {% if rooms %} + {% for room in rooms %} + <item> + <title>{{room.name}}</title> + {% if room.description %} + <description>{{room.description}}</description> + {% endif %} + <link>{{room.go_url}}</link> + <guid isPermaLink="true">{{room.go_url_internal}}</guid> + </item> + {% endfor %} + {% endif %} + </channel> +</rss>
\ No newline at end of file diff --git a/src/templates/apps/room/widget-test.html b/src/templates/apps/room/widget-test.html new file mode 100644 index 0000000..2d1af29 --- /dev/null +++ b/src/templates/apps/room/widget-test.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} +{% load prefix %} +{% block widgets %} +$("#meetings").meetingtools({tags: 'aka'}); +{% endblock %} +{% block content %} +<div id="meetings"> +{% endblock %}
\ No newline at end of file |