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

Create repo in organization

This commit is contained in:
zhengxie
2015-04-03 17:01:13 +08:00
committed by Daniel Pan
parent d612ec360c
commit 49f26cb251
8 changed files with 160 additions and 9 deletions

View File

@@ -3,25 +3,28 @@ define([
'underscore',
'backbone',
'common',
'app/collections/repos',
'app/collections/pub-repos',
'app/views/organization-repo',
'app/views/dir',
'app/views/group-nav',
], function($, _, Backbone, Common, RepoCollection, OrganizationRepoView,
DirView, GroupNavView) {
'app/views/add-pub-repo'
], function($, _, Backbone, Common, PubRepoCollection, OrganizationRepoView,
DirView, GroupNavView, AddPubRepoView) {
'use strict';
var OrganizationView = Backbone.View.extend({
el: '#main',
initialize: function() {
Common.prepareApiCsrf();
this.$reposDiv = $('#organization-repos');
this.$table = $('#organization-repos table');
this.$tableBody = $('tbody', this.$table);
this.$loadingTip = $('#organization-repos .loading-tip');
this.$emptyTip = $('#organization-repos .empty-tips');
this.repos = new RepoCollection({type: 'org'});
this.repos = new PubRepoCollection();
this.listenTo(this.repos, 'add', this.addOne);
this.listenTo(this.repos, 'reset', this.reset);
@@ -39,7 +42,7 @@ define([
},
createRepo: function() {
alert('todo');
new AddPubRepoView(this.repos).render();
},
addOne: function(repo, collection, options) {