1
0
mirror of https://github.com/haiwen/seahub.git synced 2025-08-24 17:49:44 +00:00
seahub/media/scripts/app/routers/group.js

33 lines
815 B
JavaScript
Raw Normal View History

2015-01-21 14:22:34 +00:00
/*global define*/
define([
'jquery',
'backbone',
'app/collections/group-repos',
'app/views/group'
], function($, Backbone, Repos, GroupView) {
"use strict";
var GroupRouter = Backbone.Router.extend({
routes: {
'libs/:id(/*path)': 'showDirents',
// Default
'*actions': 'defaultAction'
},
showDirents: function(id, path){
console.log("Repo route has been called.." + "id:" + id + " path:" + path);
new GroupView().showDirentList(id, path);
},
defaultAction: function(actions){
// We have no matching route, lets just log what the URL was
console.log('No route:', actions);
new GroupView().showRepoList();
}
});
return GroupRouter;
});