X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/ee06f37b0f6f6d94cd05a6ffae556660f7c4a2bc..c930e9176a5a85509c5b0230e2bff5c22a591432:/examples/grid/SlidingPager.js diff --git a/examples/grid/SlidingPager.js b/examples/grid/SlidingPager.js deleted file mode 100644 index bce4fb41..00000000 --- a/examples/grid/SlidingPager.js +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Ext JS Library 2.2.1 - * Copyright(c) 2006-2009, Ext JS, LLC. - * licensing@extjs.com - * - * http://extjs.com/license - */ - -Ext.ux.SlidingPager = Ext.extend(Ext.util.Observable, { - init : function(pbar){ - this.pagingBar = pbar; - - pbar.on('render', this.onRender, this); - pbar.on('beforedestroy', this.onDestroy, this); - }, - - onRender : function(pbar){ - Ext.each(pbar.items.getRange(2,6), function(c){ - c.hide(); - }); - var td = document.createElement("td"); - pbar.tr.insertBefore(td, pbar.tr.childNodes[5]); - - td.style.padding = '0 5px'; - - this.slider = new Ext.Slider({ - width: 114, - minValue: 1, - maxValue: 1, - plugins:new Ext.ux.SliderTip({ - bodyStyle:'padding:5px;', - getText : function(s){ - return String.format('Page {0} of {1}', s.value, s.maxValue); - } - }) - }); - this.slider.render(td); - - this.slider.on('changecomplete', function(s, v){ - pbar.changePage(v); - }); - - pbar.on('change', function(pb, data){ - this.slider.maxValue = data.pages; - this.slider.setValue(data.activePage); - }, this); - }, - - onDestroy : function(){ - this.slider.destroy(); - } -}); \ No newline at end of file