1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-09-24 21:07:17 +00:00
Files
seahub/media/scripts/app/collections/repos.js
2015-04-22 15:31:35 +08:00

29 lines
673 B
JavaScript

define([
'underscore',
'backbone',
'app/models/repo'
], function(_, Backbone, Repo) {
'use strict';
var RepoCollection = Backbone.Collection.extend({
model: Repo,
url: app.pageOptions.reposUrl,
initialize: function() {
//console.log('init RepoCollection');
},
fetch: function(options) {
// override default fetch url
options = options ? _.clone(options) : {};
options.url = this.url + '?type=mine'
//call Backbone's fetch
return Backbone.Collection.prototype.fetch.call(this, options);
}
});
return RepoCollection;
});