1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-16 07:08:55 +00:00

Remove more in group discuss, and remove user info popup

This commit is contained in:
zhengxie
2013-03-18 15:59:25 +08:00
parent 1177fae87f
commit 5aacc41619
2 changed files with 1 additions and 24 deletions

View File

@@ -79,11 +79,7 @@
{% if group_msgs %}
<ul class="msg-list">
{% for msg in group_msgs %}
{% if msgs_more and forloop.counter0 > per_show %}
<li class="msg w100 ovhd msg-hide hide">
{% else %}
<li class="msg w100 ovhd">
{% endif %}
<div class="pic fleft">
<a href="{% url 'user_profile' msg.from_email %}">{% avatar msg.from_email 48 %}</a>
</div>
@@ -180,21 +176,10 @@
{% endif %}
</div>
{% include "snippets/user_profile_html.html" %}
{% endblock %}
{% block extra_script %}
{% include 'snippets/user_profile_js.html' %}
<script type="text/javascript">
{% if msgs_more %}
$('#msgs-more').click(function() {
$('.msg-hide:lt({{per_show}})').removeClass('msg-hide hide');
if ($('.msg-hide').length == 0) {
$(this).hide();
$('#paginator').removeClass('hide');
}
});
{% endif %}
{% if group_msgs|length > 5 %}
$(window).scroll(function() {
var up_icon = $('#msg-upward');

View File

@@ -984,7 +984,7 @@ def group_discuss(request, group_id):
current_page = int(request.GET.get('page', '1'))
except ValueError:
current_page = 1
per_page = 45
per_page = 15
group_msgs = GroupMessage.objects.filter(
group_id=group_id).order_by(
@@ -1024,12 +1024,6 @@ def group_discuss(request, group_id):
att.name = os.path.basename(path)
msg.attachment = att
per_show = 15
if current_page == 1 and len(group_msgs) > per_show:
msgs_more = True
else:
msgs_more = False
msg_total_num = GroupMessage.objects.filter(group_id=group_id).count()
total_page = msg_total_num/per_page
if msg_total_num % per_page > 0:
@@ -1058,8 +1052,6 @@ def group_discuss(request, group_id):
"is_staff": is_staff,
"group_msgs": group_msgs,
"form": form,
'per_show': per_show,
'msgs_more': msgs_more,
'current_page': current_page,
'prev_page': current_page-1,
'next_page': current_page+1,