3 <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
4 <title>The source code</title>
5 <link href="../resources/prettify/prettify.css" type="text/css" rel="stylesheet" />
6 <script type="text/javascript" src="../resources/prettify/prettify.js"></script>
8 <body onload="prettyPrint();">
9 <pre class="prettyprint lang-js">/*!
10 * Ext JS Library 3.3.1
11 * Copyright(c) 2006-2010 Sencha Inc.
12 * licensing@sencha.com
13 * http://www.sencha.com/license
15 <div id="prop-Ext.DataView.LabelEditor-SlidingPager"></div>/**
16 * Plugin for PagingToolbar which replaces the textfield input with a slider
18 Ext.ux.SlidingPager = Ext.extend(Object, {
19 init : function(pbar){
20 var idx = pbar.items.indexOf(pbar.inputItem);
21 Ext.each(pbar.items.getRange(idx - 2, idx + 2), function(c){
24 var slider = new Ext.Slider({
28 plugins: new Ext.slider.Tip({
29 getText : function(thumb) {
30 return String.format('Page <b>{0}</b> of <b>{1}</b>', thumb.value, thumb.slider.maxValue);
34 changecomplete: function(s, v){
39 pbar.insert(idx + 1, slider);
41 change: function(pb, data){
42 slider.setMaxValue(data.pages);
43 slider.setValue(data.activePage);