]>
git.proxmox.com Git - extjs.git/blob - extjs/build/examples/kitchensink/classic/samples/view/form/SliderField.js
2 * Shows how the Slider control can be used in a form and participate like a form field.
4 Ext
.define('KitchenSink.view.form.SliderField', {
5 extend
: 'Ext.form.Panel',
10 xtype
: 'slider-field',
12 exampleTitle
: 'Slider field example',
27 title
: 'Sound Settings',
30 initComponent: function(){
31 this.msgTpl
= new Ext
.Template(
32 'Sounds Effects: <b>{fx}%</b><br />',
33 'Ambient Sounds: <b>{ambient}%</b><br />',
34 'Interface Sounds: <b>{iface}%</b>'
38 labelWidth
: this.profileInfo
.labelWidth
,
40 tipText: function(thumb
){
41 return String(thumb
.value
) + '%';
44 defaultType
: 'slider',
46 fieldLabel
: 'Sound Effects',
50 fieldLabel
: 'Ambient Sounds',
54 fieldLabel
: 'Interface Sounds',
61 handler
: this.onMaxAllClick
65 handler
: this.onSaveClick
69 handler
: this.onResetClick
75 onMaxAllClick: function(){
77 this.items
.each(function(c
){
80 Ext
.resumeLayouts(true);
83 onSaveClick: function(){
85 title
: 'Settings Saved',
86 msg
: this.msgTpl
.apply(this.getForm().getValues()),
92 onResetClick: function(){
93 this.getForm().reset();