ChangeData.js
2 years ago
CheckboxData.js
2 years ago
InputData.js
2 years ago
InputMaskedData.js
2 years ago
MultiSelectData.js
2 years ago
NoListenData.js
2 years ago
RadioData.js
2 years ago
RangeData.js
2 years ago
RenderStateData.js
2 years ago
WysiwygData.js
2 years ago
functions.js
2 years ago
RangeData.js
25 lines
| 1 | import InputData from './InputData'; |
| 2 | import { isRange } from '../supports'; |
| 3 | |
| 4 | function RangeData() { |
| 5 | InputData.call( this ); |
| 6 | |
| 7 | /** |
| 8 | * @type {HTMLElement} |
| 9 | */ |
| 10 | this.numberNode = null; |
| 11 | this.isSupported = function ( node ) { |
| 12 | return isRange( node ); |
| 13 | }; |
| 14 | this.setNode = function ( node ) { |
| 15 | InputData.prototype.setNode.call( this, node ); |
| 16 | |
| 17 | this.numberNode = node.parentElement.querySelector( |
| 18 | '.jet-form-builder__field-value-number', |
| 19 | ); |
| 20 | }; |
| 21 | } |
| 22 | |
| 23 | RangeData.prototype = Object.create( InputData.prototype ); |
| 24 | |
| 25 | export default RangeData; |