1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-18 00:00:00 +00:00

Rewrite group disccussions/member/settings with popover view

This commit is contained in:
Daniel Pan
2016-04-01 15:22:28 +08:00
parent 45a7ba13e7
commit 900b06e349
8 changed files with 217 additions and 213 deletions

View File

@@ -37,13 +37,9 @@ define([
this.listenTo(this.repos, 'add', this.addOne);
this.listenTo(this.repos, 'reset', this.reset);
this.membersView = new GroupMembersView();
this.settingsView = new GroupSettingsView({
groupView: this
});
this.discussionsView = new GroupDiscussionsView({
groupView: this
});
this.settingsView = new GroupSettingsView({ groupView: this });
this.membersView = new GroupMembersView({ groupView: this });
this.discussionsView = new GroupDiscussionsView({ groupView: this });
this.render();
},
@@ -114,7 +110,6 @@ define([
this.group_id = group_id;
this.$emptyTip.hide();
this.renderGroupTop(options);
this.$tabs.show();
this.$table.hide();
var $loadingTip = this.$loadingTip;
$loadingTip.show();
@@ -210,49 +205,24 @@ define([
repos.comparator = null;
},
showSettings: function() {
this.settingsView.show({
'group': this.group
});
},
toggleSettingsPanel: function() {
var panel_id = this.settingsView.el.id;
if ($('#' + panel_id + ':visible').length) { // the panel is shown
this.settingsView.hide();
} else {
this.showSettings();
}
return this.settingsView.toggle();
},
showGroupWiki: function() {
location.href = '/group/' + this.group.id + '/wiki/';
},
showMembers: function() {
this.membersView.show({'group_id': this.group_id});
},
toggleMembersPanel: function() {
var panel_id = this.membersView.el.id;
if ($('#' + panel_id + ':visible').length) { // the panel is shown
this.membersView.hide();
} else {
this.showMembers();
}
return this.membersView.toggle();
},
showDiscussions: function() {
this.discussionsView.show({'group_id': this.group_id});
return this.discussionsView.show();
},
toggleDiscussionsPanel: function() {
var panel_id = this.discussionsView.el.id;
if ($('#' + panel_id + ':visible').length) { // the panel is shown
this.discussionsView.hide();
} else {
this.showDiscussions();
}
return this.discussionsView.toggle();
}
});