+++ /dev/null
-<html>
-<head>
- <title>The source code</title>
- <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
- <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
-</head>
-<body onload="prettyPrint();">
- <pre class="prettyprint lang-js">Ext.ux.SlidingPager = Ext.extend(Object, {\r
- init : function(pbar){\r
- Ext.each(pbar.items.getRange(2,6), function(c){\r
- c.hide();\r
- });\r
- var slider = new Ext.Slider({\r
- width: 114,\r
- minValue: 1,\r
- maxValue: 1,\r
- plugins: new Ext.ux.SliderTip({\r
- getText : function(s){\r
- return String.format('Page <b>{0}</b> of <b>{1}</b>', s.value, s.maxValue);\r
- }\r
- }),\r
- listeners: {\r
- changecomplete: function(s, v){\r
- pbar.changePage(v);\r
- }\r
- }\r
- });\r
- pbar.insert(5, slider);\r
- pbar.on({\r
- change: function(pb, data){\r
- slider.maxValue = data.pages;\r
- slider.setValue(data.activePage);\r
- },\r
- beforedestroy: function(){\r
- slider.destroy();\r
- }\r
- });\r
- }\r
-});</pre>
-</body>
-</html>
\ No newline at end of file