Upgrade to ExtJS 3.0.0 - Released 07/06/2009
[extjs.git] / docs / source / SlidingPager.html
diff --git a/docs/source/SlidingPager.html b/docs/source/SlidingPager.html
new file mode 100644 (file)
index 0000000..6e4dca6
--- /dev/null
@@ -0,0 +1,41 @@
+<html>\r
+<head>\r
+  <title>The source code</title>\r
+    <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />\r
+    <script type="text/javascript" src="../resources/prettify/prettify.js"></script>\r
+</head>\r
+<body  onload="prettyPrint();">\r
+    <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>    \r
+</body>\r
+</html>
\ No newline at end of file