Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
i20rzslider
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
jedife
i20rzslider
Commits
61ca53c9
Commit
61ca53c9
authored
Sep 08, 2015
by
Valentin Hervieu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixes #108. Also add ng-show example showing the usage of rzSliderForceRender
parent
05cbdc86
Changes
6
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
99 additions
and
76 deletions
+99
-76
bower.json
bower.json
+1
-1
index.html
demo/index.html
+92
-69
rzslider.min.css
dist/rzslider.min.css
+1
-1
rzslider.min.js
dist/rzslider.min.js
+2
-2
package.json
package.json
+1
-1
rzslider.js
rzslider.js
+2
-2
No files found.
bower.json
View file @
61ca53c9
{
{
"name"
:
"angularjs-slider"
,
"name"
:
"angularjs-slider"
,
"version"
:
"0.1.2
7
"
,
"version"
:
"0.1.2
8
"
,
"homepage"
:
"https://github.com/rzajac/angularjs-slider"
,
"homepage"
:
"https://github.com/rzajac/angularjs-slider"
,
"authors"
:
[
"authors"
:
[
"Rafal Zajac <rzajac@gmail.com>"
,
"Rafal Zajac <rzajac@gmail.com>"
,
...
...
demo/index.html
View file @
61ca53c9
...
@@ -2,24 +2,25 @@
...
@@ -2,24 +2,25 @@
<html
ng-app=
"plunker"
>
<html
ng-app=
"plunker"
>
<head>
<head>
<meta
charset=
"utf-8"
/>
<meta
charset=
"utf-8"
/>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1"
>
<title>
AngularJS Touch Slider
</title>
<title>
AngularJS Touch Slider
</title>
<link
rel=
"stylesheet"
href=
"demo.css"
/>
<link
rel=
"stylesheet"
href=
"demo.css"
/>
<link
rel=
"stylesheet"
href=
"../dist/rzslider.css"
/>
<link
rel=
"stylesheet"
href=
"../dist/rzslider.css"
/>
<link
href=
'http://fonts.googleapis.com/css?family=Open+Sans:300,400,700'
rel=
'stylesheet'
type=
'text/css'
>
<link
href=
'http://fonts.googleapis.com/css?family=Open+Sans:300,400,700'
rel=
'stylesheet'
type=
'text/css'
>
</head>
</head>
<body
ng-controller=
"MainCtrl"
>
<body
ng-controller=
"MainCtrl"
>
<div
class=
"wrapper"
>
<div
class=
"wrapper"
>
<header>
<header>
<h1>
AngularJS Touch Slider
</h1>
<h1>
AngularJS Touch Slider
</h1>
</header>
</header>
<article>
<article>
<h2>
Min/max slider example
</h2>
<h2>
Min/max slider example
</h2>
Value:
<pre>
{{ slider_data | json }}
</pre>
Value:
<pre>
{{ slider_data | json }}
</pre>
<p>
Value linked on change: {{ otherData.value }}
</p>
<p>
Value linked on change: {{ otherData.value }}
</p>
<rzslider
<rzslider
...
@@ -33,7 +34,8 @@
...
@@ -33,7 +34,8 @@
<article>
<article>
<h2>
Min/max slider example
</h2>
<h2>
Min/max slider example
</h2>
Value:
<pre>
{{ priceSlider | json }}
</pre>
Value:
<pre>
{{ priceSlider | json }}
</pre>
<input
type=
"text"
ng-model=
"priceSlider.min"
/><br/>
<input
type=
"text"
ng-model=
"priceSlider.min"
/><br/>
<input
type=
"text"
ng-model=
"priceSlider.max"
/><br/>
<input
type=
"text"
ng-model=
"priceSlider.max"
/><br/>
...
@@ -83,7 +85,8 @@
...
@@ -83,7 +85,8 @@
<article>
<article>
<h2>
Draggable range example
</h2>
<h2>
Draggable range example
</h2>
Value:
<pre>
{{ priceSlider | json }}
</pre>
Value:
<pre>
{{ priceSlider | json }}
</pre>
<input
type=
"text"
ng-model=
"priceSlider.min"
/><br/>
<input
type=
"text"
ng-model=
"priceSlider.min"
/><br/>
<input
type=
"text"
ng-model=
"priceSlider.max"
/><br/>
<input
type=
"text"
ng-model=
"priceSlider.max"
/><br/>
...
@@ -98,7 +101,15 @@
...
@@ -98,7 +101,15 @@
rz-slider-tpl-url=
"rzSliderTpl.html"
></rzslider>
rz-slider-tpl-url=
"rzSliderTpl.html"
></rzslider>
</article>
</article>
<article>
<h2>
Toggle slider example
</h2>
<button
ng-click=
"toggle()"
>
Show
</button>
<div
ng-show=
"visible"
>
<rzslider
rz-slider-model=
"toggleSlider.value"
rz-slider-floor=
"toggleSlider.floor"
rz-slider-ceil=
"toggleSlider.ceil"
></rzslider>
</div>
</div>
</article>
</div>
</body>
</body>
<script
src=
"../bower_components/angular/angular.min.js"
></script>
<script
src=
"../bower_components/angular/angular.min.js"
></script>
...
@@ -106,8 +117,7 @@
...
@@ -106,8 +117,7 @@
<script>
<script>
var
app
=
angular
.
module
(
'plunker'
,
[
'rzModule'
]);
var
app
=
angular
.
module
(
'plunker'
,
[
'rzModule'
]);
app
.
controller
(
'MainCtrl'
,
function
(
$scope
)
app
.
controller
(
'MainCtrl'
,
function
(
$scope
,
$timeout
)
{
{
$scope
.
priceSlider
=
{
$scope
.
priceSlider
=
{
min
:
100
,
min
:
100
,
max
:
400
,
max
:
400
,
...
@@ -118,16 +128,14 @@
...
@@ -118,16 +128,14 @@
$scope
.
priceSlider2
=
150
;
$scope
.
priceSlider2
=
150
;
$scope
.
priceSlider3
=
250
;
$scope
.
priceSlider3
=
250
;
$scope
.
translate
=
function
(
value
)
$scope
.
translate
=
function
(
value
)
{
{
return
'$'
+
value
;
return
'$'
+
value
;
};
};
var
alphabetArray
=
'abcdefghijklmnopqrstuvwxyz'
.
split
(
''
);
var
alphabetArray
=
'abcdefghijklmnopqrstuvwxyz'
.
split
(
''
);
$scope
.
letter
=
5
;
$scope
.
letter
=
5
;
$scope
.
letterMax
=
alphabetArray
.
length
-
1
;
$scope
.
letterMax
=
alphabetArray
.
length
-
1
;
$scope
.
alphabetTranslate
=
function
(
value
)
$scope
.
alphabetTranslate
=
function
(
value
)
{
{
return
alphabetArray
[
value
].
toUpperCase
();
return
alphabetArray
[
value
].
toUpperCase
();
};
};
...
@@ -138,6 +146,21 @@
...
@@ -138,6 +146,21 @@
console
.
info
(
'changed'
,
$scope
.
slider_data
.
value
);
console
.
info
(
'changed'
,
$scope
.
slider_data
.
value
);
$scope
.
otherData
.
value
=
$scope
.
slider_data
.
value
*
10
;
$scope
.
otherData
.
value
=
$scope
.
slider_data
.
value
*
10
;
};
};
$scope
.
visible
=
false
;
$scope
.
toggle
=
function
()
{
$scope
.
visible
=
!
$scope
.
visible
;
$timeout
(
function
()
{
$scope
.
$broadcast
(
'rzSliderForceRender'
);
});
};
$scope
.
toggleSlider
=
{
value
:
0
,
ceil
:
500
,
floor
:
0
};
});
});
</script>
</script>
...
...
dist/rzslider.min.css
View file @
61ca53c9
/*! jusas-angularjs-slider - v0.1.2
7 - (c) Rafal Zajac <rzajac@gmail.com>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com>, https://github.com/rzajac/angularjs-slider.git - 2015-08-25
*/
/*! jusas-angularjs-slider - v0.1.2
8 - (c) Rafal Zajac <rzajac@gmail.com>, Jussi Saarivirta <jusasi@gmail.com>, Angelin Sirbu <angelin.sirbu@gmail.com>, https://github.com/rzajac/angularjs-slider.git - 2015-09-08
*/
rzslider
{
position
:
relative
;
display
:
inline-block
;
width
:
100%
;
height
:
4px
;
margin
:
30px
0
15px
0
;
vertical-align
:
middle
}
rzslider
span
{
position
:
absolute
;
display
:
inline-block
;
white-space
:
nowrap
}
rzslider
span
.rz-base
{
width
:
100%
;
height
:
100%
;
padding
:
0
}
rzslider
span
.rz-bar-wrapper
{
left
:
0
;
width
:
100%
;
height
:
32px
;
padding-top
:
16px
;
margin-top
:
-16px
;
box-sizing
:
border-box
}
rzslider
span
.rz-bar
{
left
:
0
;
z-index
:
0
;
width
:
100%
;
height
:
4px
;
background
:
#d8e0f3
;
-webkit-border-radius
:
2px
;
-moz-border-radius
:
2px
;
border-radius
:
2px
}
rzslider
span
.rz-bar.rz-selection
{
z-index
:
1
;
background
:
#0db9f0
;
-webkit-border-radius
:
2px
;
-moz-border-radius
:
2px
;
border-radius
:
2px
}
rzslider
span
.rz-pointer
{
top
:
-14px
;
z-index
:
2
;
width
:
32px
;
height
:
32px
;
cursor
:
pointer
;
background-color
:
#0db9f0
;
-webkit-border-radius
:
16px
;
-moz-border-radius
:
16px
;
border-radius
:
16px
}
rzslider
span
.rz-pointer
:after
{
position
:
absolute
;
top
:
12px
;
left
:
12px
;
width
:
8px
;
height
:
8px
;
background
:
#fff
;
-webkit-border-radius
:
4px
;
-moz-border-radius
:
4px
;
border-radius
:
4px
;
content
:
''
}
rzslider
span
.rz-pointer
:hover:after
{
background-color
:
#fff
}
rzslider
span
.rz-pointer.rz-active
:after
{
background-color
:
#451aff
}
rzslider
span
.rz-bubble
{
top
:
-32px
;
padding
:
1px
3px
;
color
:
#55637d
;
cursor
:
default
}
rzslider
span
.rz-bubble.rz-selection
{
top
:
16px
}
rzslider
span
.rz-bubble.rz-limit
{
color
:
#55637d
}
rzslider
{
position
:
relative
;
display
:
inline-block
;
width
:
100%
;
height
:
4px
;
margin
:
30px
0
15px
0
;
vertical-align
:
middle
}
rzslider
span
{
position
:
absolute
;
display
:
inline-block
;
white-space
:
nowrap
}
rzslider
span
.rz-base
{
width
:
100%
;
height
:
100%
;
padding
:
0
}
rzslider
span
.rz-bar-wrapper
{
left
:
0
;
width
:
100%
;
height
:
32px
;
padding-top
:
16px
;
margin-top
:
-16px
;
box-sizing
:
border-box
}
rzslider
span
.rz-bar
{
left
:
0
;
z-index
:
0
;
width
:
100%
;
height
:
4px
;
background
:
#d8e0f3
;
-webkit-border-radius
:
2px
;
-moz-border-radius
:
2px
;
border-radius
:
2px
}
rzslider
span
.rz-bar.rz-selection
{
z-index
:
1
;
background
:
#0db9f0
;
-webkit-border-radius
:
2px
;
-moz-border-radius
:
2px
;
border-radius
:
2px
}
rzslider
span
.rz-pointer
{
top
:
-14px
;
z-index
:
2
;
width
:
32px
;
height
:
32px
;
cursor
:
pointer
;
background-color
:
#0db9f0
;
-webkit-border-radius
:
16px
;
-moz-border-radius
:
16px
;
border-radius
:
16px
}
rzslider
span
.rz-pointer
:after
{
position
:
absolute
;
top
:
12px
;
left
:
12px
;
width
:
8px
;
height
:
8px
;
background
:
#fff
;
-webkit-border-radius
:
4px
;
-moz-border-radius
:
4px
;
border-radius
:
4px
;
content
:
''
}
rzslider
span
.rz-pointer
:hover:after
{
background-color
:
#fff
}
rzslider
span
.rz-pointer.rz-active
:after
{
background-color
:
#451aff
}
rzslider
span
.rz-bubble
{
top
:
-32px
;
padding
:
1px
3px
;
color
:
#55637d
;
cursor
:
default
}
rzslider
span
.rz-bubble.rz-selection
{
top
:
16px
}
rzslider
span
.rz-bubble.rz-limit
{
color
:
#55637d
}
\ No newline at end of file
dist/rzslider.min.js
View file @
61ca53c9
This diff is collapsed.
Click to expand it.
package.json
View file @
61ca53c9
{
{
"name"
:
"jusas-angularjs-slider"
,
"name"
:
"jusas-angularjs-slider"
,
"version"
:
"0.1.2
7
"
,
"version"
:
"0.1.2
8
"
,
"description"
:
"AngularJS slider directive with no external dependencies. Mobile friendly!."
,
"description"
:
"AngularJS slider directive with no external dependencies. Mobile friendly!."
,
"main"
:
"rzslider.js"
,
"main"
:
"rzslider.js"
,
"repository"
:
{
"repository"
:
{
...
...
rzslider.js
View file @
61ca53c9
...
@@ -4,7 +4,7 @@
...
@@ -4,7 +4,7 @@
* (c) Rafal Zajac <rzajac@gmail.com>
* (c) Rafal Zajac <rzajac@gmail.com>
* http://github.com/rzajac/angularjs-slider
* http://github.com/rzajac/angularjs-slider
*
*
* Version: v0.1.2
7
* Version: v0.1.2
8
*
*
* Licensed under the MIT license
* Licensed under the MIT license
*/
*/
...
@@ -369,9 +369,9 @@ function throttle(func, wait, options) {
...
@@ -369,9 +369,9 @@ function throttle(func, wait, options) {
resetSlider
:
function
()
resetSlider
:
function
()
{
{
this
.
setMinAndMax
();
this
.
setMinAndMax
();
this
.
calcViewDimensions
();
this
.
updateCeilLab
();
this
.
updateCeilLab
();
this
.
updateFloorLab
();
this
.
updateFloorLab
();
this
.
calcViewDimensions
();
},
},
/**
/**
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment