{% load teleforma_tags %}
{% load i18n %}
+
{% block extra_javascript %}
<script type="text/javascript">
a.unbind('click').click(function(){f.submit();return false;});
});
</script>
+
+<script type="text/javascript">
+$(document).ready(function(){
+ InitChatWindow("{% url jqchat_ajax room.id %}", null);
+ });
+</script>
+
{% endblock extra_javascript %}
{% endblock course %}
+{% block chat %}
+{% if room %}
+{% with "General tweeter" as title %}
+{% include "teleforma/inc/chat_room.html" %}
+{% endwith %}
+{% endif %}
+{% endblock chat %}
{% block status %}
{% endblock status %}
def get_room(content_type=None, id=None, name=None):
- if settings.TELEFORMA_GLOBAL_TWEETER or 'site' in name:
+ if settings.TELEFORMA_GLOBAL_TWEETER or 'site' in name or 'monitor' in name:
rooms = jqchat.models.Room.objects.filter(name=name)
else:
content_type=content_type,
object_id=id)
if not rooms:
- print name
room = jqchat.models.Room.objects.create(content_type=content_type,
object_id=id,
name=name[:20])