Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
WEBUI JS: Add back the per page settings in grids
  • Loading branch information
perexg committed Jun 20, 2015
1 parent 95d6da8 commit d1469c5
Showing 1 changed file with 27 additions and 26 deletions.
53 changes: 27 additions & 26 deletions src/webui/static/app/idnode.js
Expand Up @@ -1350,6 +1350,33 @@ tvheadend.idnode_grid = function(panel, conf)
}
});

var count = new Ext.form.ComboBox({
width: 50,
displayField: 'val',
valueField: 'key',
store: new Ext.data.ArrayStore({
id: 0,
fields: ['key', 'val'],
data: [[25, '25'], [50, '50'], [100, '100'],
[200, '200'], [999999999, _('All')]]
}),
value: 50,
mode: 'local',
forceSelection: false,
triggerAction: 'all',
listeners: {
select: function(s, r) {
if (r !== page.pageSize) {
page.pageSize = r.id;
page.changePage(0);
store.reload();
// TODO: currently setting pageSize=-1 to disable paging confuses
// the UI elements, and I don't know how to sort that!
}
}
}
});

var page = new Ext.PagingToolbar(
tvheadend.PagingToolbarConf({store:store}, conf.titleP, auto, count)
);
Expand Down Expand Up @@ -1384,32 +1411,6 @@ tvheadend.idnode_grid = function(panel, conf)
});
}

var count = new Ext.form.ComboBox({
width: 50,
displayField: 'val',
valueField: 'key',
store: new Ext.data.ArrayStore({
id: 0,
fields: ['key', 'val'],
data: [[25, '25'], [50, '50'], [100, '100'],
[200, '200'], [999999999, _('All')]]
}),
value: 50,
mode: 'local',
forceSelection: false,
triggerAction: 'all',
listeners: {
select: function(s, r) {
if (r !== page.pageSize) {
page.pageSize = r.id;
page.changePage(0);
store.reload();
// TODO: currently setting pageSize=-1 to disable paging confuses
// the UI elements, and I don't know how to sort that!
}
}
}
});
plugins.push(filter);
var gconf = {
stateful: true,
Expand Down

0 comments on commit d1469c5

Please sign in to comment.