@@ -6,46 +6,96 @@ angular.module("ion.rangeslider", []);
6
6
7
7
angular . module ( "ion.rangeslider" ) . directive ( "ionRangeSlider" , [
8
8
function ( ) {
9
-
9
+
10
10
return {
11
11
restrict : "E" ,
12
12
scope : {
13
13
min : "=" ,
14
14
max : "=" ,
15
+ from : "=" ,
16
+ to : "=" ,
17
+ disable : "=" ,
18
+
15
19
type : "@" ,
16
- prefix : "@" ,
17
- maxPostfix : "@" ,
18
- prettify : "@" ,
20
+ step : "@" ,
21
+ minInterval : "@" ,
22
+ maxInterval : "@" ,
23
+ dragInterval : "@" ,
24
+ values : "@" ,
25
+ fromFixed : "@" ,
26
+ fromMin : "@" ,
27
+ fromMax : "@" ,
28
+ fromShadow : "@" ,
29
+ toFixed : "@" ,
30
+ toMax : "@" ,
31
+ toShadow : "@" ,
32
+ prettifyEnabled : "@" ,
33
+ prettifySeparator : "@" ,
34
+ forceEdges : "@" ,
35
+ keyboard : "@" ,
36
+ keyboardStep : "@" ,
19
37
grid : "@" ,
20
38
gridMargin : "@" ,
21
- postfix : "@" ,
22
- step : "@" ,
39
+ gridNum : "@" ,
40
+ gridSnap : "@" ,
23
41
hideMinMax : "@" ,
24
42
hideFromTo : "@" ,
25
- from : "=" ,
26
- to : "=" ,
27
- disable : "=" ,
43
+ prefix : "@" ,
44
+ postfix : "@" ,
45
+ maxPostfix : "@" ,
46
+ decorateBoth : "@" ,
47
+ valuesSeparator : "@" ,
48
+ inputValuesSeparator : "@" ,
49
+
50
+ prettify : "&" ,
28
51
onChange : "&" ,
29
- onFinish : "&"
52
+ onFinish : "&" ,
30
53
} ,
31
54
replace : true ,
32
- link : function ( $scope , $element ) {
55
+ link : function ( $scope , $element , attrs ) {
33
56
$element . ionRangeSlider ( {
34
57
min : $scope . min ,
35
58
max : $scope . max ,
36
- type : $scope . type ,
37
- prefix : $scope . prefix ,
38
- maxPostfix : $scope . maxPostfix ,
39
- prettify : $scope . prettify ,
40
- grid : $scope . grid ,
41
- gridMargin : $scope . gridMargin ,
42
- postfix : $scope . postfix ,
43
- step : $scope . step ,
44
- hideMinMax : $scope . hideMinMax ,
45
- hideFromTo : $scope . hideFromTo ,
46
59
from : $scope . from ,
47
60
to : $scope . to ,
48
61
disable : $scope . disable ,
62
+ type : $scope . type ,
63
+ step : $scope . step ,
64
+ minInterval : $scope . min_interval ,
65
+ maxInterval : $scope . max_interval ,
66
+ dragInterval : $scope . drag_interval ,
67
+ values : $scope . values ,
68
+ fromFixed : $scope . from_fixed ,
69
+ fromMin : $scope . from_min ,
70
+ fromMax : $scope . from_max ,
71
+ fromShadow : $scope . from_shadow ,
72
+ toFixed : $scope . to_fixed ,
73
+ toMax : $scope . to_max ,
74
+ toShadow : $scope . to_shadow ,
75
+ prettifyEnabled : $scope . prettify_enabled ,
76
+ prettifySeparator : $scope . prettify_separator ,
77
+ forceEdges : $scope . force_edges ,
78
+ keyboard : $scope . keyboard ,
79
+ keyboardStep : $scope . keyboard_step ,
80
+ grid : $scope . grid ,
81
+ gridMargin : $scope . grid_margin ,
82
+ gridNum : $scope . grid_num ,
83
+ gridSnap : $scope . grid_snap ,
84
+ hideMinMax : $scope . hide_min_max ,
85
+ hideFromTo : $scope . hide_from_to ,
86
+ prefix : $scope . prefix ,
87
+ postfix : $scope . postfix ,
88
+ maxPostfix : $scope . max_postfix ,
89
+ decorateBoth : $scope . decorate_both ,
90
+ valuesSeparator : $scope . values_separator ,
91
+ inputValuesSeparator : $scope . input_values_separator ,
92
+
93
+ prettify : function ( value ) {
94
+ if ( ! attrs . prettify ) {
95
+ return value ;
96
+ }
97
+ return $scope . prettify ( { value : value } ) ;
98
+ } ,
49
99
onChange : function ( a ) {
50
100
$scope . $apply ( function ( ) {
51
101
$scope . from = a . from ;
@@ -57,7 +107,7 @@ angular.module("ion.rangeslider").directive("ionRangeSlider", [
57
107
} ,
58
108
onFinish : function ( ) {
59
109
$scope . $apply ( $scope . onFinish ) ;
60
- }
110
+ } ,
61
111
} ) ;
62
112
var watchers = [ ] ;
63
113
watchers . push ( $scope . $watch ( "min" , function ( value ) {
@@ -93,6 +143,6 @@ angular.module("ion.rangeslider").directive("ionRangeSlider", [
93
143
} ) ) ;
94
144
}
95
145
}
96
-
146
+
97
147
}
98
148
] )
0 commit comments