/*!
- * Ext JS Library 3.0.3
- * Copyright(c) 2006-2009 Ext JS, LLC
+ * Ext JS Library 3.1.1
+ * Copyright(c) 2006-2010 Ext JS, LLC
* licensing@extjs.com
* http://www.extjs.com/license
*/
Ext.ux.SlidingPager = Ext.extend(Object, {\r
init : function(pbar){\r
- Ext.each(pbar.items.getRange(2,6), function(c){\r
+ var idx = pbar.items.indexOf(pbar.inputItem);\r
+ Ext.each(pbar.items.getRange(idx - 2, idx + 2), function(c){\r
c.hide();\r
});\r
var slider = new Ext.Slider({\r
}\r
}\r
});\r
- pbar.insert(5, slider);\r
+ pbar.insert(idx + 1, slider);\r
pbar.on({\r
change: function(pb, data){\r
- slider.maxValue = data.pages;\r
+ slider.setMaxValue(data.pages);\r
slider.setValue(data.activePage);\r
- },\r
- beforedestroy: function(){\r
- slider.destroy();\r
}\r
});\r
}\r