glider-rails 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
|
|
1
1
|
###
|
2
|
-
glider 0.0.
|
2
|
+
glider 0.0.6 - AngularJS slider
|
3
3
|
https://github.com/evrone/glider
|
4
4
|
Copyright (c) 2013 Valentin Vasilyev, Dmitry Karpunin
|
5
5
|
Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
|
@@ -111,6 +111,7 @@ app.directive "slider", ["$document", ($document) ->
|
|
111
111
|
]
|
112
112
|
app.filter 'slice', ->
|
113
113
|
(input) ->
|
114
|
+
return unless input?
|
114
115
|
input = input.toString()
|
115
116
|
reverse = (input) -> input.split('').reverse().join('')
|
116
117
|
reversed = reverse(input)
|
@@ -1,6 +1,6 @@
|
|
1
1
|
// Generated by CoffeeScript 1.6.3
|
2
2
|
/*
|
3
|
-
glider 0.0.
|
3
|
+
glider 0.0.6 - AngularJS slider
|
4
4
|
https://github.com/evrone/glider
|
5
5
|
Copyright (c) 2013 Valentin Vasilyev, Dmitry Karpunin
|
6
6
|
Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license.
|
@@ -123,6 +123,9 @@
|
|
123
123
|
app.filter('slice', function() {
|
124
124
|
return function(input) {
|
125
125
|
var reverse, reversed, reversed_and_sliced, sliced;
|
126
|
+
if (input == null) {
|
127
|
+
return;
|
128
|
+
}
|
126
129
|
input = input.toString();
|
127
130
|
reverse = function(input) {
|
128
131
|
return input.split('').reverse().join('');
|
@@ -1 +1 @@
|
|
1
|
-
!function(){"use strict";var n;n=angular.module("glider",[]),n.directive("slider",["$document",function(n){var e,a;return e=function(n,e){return n[0].getElementsByClassName(e)[0]},a=function(n,a){return angular.element(e(n,"handle")).css("left",""+a+"%"),angular.element(e(n,"range")).css("width",""+a+"%")},{template:'<span class="g-slider horizontal">\n <span class="slider">\n <span class="range"></span>\n <span class="handle" ng-mousedown="mouseDown($event)"></span>\n </span>\n <span class="side dec">\n <span class="button" ng-click="step(-1)">-</span>\n <span class="bound-value">{{min() | slice}}</span>\n </span>\n <span class="side inc">\n <span class="button" ng-click="step(+1)">+</span>\n <span class="bound-value">{{max() | slice}}</span>\n </span>\n</span>',replace:!0,restrict:"E",scope:{value:"=",min:"&",max:"&"},link:function(s,t,u){var r,l,i,c,o,p;return c=e(t,"slider"),l=!1,p=0,o=null!=u.step?parseInt(u.step,10):1,r=null!=u.deferUpdate,null==s.value&&(s.value=s.min()),i=function(){var n;return n=s.max()-s.min(),0===n?p=0:(p=100*((s.value-s.min())/n),p=Math.min(Math.max(0,p),100)),a(t,p)},s.$watch("min()",function(n){return s.value<n?s.value=n:i()}),s.$watch("max()",function(n){return s.value>n?s.value=n:i()}),s.$watch("value",function(){return l?void 0:i()}),s.step=function(n){var e;return e=s.value+n*o,s.min()<=e&&e<=s.max()?s.value=e:void 0},s.mouseDown=function(e){var u,i;return l=!0,u=e.pageX,i=function(){return s.value=Math.round(((s.max()-s.min())*(p/100)+s.min())/o)*o,s.$apply()},n.on("mousemove",function(n){var e;if(l)return e=n.pageX-u,p+=100*(e/c.offsetWidth),0>p?p=0:p>100?p=100:u=n.pageX,r||i(),a(t,p)}),n.on("mouseup",function(){return l=!1,r&&i(),n.off("mousemove")})}}}}]),n.filter("slice",function(){return function(n){var e,a,s,t;return n=n.toString(),e=function(n){return n.split("").reverse().join("")},a=e(n),s=a.replace(/(.{3})/g,"$1 "),t=e(s),t.trim()}})}.call(this);
|
1
|
+
!function(){"use strict";var n;n=angular.module("glider",[]),n.directive("slider",["$document",function(n){var e,a;return e=function(n,e){return n[0].getElementsByClassName(e)[0]},a=function(n,a){return angular.element(e(n,"handle")).css("left",""+a+"%"),angular.element(e(n,"range")).css("width",""+a+"%")},{template:'<span class="g-slider horizontal">\n <span class="slider">\n <span class="range"></span>\n <span class="handle" ng-mousedown="mouseDown($event)"></span>\n </span>\n <span class="side dec">\n <span class="button" ng-click="step(-1)">-</span>\n <span class="bound-value">{{min() | slice}}</span>\n </span>\n <span class="side inc">\n <span class="button" ng-click="step(+1)">+</span>\n <span class="bound-value">{{max() | slice}}</span>\n </span>\n</span>',replace:!0,restrict:"E",scope:{value:"=",min:"&",max:"&"},link:function(s,t,u){var r,l,i,c,o,p;return c=e(t,"slider"),l=!1,p=0,o=null!=u.step?parseInt(u.step,10):1,r=null!=u.deferUpdate,null==s.value&&(s.value=s.min()),i=function(){var n;return n=s.max()-s.min(),0===n?p=0:(p=100*((s.value-s.min())/n),p=Math.min(Math.max(0,p),100)),a(t,p)},s.$watch("min()",function(n){return s.value<n?s.value=n:i()}),s.$watch("max()",function(n){return s.value>n?s.value=n:i()}),s.$watch("value",function(){return l?void 0:i()}),s.step=function(n){var e;return e=s.value+n*o,s.min()<=e&&e<=s.max()?s.value=e:void 0},s.mouseDown=function(e){var u,i;return l=!0,u=e.pageX,i=function(){return s.value=Math.round(((s.max()-s.min())*(p/100)+s.min())/o)*o,s.$apply()},n.on("mousemove",function(n){var e;if(l)return e=n.pageX-u,p+=100*(e/c.offsetWidth),0>p?p=0:p>100?p=100:u=n.pageX,r||i(),a(t,p)}),n.on("mouseup",function(){return l=!1,r&&i(),n.off("mousemove")})}}}}]),n.filter("slice",function(){return function(n){var e,a,s,t;if(null!=n)return n=n.toString(),e=function(n){return n.split("").reverse().join("")},a=e(n),s=a.replace(/(.{3})/g,"$1 "),t=e(s),t.trim()}})}.call(this);
|
data/glider-rails.gemspec
CHANGED
@@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
4
|
|
5
5
|
Gem::Specification.new do |gem|
|
6
6
|
gem.name = "glider-rails"
|
7
|
-
gem.version = "0.0.
|
7
|
+
gem.version = "0.0.6"
|
8
8
|
gem.authors = ["Valentin Vasilyev", "Dmitry Karpunin"]
|
9
9
|
gem.email = ["iamvalentin@gmail.com", "koderfunk@gmail.com"]
|
10
10
|
gem.description = "Glider, AngularJS UI slider for rails asset pipeline"
|