Sha256: b04ca58f8ac02c71809c72864893d75a378bcba467a4600a254cbbd7cdfda059

Contents?: true

Size: 1009 Bytes

Versions: 4

Compression:

Stored size: 1009 Bytes

Contents

/*
---
 
script: Range.js
 
description: Range slider input
 
license: Public domain (http://unlicense.org).

authors: Yaroslaff Fedin
 
requires:
- LSD.Widget.Input
- LSD.Widget.Button
- LSD/LSD.Widget
- LSD/LSD.Trait.Slider
- LSD/LSD.Mixin.Focusable

provides: [LSD.Widget.Input.Range]
 
...
*/

LSD.Widget.Input.Range = new Class({
  Extends: LSD.Trait.Slider,
  
  options: {
    tag: 'input',
    shortcuts: {
      next: 'increment',
      previous: 'decrement'
    },
    layout: Array.object('::thumb'),
    has: {
      one: {
        thumb: {
          selector: 'thumb',
          source: 'input-range-thumb'
        }
      }
    },
    pseudos: Array.object('focusable', 'value', 'form-associated')
  },
  
  initialize: function() {
    this.parent.apply(this, arguments);
    this.addPseudo(this.options.mode);
  },

  onSet: function(value) {
    this.setValue(value);
  }
});

LSD.Widget.Input.Range.Thumb = new Class({
  Extends: LSD.Widget.Button,
    
  options: {
    tag: 'thumb'
  }
});

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
lsd_rails-0.1.6 Packages/lsd-widgets/Source/Input/Range.js
lsd_rails-0.1.5 Packages/lsd-widgets/Source/Input/Range.js
lsd_rails-0.1.4 Packages/lsd-widgets/Source/Input/Range.js
lsd_rails-0.1.3 Packages/lsd-widgets/Source/Input/Range.js