mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-03 16:10:26 +00:00
Improve group discussion
This commit is contained in:
@@ -985,7 +985,7 @@
|
||||
<img src="<%= avatar_url %>" alt="" width="32" class="msg-avatar avatar-circle" />
|
||||
<div class="msg-body">
|
||||
<div class="msg-header">
|
||||
<div class="msg-ops">
|
||||
<div class="msg-ops hide">
|
||||
<span class="msg-op js-reply-msg">{% trans "Reply" %}</span>
|
||||
<span class="msg-op js-del-msg">{% trans "Delete" %}</span>
|
||||
</div>
|
||||
|
@@ -163,7 +163,9 @@
|
||||
<div class="no-discussion-tip" style="display:none;">
|
||||
<p>{% blocktrans %}No discussion in this group yet.{% endblocktrans %}</p>
|
||||
</div>
|
||||
<div>
|
||||
<p class="error hide"></p>
|
||||
</div>
|
||||
<div class="popover-footer">
|
||||
<form id="group-message-form" action="" method="post" class="msg-form">{% csrf_token %}
|
||||
<img src="{% avatar_url request.user 64 %}" alt="" width="32" class="msg-avatar avatar-circle" />
|
||||
<div class="msg-body">
|
||||
@@ -174,8 +176,6 @@
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
<p class="error hide"></p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@@ -46,10 +46,12 @@ define([
|
||||
|
||||
highlight: function() {
|
||||
this.$el.addClass('hl');
|
||||
this.$('.msg-ops').show();
|
||||
},
|
||||
|
||||
rmHighlight: function() {
|
||||
this.$el.removeClass('hl');
|
||||
this.$('.msg-ops').hide();
|
||||
},
|
||||
|
||||
reply: function() {
|
||||
|
@@ -18,6 +18,7 @@ define([
|
||||
|
||||
this.$loadingTip = this.$('.loading-tip');
|
||||
this.$listContainer = this.$('#group-discussion-list');
|
||||
this.$content = this.$('.popover-con');
|
||||
this.$emptyTip = this.$('.no-discussion-tip');
|
||||
this.$error = this.$('.error');
|
||||
|
||||
@@ -66,6 +67,7 @@ define([
|
||||
this.collection.each(this.addOne, this);
|
||||
this.$listContainer.removeClass('hide');
|
||||
this.$listContainer.show();
|
||||
this.$content.scrollTop(9999);
|
||||
} else {
|
||||
this.$emptyTip.show();
|
||||
this.$listContainer.hide();
|
||||
@@ -102,7 +104,14 @@ define([
|
||||
|
||||
// set max-height for '.popover-con'
|
||||
setConMaxHeight: function() {
|
||||
this.$('.popover-con').css({'max-height': $(window).height() - this.$el.offset().top - this.$('.popover-hd').outerHeight(true) - 2}); // 2: top, bottom border width of $el
|
||||
this.$('.popover-con').css({
|
||||
'max-height': $(window).height() - this.$el.offset().top
|
||||
- this.$('.popover-hd').outerHeight(true)
|
||||
- this.$('.popover-footer').outerHeight(true)
|
||||
- 2
|
||||
- 10
|
||||
}); // 2: top, bottom border width of $el,
|
||||
// 10: leave some margin at the bottom
|
||||
},
|
||||
|
||||
show: function(options) {
|
||||
|
Reference in New Issue
Block a user