1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-06-30 17:02:15 +00:00
seahub/media/scripts/app/collections/repos.js

29 lines
673 B
JavaScript
Raw Normal View History

define([
'underscore',
'backbone',
'app/models/repo'
], function(_, Backbone, Repo) {
'use strict';
var RepoCollection = Backbone.Collection.extend({
model: Repo,
2015-01-31 05:17:47 +00:00
url: app.pageOptions.reposUrl,
initialize: function() {
2015-02-01 06:15:00 +00:00
//console.log('init RepoCollection');
2015-01-31 05:17:47 +00:00
},
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);
}
});
2015-02-01 06:15:00 +00:00
return RepoCollection;
});