From 2bdad0ae7a3a6e4ec5116becd39910388b679ed2 Mon Sep 17 00:00:00 2001 From: Leif Johansson Date: Thu, 4 Oct 2012 15:39:08 +0200 Subject: restructure --- static/js/jquery.meetingtools.js | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) create mode 100644 static/js/jquery.meetingtools.js (limited to 'static/js/jquery.meetingtools.js') diff --git a/static/js/jquery.meetingtools.js b/static/js/jquery.meetingtools.js new file mode 100644 index 0000000..2ce958d --- /dev/null +++ b/static/js/jquery.meetingtools.js @@ -0,0 +1,45 @@ +/* + * a jQuery plugin for listing tagged meetings from meetingtools + * + */ + +jQuery.fn.meetingtools = function(options) { + + var defaults = { + onAdd: function() {}, + onUpdate: function() {}, + url: 'http://localhost:8000' + }; + var options = $.extend({}, defaults, options); + + this.each(function() { + var tags = options.tags; + var url = options.url; + var url = options.url+'/room/+'+tags+'.json?callback=?'; + var div = $(this); + $.getJSON(url,function(data) { + div.html("