Changeset 255:134c6156f8ba
- Timestamp:
- 24.05.2010 00:11:30 (21 months ago)
- Branch:
- default
- Location:
- djangobb
- Files:
-
- 3 added
- 4 edited
-
djangobb_forum/templates/forum/forum_row.html (modified) (1 diff)
-
djangobb_forum/templates/forum/index.html (modified) (1 diff)
-
djangobb_forum/views.py (modified) (2 diffs)
-
static/forum/js/jquery.cookie.js (added)
-
static/forum/themes/default/css/default_cs.css (modified) (2 diffs)
-
static/forum/themes/default/img/cat_maximize.png (added)
-
static/forum/themes/default/img/cat_minimize.png (added)
Legend:
- Unmodified
- Added
- Removed
-
djangobb/djangobb_forum/templates/forum/forum_row.html
r211 r255 15 15 <div class="tclcon"> 16 16 <h3>{% link forum %} <a href="{% url djangobb:forum_feed "forum" %}{{ forum.id }}/"><img src="{{ MEDIA_URL }}forum/img/feed-icon-small.png" alt="[RSS Feed]" title="[RSS Feed]" class="rss" /></a></h3> 17 {{ forum.description|safe }} 18 17 {{ forum.description|safe }} 19 18 <p> 20 19 {% cache 6000 moderators forum.id %} -
djangobb/djangobb_forum/templates/forum/index.html
r211 r255 3 3 {% load i18n %} 4 4 5 {% block extra_meta %} 6 <script type="text/javascript" src="{{ MEDIA_URL }}forum/js/jquery.cookie.js"></script> 7 <script type="text/javascript"> 8 9 function set_collapser(cat_id) { 10 category_body_id = "category_body_" + cat_id; 11 if($.cookie(category_body_id)){ 12 item_id = "#" + category_body_id; 13 head_id = item_id.replace("body", "head"); 14 $(head_id).addClass("collapsed"); 15 $(item_id).slideToggle("slow"); 16 } 17 } 18 $(document).ready(function(){ 19 $("a.toggle").click(function(){ 20 header_id = $(this).parent().attr('id'); 21 body_id = header_id.replace("head", "body"); 22 item_id = '#' + body_id 23 if ($(this).parent().attr('class')==''){ 24 $(this).parent().addClass("collapsed"); 25 $.cookie(body_id, 'collapsed'); 26 }else { 27 $(this).parent().removeClass("collapsed"); 28 $.cookie(body_id, ''); 29 } 30 $(item_id).slideToggle("slow"); 31 }); 32 {% for iter in cats %} 33 set_collapser({{ iter.id }}) 34 {% endfor %} 35 }); 36 </script> 37 {% endblock %} 38 5 39 {% block content %} 6 40 <div id="idx1" class="blocktable"> 7 41 {% for iter in cats %} 8 <h2> 9 <a href="{% url djangobb:forum_feed "category" %}{{ iter.cat.id }}/"><img src="{{ MEDIA_URL }}forum/img/feed-icon-small.png" alt="[RSS Feed]" title="[RSS Feed]" class="rss" /></a> 10 <span>{{ iter.cat }}</span> 42 <h2 id="category_head_{{ iter.id }}"> 43 <a class="toggle" href="#">Toggle shoutbox</a> 44 <span> 45 {{ iter.cat }} 46 </span> 11 47 </h2> 12 <div class="box" >48 <div class="box" id="category_body_{{ iter.id }}"> 13 49 <div class="inbox"> 14 50 <table cellspacing="0"> -
djangobb/djangobb_forum/views.py
r250 r255 52 52 for forum in _forums: 53 53 cat = cats.setdefault(forum.category.id, 54 {' cat': forum.category, 'forums': []})54 {'id': forum.category.id, 'cat': forum.category, 'forums': []}) 55 55 cat['forums'].append(forum) 56 56 forums[forum.id] = forum … … 59 59 cats = sorted(cats.values(), cmpdef) 60 60 61 print cats 62 61 63 to_return = {'cats': cats, 62 64 'posts': Post.objects.count(), -
djangobb/static/forum/themes/default/css/default_cs.css
r177 r255 25 25 .djangobb H2, #brdmenu {BACKGROUND: url(../img/fon111.gif); COLOR: #FFF; font-weight: bold; height: 16px;} 26 26 .djangobb H2 {font-weight: bold;BACKGROUND: #46586a url(../img/fon111.gif);border-top: 1px solid #46586a;border-left: 1px solid #46586a;border-right: 1px solid #46586a; height: 16px;} 27 .djangobb H2 a.toggle { 28 float: right; 29 BACKGROUND: url(../img/cat_minimize.png); 30 display:block; 31 height:17px; 32 line-height:1px; 33 outline-color:-moz-use-text-color; 34 outline-style:none; 35 outline-width:0; 36 text-indent:-3000em; 37 width:28px; 38 } 39 40 .djangobb H2.collapsed a.toggle { 41 background-image:url(../img/cat_maximize.png); 42 } 27 43 28 44 /* 1.4 Table header rows */ … … 111 127 .isticky = sticky topics. The default is "icon". By default only .inew is different.*/ 112 128 129 DIV.forum_icon {background:url(../img/active_forum.gif)} 113 130 DIV.icon {background:url(../img/inactive_topic.gif)} 114 131 DIV.inew {background:url(../img/active_topic.gif)}
Note: See TracChangeset
for help on using the changeset viewer.
