comparison gpp/templates/shoutbox/shoutbox.html @ 12:f408971657b9

Changed the shoutbox: posts are now made by Ajax. The smiley farm is loaded only on demand. jQuery is now in the base template. May add scrolling later.
author Brian Neal <bgneal@gmail.com>
date Wed, 15 Apr 2009 01:13:17 +0000
parents dbd703f7d63a
children 777451a98f9d
comparison
equal deleted inserted replaced
11:cc8eb028def1 12:f408971657b9
1 {% extends 'side_block.html' %} 1 {% extends 'side_block.html' %}
2 {% load smiley_tags %} 2 {% load smiley_tags %}
3 {% block block_title %}Shoutbox{% endblock %} 3 {% block block_title %}Shoutbox{% endblock %}
4 {% block block_content %} 4 {% block block_content %}
5 {% if shouts %} 5 <div id="shoutbox-shout-container">
6 <!--<div id="marqueecontainer" onmouseover="copyspeed=pausespeed" onmouseout="copyspeed=marqueespeed">-->
7 <div id="marqueecontainer">
8 <!--<div id="vmarquee" style="position: absolute; width: 98%; overflow:auto;">-->
9 {# for shout in shouts reversed #}
10 {% for shout in shouts %} 6 {% for shout in shouts %}
11 <p> 7 <p>
12 <span class="shoutbox-user">{{ shout.user.username }}:</span> 8 <span class="shoutbox-user">{{ shout.user.username }}:</span>
13 <span class="shoutbox-shout">{{ shout.shout|smilify|urlizetrunc:15 }}</span> 9 <span class="shoutbox-shout">{{ shout.shout|smilify|urlizetrunc:15 }}</span>
14 <span class="shoutbox-date">{{ shout.shout_date|date:"D M d Y H:i:s" }}</span> 10 <span class="shoutbox-date">{{ shout.shout_date|date:"D M d Y H:i:s" }}</span>
15 </p> 11 </p>
16 {% endfor %} 12 {% endfor %}
17 <!--</div>-->
18 </div> 13 </div>
19 {% endif %}
20 <center><a href="{% url shoutbox-view page=1 %}">Shout History</a></center> 14 <center><a href="{% url shoutbox-view page=1 %}">Shout History</a></center>
21 {% if user.is_authenticated %} 15 {% if user.is_authenticated %}
22 <center> 16 <center>
23 <form action="{% url shoutbox-shout %}" method="post"> 17 <form action="{% url shoutbox-shout %}" method="post">
24 <input type="text" maxlength="2048" size="13" name="msg" value="" id="shoutbox-smiley-input" /> 18 <input type="text" maxlength="2048" size="13" name="msg" value="" id="shoutbox-smiley-input" />
25 <br /> 19 <br />
26 <input type="submit" value="Shout" /> 20 <input id="shoutbox-submit" type="submit" value="Shout" />
27 <input type="button" value="Smilies" onclick="sb_toggle_smilies();" /> 21 <input id="shoutbox-smilies" type="button" value="Smilies" />
28 </form> 22 </form>
29 <div id="shoutbox-smiley-frame" style="display:none;"> 23 <div id="shoutbox-smiley-frame" style="display:none;">
30 {% smiley_farm %} 24 <img id="shoutbox-busy-icon" src="{{ MEDIA_URL }}icons/ajax_busy.gif" alt="Please wait" />
31 </div> 25 </div>
32 </center> 26 </center>
33 {% else %} 27 {% else %}
34 <p> 28 <p>
35 Please <a href="{% url accounts-login %}">login</a> or 29 Please <a href="{% url accounts-login %}">login</a> or