mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-10-24 12:13:33 +08:00
fix backbone hash problem; some more formatting and API polishing refactor group API controller; better format group detail view more formating and refactoring add column to group detail update details, add some more info to API response
52 lines
1.3 KiB
JavaScript
52 lines
1.3 KiB
JavaScript
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
|
|
// === MAIN TOOLSHED GROUP MODULE ====
|
|
// MMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMMM
|
|
|
|
define([
|
|
"mvc/groups/group-list-view",
|
|
"mvc/groups/group-detail-view",
|
|
"mvc/groups/group-model"
|
|
],
|
|
function(
|
|
mod_group_list,
|
|
mod_group_detail,
|
|
mod_group_model
|
|
) {
|
|
|
|
// ============================================================================
|
|
// ROUTER
|
|
var ToolshedRouter = Backbone.Router.extend({
|
|
routes: {
|
|
"" : "groups",
|
|
":group_id" : "group_page"
|
|
}
|
|
|
|
});
|
|
|
|
var ToolshedGroups = Backbone.View.extend({
|
|
groupListView: null,
|
|
groupDetailView: null,
|
|
collection: null,
|
|
|
|
initialize : function(){
|
|
window.globalTS.groups = this;
|
|
|
|
this.ts_router = new ToolshedRouter();
|
|
this.ts_router.on( 'route:groups', function() {
|
|
window.globalTS.groups.groupListView = new mod_group_list.GroupListView();
|
|
});
|
|
|
|
this.ts_router.on( 'route:group_page', function( group_id ) {
|
|
window.globalTS.groups.groupDetailView = new mod_group_detail.GroupDetailView( { group_id: group_id } );
|
|
});
|
|
|
|
Backbone.history.start({pushState: false});
|
|
}
|
|
});
|
|
|
|
return {
|
|
ToolshedGroups: ToolshedGroups
|
|
};
|
|
|
|
});
|