improve changesetviewer

This commit is contained in:
Sebastian Sdorra
2011-04-08 09:10:56 +02:00
parent 126b20315e
commit e2cd39ee43
2 changed files with 14 additions and 7 deletions

View File

@@ -126,7 +126,7 @@ public class RepositoryResource
@Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON }) @Produces({ MediaType.APPLICATION_XML, MediaType.APPLICATION_JSON })
public Response getChangesets(@PathParam("id") String id, public Response getChangesets(@PathParam("id") String id,
@DefaultValue("0") @QueryParam("start") int start, @DefaultValue("0") @QueryParam("start") int start,
@DefaultValue("25") @QueryParam("limit") int limit) @DefaultValue("20") @QueryParam("limit") int limit)
throws RepositoryException throws RepositoryException
{ {
Response response = null; Response response = null;

View File

@@ -811,29 +811,36 @@ Sonia.repository.ChangesetViewerGrid = Ext.extend(Ext.grid.GridPanel, {
root: 'changesets', root: 'changesets',
idProperty: 'id', idProperty: 'id',
totalProperty: 'total', totalProperty: 'total',
autoLoad: true, autoLoad: false,
autoDestroy: true autoDestroy: true
}); });
changesetStore.load({params:{start:0, limit:20}});
var changesetColModel = new Ext.grid.ColumnModel({ var changesetColModel = new Ext.grid.ColumnModel({
defaults: { defaults: {
sortable: false sortable: false
}, },
columns: [ columns: [{
{id: 'changeset', dataIndex: 'id', xtype: 'templatecolumn', tpl: this.changesetTemplate} id: 'changeset',
] dataIndex: 'id',
xtype: 'templatecolumn',
tpl: this.changesetTemplate
}]
}); });
var config = { var config = {
header: false, header: false,
autoScroll: true,
autoExpandColumn: 'changeset', autoExpandColumn: 'changeset',
autoHeight: true, height: '100%',
hideHeaders: true,
store: changesetStore, store: changesetStore,
colModel: changesetColModel, colModel: changesetColModel,
bbar: new Ext.PagingToolbar({ bbar: new Ext.PagingToolbar({
store: changesetStore, store: changesetStore,
displayInfo: true, displayInfo: true,
pageSize: 25, pageSize: 20,
prependButtons: true prependButtons: true
}) })
} }