Skip to content
This repository has been archived by the owner on Feb 8, 2019. It is now read-only.
/ glider-rails Public archive

DEPRECATED: please note, this project is no longer being maintained

License

Notifications You must be signed in to change notification settings

evrone/glider-rails

Repository files navigation

PLEASE NOTE, THIS PROJECT IS NO LONGER BEING MAINTAINED

Glider - angularjs UI slider

Glider - AngularJS slider with no dependencies. Dead simple, < 200 LOC.

Sponsored by Evrone

Demo

Demo is available here: http://evrone.github.io/glider

Getting Started

Installation

Bower

bower install glider

Ruby-on-Rails

Add this to your Gemfile

gem 'glider-rails' and

bundle install

After that you can add the file to sprockets:

//= require glider

Usage

Add module as a dependency:

angular.module('myApp', ['glider']);

And then in HTML:

<slider min="21" max="130" value="age"></slider>

To defer value update until mouseup:

<slider defer_update min="21" max="130" value="age"></slider>

Show value in handle:

<slider show_value_in_handle min="21" max="130" value="age"></slider>

Use increments with snapping:

<slider min="50" max="500" increments="100,200,300,400" value="price"></slider>
CoffeeScript to JavaScript compilation

To convert the src/glider.coffee to javascript, use coffeescript compiler. Install it with:

npm -g install coffee-script

Then compile the file with:

coffee -c -o . --map src/glider.coffee

This will compile the src/glider.coffee to glider.js and generate the source map.

Minification

To minify the file I recommend using uglifyjs If you don't have it installed, install it with:

npm -g install uglify-js

Then run the minification with:

uglifyjs glider.js > glider.min.js -mc

-mc tells uglifier to (m)angle and (c)ompress the input code.

If you don't have node.js installed on your machine, you can create a minified version of the library with online services, such as Google Closure compiler

Contributing

Please read Code of Conduct and Contributing Guidelines for submitting pull requests to us.

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Changelog

The changelog is here.

Authors

See also the list of contributors who participated in this project.

License

This project is licensed under the MIT License.

About

DEPRECATED: please note, this project is no longer being maintained

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published