mirror of
https://github.com/haiwen/seahub.git
synced 2025-09-20 02:48:51 +00:00
Enable create group repo
This commit is contained in:
@@ -36,8 +36,14 @@ define([
|
||||
// Generate the attributes for a new GroupRepo item.
|
||||
newAttributes: function() {
|
||||
return {
|
||||
name: 'foo',
|
||||
desc: 'bar'
|
||||
name: $('input[name=repo_name]', this.$el).val().trim(),
|
||||
desc: $('textarea[name=repo_desc]', this.$el).val().trim(),
|
||||
permission: $('select[name=permission]', this.$el).val(),
|
||||
|
||||
// TODO: encrypted repo
|
||||
// encrypted: $('#encrypt-switch', this.$el).attr('checked'),
|
||||
// passwd1: $('input[name=passwd]', this.$el).val(),
|
||||
// passwd2: $('input[name=passwd_again]', this.$el).val()
|
||||
};
|
||||
},
|
||||
|
||||
@@ -47,8 +53,9 @@ define([
|
||||
Common.feedback('Loading...', 'info', Common.INFO_TIMEOUT);
|
||||
GroupRepos.create(this.newAttributes(), {
|
||||
wait: true,
|
||||
prepend: true, // show newly created repo at first line
|
||||
success: function() {
|
||||
|
||||
Common.feedback('Success', 'success', Common.SUCCESS_TIMEOUT);
|
||||
},
|
||||
error: function() {
|
||||
Common.feedback('Error', 'error', Common.ERROR_TIMEOUT);
|
||||
|
Reference in New Issue
Block a user