1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-31 14:42:10 +00:00

Improve group discussion

This commit is contained in:
Daniel Pan
2016-03-20 11:28:03 +08:00
committed by llj
parent 13ee24aa8f
commit dc373c956d
4 changed files with 24 additions and 13 deletions

View File

@@ -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) {