| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123 |
- Ext.define('uas.view.grid.dataList.DataListPaging', {
- extend: 'Ext.toolbar.Paging',
- xtype: 'dataListPaging',
- cls:'x-dataListPaging',
- height: 36,
- dock: 'bottom',
- displayInfo: false,
- emptyMsg: "无数据",
- items:['->',{
- cls:'x-dl-paging-combo',
- labelWidth:60,
- width:150,
- value:100,
- labelAlgin:'right',
- xtype:'combo',
- editable:false,
- fieldLabel:'每页显示',
- store:[[
- '100',100
- ],[
- '200',200
- ],[
- '500',500
- ],[
- '1000',1000
- ]],
- listeners:{
- change:function(me,newValue){
- const store = me.ownerCt.ownerCt.store;
- store.setPageSize(newValue);
- store.loadPage(1)
- }
- }
- },{
- cls:'x-dl-paging-display',
- xtype:'displayfield',
- value:'行/共*行'
- }],
- getPagingItems: function() {
- var me = this,
- inputListeners = {
- scope: me,
- blur: me.onPagingBlur
- };
- inputListeners[Ext.supports.SpecialKeyDownRepeat ? 'keydown' : 'keypress'] = me.onPagingKeyDown;
- return [
- {
- itemId: 'first',
- tooltip: me.firstText,
- overflowText: me.firstText,
- iconCls: Ext.baseCSSPrefix + 'tbar-page-first',
- disabled: true,
- handler: me.moveFirst,
- scope: me
- },
- {
- itemId: 'prev',
- tooltip: me.prevText,
- overflowText: me.prevText,
- iconCls: Ext.baseCSSPrefix + 'tbar-page-prev',
- disabled: true,
- handler: me.movePrevious,
- scope: me
- },
- '-',
- me.beforePageText,
- {
- xtype: 'numberfield',
- itemId: 'inputItem',
- name: 'inputItem',
- cls: Ext.baseCSSPrefix + 'tbar-page-number',
- allowDecimals: false,
- minValue: 1,
- hideTrigger: true,
- enableKeyEvents: true,
- keyNavEnabled: false,
- selectOnFocus: true,
- submitValue: false,
- // mark it as not a field so the form will not catch it when getting fields
- isFormField: false,
- width: me.inputItemWidth,
- margin: '-1 2 3 2',
- listeners: inputListeners
- },
- {
- xtype: 'tbtext',
- itemId: 'pageCountItem',
- html: Ext.String.format(me.afterPageText, '*')
- },
- '-',
- {
- itemId: 'next',
- tooltip: me.nextText,
- overflowText: me.nextText,
- iconCls: Ext.baseCSSPrefix + 'tbar-page-next',
- disabled: true,
- handler: me.moveNext,
- scope: me
- },
- {
- itemId: 'last',
- tooltip: me.lastText,
- overflowText: me.lastText,
- iconCls: Ext.baseCSSPrefix + 'tbar-page-last',
- disabled: true,
- handler: me.moveLast,
- scope: me
- },
- '-',
- {
- itemId: 'refresh',
- tooltip: me.refreshText,
- overflowText: me.refreshText,
- iconCls: Ext.baseCSSPrefix + 'tbar-loading',
- disabled: me.store.isLoading(),
- handler: me.doRefresh,
- scope: me
- }
- ];
- },
- });
|