Commits

Sebastian Sdorra committed a70b253

improve changesetviewer

  • Participants
  • Parent commits 898d70b

Comments (0)

Files changed (2)

File scm-webapp/src/main/java/sonia/scm/api/rest/resources/RepositoryResource.java

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

File scm-webapp/src/main/webapp/resources/js/sonia.repository.js

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