From e66d7d99408604b4e59c2fbd4a261b810752de08 Mon Sep 17 00:00:00 2001 From: Genki Kondo Date: Wed, 25 Mar 2015 14:05:39 -0700 Subject: [PATCH] A brand new look --- .gitignore | 3 +- .npmignore | 5 - PSD/sprite-skin.psd | Bin 164259 -> 0 bytes bower.json | 39 +- css/ion.rangeSlider.css | 149 --- css/ion.rangeSlider.skinFlat.css | 106 -- css/ion.rangeSlider.skinHTML5.css | 124 -- css/ion.rangeSlider.skinModern.css | 116 -- css/ion.rangeSlider.skinNice.css | 102 -- css/ion.rangeSlider.skinSimple.css | 102 -- css/normalize.css | 427 ------ img/sprite-skin-flat.png | Bin 304 -> 0 bytes img/sprite-skin-modern.png | Bin 505 -> 0 bytes img/sprite-skin-nice.png | Bin 694 -> 0 bytes img/sprite-skin-simple.png | Bin 358 -> 0 bytes ion-rangeSlider.jquery.json | 37 - js/ion.rangeSlider.js | 1888 --------------------------- js/ion.rangeSlider.min.js | 68 - js/rangeslider.js | 1938 ++++++++++++++++++++++++++++ less/rangeslider.less | 163 +++ package.json | 61 - readme.ru.md | 479 ------- 22 files changed, 2115 insertions(+), 3692 deletions(-) delete mode 100644 .npmignore delete mode 100755 PSD/sprite-skin.psd delete mode 100644 css/ion.rangeSlider.css delete mode 100644 css/ion.rangeSlider.skinFlat.css delete mode 100644 css/ion.rangeSlider.skinHTML5.css delete mode 100644 css/ion.rangeSlider.skinModern.css delete mode 100644 css/ion.rangeSlider.skinNice.css delete mode 100644 css/ion.rangeSlider.skinSimple.css delete mode 100644 css/normalize.css delete mode 100644 img/sprite-skin-flat.png delete mode 100644 img/sprite-skin-modern.png delete mode 100644 img/sprite-skin-nice.png delete mode 100644 img/sprite-skin-simple.png delete mode 100644 ion-rangeSlider.jquery.json delete mode 100644 js/ion.rangeSlider.js delete mode 100644 js/ion.rangeSlider.min.js create mode 100644 js/rangeslider.js create mode 100644 less/rangeslider.less delete mode 100644 package.json delete mode 100644 readme.ru.md diff --git a/.gitignore b/.gitignore index 723ef36..7bf6eb1 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -.idea \ No newline at end of file +bower_components +node_modules diff --git a/.npmignore b/.npmignore deleted file mode 100644 index aa0f51e..0000000 --- a/.npmignore +++ /dev/null @@ -1,5 +0,0 @@ -.idea -PSD -bower.json -ion-rangeSlider.jquery.json -readme.ru.md \ No newline at end of file diff --git a/PSD/sprite-skin.psd b/PSD/sprite-skin.psd deleted file mode 100755 index 0b539392da51197d9a6bb50fffcafd5be25d4556..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 164259 zcmeD^31Cx2)0?D}-cT+PQ9|WZY0{=AXD^Nlh1wQG@k-OQjigCUQVM>bA4bLdL`4x1 z1-ww?^8%!mTLI}u1wmA(a)^LJp~&5)@1NOsCQaLvqJaNe*4PYf zMscdK&@}3Pn=$+Tu{nnOCmRy;B8CkO8a#F2)S}`dqeHKrT4c7^2TmOlq0h7C8V7YqBq>k1`#b~rqnke0X zsKkLWF$1+)HFre}4FcC-TVDRath5naao`&gQRr|K57cN%OG_h5b&*zEfhH<3F;Sz9 z)u@^SY)&~?2s0fS97VjQwC7AKHfpkrc58{vU>rULYI41|$`=<}9aejxwGq69U>1AYI4sQu zL-hxy+KhUK)s|zmnuoIOp2_E@PR))}_q)|($+MQ)`w!N5Mi;3s=44FMJB&ktJ9GoI zQ3Il*a-!k}>Y@hfqHok9k4Q3MV|wI~0i2kpcj)Rl;+|V*E1h$ zo+*EtPq~OOC3)l-2IgCBMS90jeQ~kbWY8n)X{K26IEE64I#?q{m87SPF)-a?cjzq! zV|v<907RNhc>@y?^m;=yP)DaT1T*Iw~q9Elr!I)y0oU8=eNYL_S+d(gxX%vzb7q z=*^NiSo4--?yiQs#NASwh& zfN5w48>ly6!woeclN<8}Yuun>wS<&hGE>8bYo5An-jbw^=U-ZAv^3R8*sN%*#xt>7 z^Btvnn=!cn_@KGI%jW2w#53!`8kDVO(_hd4cKwuAl0UjR=58hV;|J>EdFgU#$S-oO z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5!sM8G19Um3PAl;)Ant$~3X>q%g> zjxVd8sIaA_EXU&oEX1`l;8mr|2fTDFUQ9kVIF#hi)sWHyPTSNm?{JO2ho~NBm{Q*B zE6p#LczdwXPe_=54}pGD9RO5d{;$2O*J&6A!dKW@7*a+CB#*2ayZROS3VsETta$~$ zLJ(pnz!O*?R)nQWNOZFVMTnmy=FV|aH*~E~r7lgYe0Ry+ci-o3rC(2CPIzwH>SA?XB@gbLJUDE1Nd62s5KuP4|?B^CLWa{SylBzDNL zH@}AUDpWFuBPyNz5xvlPFH}~4<6b~KfhI)<8*_9og5@GupUMbTBI-JzUSL!-xe!ao z+FqgXWTM@!FuCbc9ZvD=5|qljD87{vB`qRE)NPjvsnIEdQtMyK2?Bk%7I6P>-0 llafrRKPMs7mkU+`ma8aqH$9u0%3WUSz^gZ}-F18W@C&mZwygjF diff --git a/bower.json b/bower.json index c509712..5124fc9 100644 --- a/bower.json +++ b/bower.json @@ -1,41 +1,26 @@ { - "name": "ion.rangeSlider", - "version": "2.0.6", - "homepage": "https://github.com/IonDen/ion.rangeSlider", - "authors": [ - { - "name": "IonDen", - "email": "denis.ineshin@gmail.com", - "homepage": "http://ionden.com" - } - ], - "description": "Powerful range slider with skin support", + "name": "rangeslider", + "description": "Powerful range slider", "repository": { "type": "git", - "url": "git://github.com/IonDen/ion.rangeSlider.git" + "url": "git://github.com/genkikondo/rangeslider.git" }, "main": [ - "js/ion.rangeSlider.js", - "css/ion.rangeSlider.css", - "css/ion.rangeSlider.skinFlat.css", - "img/sprite-skin-flat.png" + "js/rangeslider.js", + "less/rangeslider.less" ], "dependencies": { - "jquery": ">=1.8" + "jquery": "2.1.1", }, "moduleType": [ "globals" ], - "keywords": [ - "jquery-plugin", - "diapason", - "ion", - "range", - "slider" + "ignore": [ + "**/.*", + "node_modules", + "bower_components", + "test", + "tests" ], "license": "MIT", - "ignore": [ - "PSD", - "ion-rangeSlider.jquery.json" - ] } diff --git a/css/ion.rangeSlider.css b/css/ion.rangeSlider.css deleted file mode 100644 index dd56bef..0000000 --- a/css/ion.rangeSlider.css +++ /dev/null @@ -1,149 +0,0 @@ -/* Ion.RangeSlider -// css version 2.0.3 -// © 2013-2014 Denis Ineshin | IonDen.com -// ===================================================================================================================*/ - -/* ===================================================================================================================== -// RangeSlider */ - -.irs { - position: relative; display: block; - -webkit-touch-callout: none; - -webkit-user-select: none; - -khtml-user-select: none; - -moz-user-select: none; - -ms-user-select: none; - user-select: none; -} - .irs-line { - position: relative; display: block; - overflow: hidden; - outline: none !important; - } - .irs-line-left, .irs-line-mid, .irs-line-right { - position: absolute; display: block; - top: 0; - } - .irs-line-left { - left: 0; width: 11%; - } - .irs-line-mid { - left: 9%; width: 82%; - } - .irs-line-right { - right: 0; width: 11%; - } - - .irs-bar { - position: absolute; display: block; - left: 0; width: 0; - } - .irs-bar-edge { - position: absolute; display: block; - top: 0; left: 0; - } - - .irs-shadow { - position: absolute; display: none; - left: 0; width: 0; - } - - .irs-slider { - position: absolute; display: block; - cursor: default; - z-index: 1; - } - .irs-slider.single { - - } - .irs-slider.from { - - } - .irs-slider.to { - - } - .irs-slider.type_last { - z-index: 2; - } - - .irs-min { - position: absolute; display: block; - left: 0; - cursor: default; - } - .irs-max { - position: absolute; display: block; - right: 0; - cursor: default; - } - - .irs-from, .irs-to, .irs-single { - position: absolute; display: block; - top: 0; left: 0; - cursor: default; - white-space: nowrap; - } - -.irs-grid { - position: absolute; display: none; - bottom: 0; left: 0; - width: 100%; height: 20px; -} -.irs-with-grid .irs-grid { - display: block; -} - .irs-grid-pol { - position: absolute; - top: 0; left: 0; - width: 1px; height: 8px; - background: #000; - } - .irs-grid-pol.small { - height: 4px; - } - .irs-grid-text { - position: absolute; - bottom: 0; left: 0; - white-space: nowrap; - text-align: center; - font-size: 9px; line-height: 9px; - padding: 0 3px; - color: #000; - } - -.irs-disable-mask { - position: absolute; display: block; - top: 0; left: -1%; - width: 102%; height: 100%; - cursor: default; - background: rgba(0,0,0,0.0); - z-index: 2; -} -.lt-ie9 .irs-disable-mask { - background: #000; - filter: alpha(opacity=0); - cursor: not-allowed; -} - -.irs-disabled { - opacity: 0.4; -} - - -.irs-hidden-input { - position: absolute !important; - display: block !important; - top: 0 !important; - left: 0 !important; - width: 0 !important; - height: 0 !important; - font-size: 0 !important; - line-height: 0 !important; - padding: 0 !important; - margin: 0 !important; - outline: none !important; - z-index: -9999 !important; - background: none !important; - border-style: solid !important; - border-color: transparent !important; -} diff --git a/css/ion.rangeSlider.skinFlat.css b/css/ion.rangeSlider.skinFlat.css deleted file mode 100644 index 166314e..0000000 --- a/css/ion.rangeSlider.skinFlat.css +++ /dev/null @@ -1,106 +0,0 @@ -/* Ion.RangeSlider, Flat UI Skin -// css version 2.0.3 -// © Denis Ineshin, 2014 https://github.com/IonDen -// ===================================================================================================================*/ - -/* ===================================================================================================================== -// Skin details */ - -.irs-line-mid, -.irs-line-left, -.irs-line-right, -.irs-bar, -.irs-bar-edge, -.irs-slider { - background: url(../img/sprite-skin-flat.png) repeat-x; -} - -.irs { - height: 40px; -} -.irs-with-grid { - height: 60px; -} -.irs-line { - height: 12px; top: 25px; -} - .irs-line-left { - height: 12px; - background-position: 0 -30px; - } - .irs-line-mid { - height: 12px; - background-position: 0 0; - } - .irs-line-right { - height: 12px; - background-position: 100% -30px; - } - -.irs-bar { - height: 12px; top: 25px; - background-position: 0 -60px; -} - .irs-bar-edge { - top: 25px; - height: 12px; width: 9px; - background-position: 0 -90px; - } - -.irs-shadow { - height: 3px; top: 34px; - background: #000; - opacity: 0.25; -} -.lt-ie9 .irs-shadow { - filter: alpha(opacity=25); -} - -.irs-slider { - width: 16px; height: 18px; - top: 22px; - background-position: 0 -120px; -} -.irs-slider.state_hover, .irs-slider:hover { - background-position: 0 -150px; -} - -.irs-min, .irs-max { - color: #999; - font-size: 10px; line-height: 1.333; - text-shadow: none; - top: 0; padding: 1px 3px; - background: #e1e4e9; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.irs-from, .irs-to, .irs-single { - color: #fff; - font-size: 10px; line-height: 1.333; - text-shadow: none; - padding: 1px 5px; - background: #ed5565; - -moz-border-radius: 4px; - border-radius: 4px; -} -.irs-from:after, .irs-to:after, .irs-single:after { - position: absolute; display: block; content: ""; - bottom: -6px; left: 50%; - width: 0; height: 0; - margin-left: -3px; - overflow: hidden; - border: 3px solid transparent; - border-top-color: #ed5565; -} - - -.irs-grid-pol { - background: #e1e4e9; -} -.irs-grid-text { - color: #999; -} - -.irs-disabled { -} diff --git a/css/ion.rangeSlider.skinHTML5.css b/css/ion.rangeSlider.skinHTML5.css deleted file mode 100644 index 740d429..0000000 --- a/css/ion.rangeSlider.skinHTML5.css +++ /dev/null @@ -1,124 +0,0 @@ -/* Ion.RangeSlider, Simple Skin -// css version 2.0.3 -// © Denis Ineshin, 2014 https://github.com/IonDen -// © guybowden, 2014 https://github.com/guybowden -// ===================================================================================================================*/ - -/* ===================================================================================================================== -// Skin details */ - -.irs { - height: 55px; -} -.irs-with-grid { - height: 75px; -} -.irs-line { - height: 10px; top: 33px; - background: #EEE; - background: linear-gradient(to bottom, #DDD -50%, #FFF 150%); /* W3C */ - border: 1px solid #CCC; - border-radius: 16px; - -moz-border-radius: 16px; -} - .irs-line-left { - height: 8px; - } - .irs-line-mid { - height: 8px; - } - .irs-line-right { - height: 8px; - } - -.irs-bar { - height: 10px; top: 33px; - border-top: 1px solid #428bca; - border-bottom: 1px solid #428bca; - background: #428bca; - background: linear-gradient(to top, rgba(66,139,202,1) 0%,rgba(127,195,232,1) 100%); /* W3C */ -} - .irs-bar-edge { - height: 10px; top: 33px; - width: 14px; - border: 1px solid #428bca; - border-right: 0; - background: #428bca; - background: linear-gradient(to top, rgba(66,139,202,1) 0%,rgba(127,195,232,1) 100%); /* W3C */ - border-radius: 16px 0 0 16px; - -moz-border-radius: 16px 0 0 16px; - } - -.irs-shadow { - height: 2px; top: 38px; - background: #000; - opacity: 0.3; - border-radius: 5px; - -moz-border-radius: 5px; -} -.lt-ie9 .irs-shadow { - filter: alpha(opacity=30); -} - -.irs-slider { - top: 25px; - width: 27px; height: 27px; - border: 1px solid #AAA; - background: #DDD; - background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(220,220,220,1) 20%,rgba(255,255,255,1) 100%); /* W3C */ - border-radius: 27px; - -moz-border-radius: 27px; - box-shadow: 1px 1px 3px rgba(0,0,0,0.3); - cursor: pointer; -} - -.irs-slider.state_hover, .irs-slider:hover { - background: #FFF; -} - -.irs-min, .irs-max { - color: #333; - font-size: 12px; line-height: 1.333; - text-shadow: none; - top: 0; - padding: 1px 5px; - background: rgba(0,0,0,0.1); - border-radius: 3px; - -moz-border-radius: 3px; -} - -.lt-ie9 .irs-min, .lt-ie9 .irs-max { - background: #ccc; -} - -.irs-from, .irs-to, .irs-single { - color: #fff; - font-size: 14px; line-height: 1.333; - text-shadow: none; - padding: 1px 5px; - background: #428bca; - border-radius: 3px; - -moz-border-radius: 3px; -} -.lt-ie9 .irs-from, .lt-ie9 .irs-to, .lt-ie9 .irs-single { - background: #999; -} - -.irs-grid { - height: 27px; -} -.irs-grid-pol { - opacity: 0.5; - background: #428bca; -} -.irs-grid-pol.small { - background: #999; -} - -.irs-grid-text { - bottom: 5px; - color: #99a4ac; -} - -.irs-disabled { -} diff --git a/css/ion.rangeSlider.skinModern.css b/css/ion.rangeSlider.skinModern.css deleted file mode 100644 index 13009c1..0000000 --- a/css/ion.rangeSlider.skinModern.css +++ /dev/null @@ -1,116 +0,0 @@ -/* Ion.RangeSlider, Modern Skin -// css version 2.0.3 -// © Denis Ineshin, 2014 https://github.com/IonDen -// ===================================================================================================================*/ - -/* ===================================================================================================================== -// Skin details */ - -.irs-line-mid, -.irs-line-left, -.irs-line-right, -.irs-bar, -.irs-bar-edge, -.irs-slider { - background: url(../img/sprite-skin-modern.png) repeat-x; -} - -.irs { - height: 50px; -} -.irs-with-grid { - height: 70px; -} -.irs-line { - height: 6px; top: 25px; -} - .irs-line-left { - height: 6px; - background-position: 0 -30px; - } - .irs-line-mid { - height: 6px; - background-position: 0 0; - } - .irs-line-right { - height: 6px; - background-position: 100% -30px; - } - -.irs-bar { - height: 6px; top: 25px; - background-position: 0 -60px; -} - .irs-bar-edge { - top: 25px; - height: 6px; width: 6px; - background-position: 0 -90px; - } - -.irs-shadow { - height: 5px; top: 25px; - background: #000; - opacity: 0.25; -} -.lt-ie9 .irs-shadow { - filter: alpha(opacity=25); -} - -.irs-slider { - width: 11px; height: 18px; - top: 31px; - background-position: 0 -120px; -} -.irs-slider.state_hover, .irs-slider:hover { - background-position: 0 -150px; -} - -.irs-min, .irs-max { - color: #999; - font-size: 10px; line-height: 1.333; - text-shadow: none; - top: 0; padding: 1px 3px; - background: #e1e4e9; - -moz-border-radius: 4px; - border-radius: 4px; -} - -.irs-from, .irs-to, .irs-single { - color: #fff; - font-size: 10px; line-height: 1.333; - text-shadow: none; - padding: 1px 5px; - background: #20b426; - -moz-border-radius: 4px; - border-radius: 4px; -} -.irs-from:after, .irs-to:after, .irs-single:after { - position: absolute; display: block; content: ""; - bottom: -6px; left: 50%; - width: 0; height: 0; - margin-left: -3px; - overflow: hidden; - border: 3px solid transparent; - border-top-color: #20b426; -} - -.irs-grid { - height: 34px; -} -.irs-grid-pol { - background: #c0c0c0; -} -.irs-grid-text { - bottom: 12px; - color: #c0c0c0; -} - -.irs-disable-mask { - -} -.irs-disabled { - -} -.lt-ie9 .irs-disabled { - -} diff --git a/css/ion.rangeSlider.skinNice.css b/css/ion.rangeSlider.skinNice.css deleted file mode 100644 index 57b20d1..0000000 --- a/css/ion.rangeSlider.skinNice.css +++ /dev/null @@ -1,102 +0,0 @@ -/* Ion.RangeSlider, Nice Skin -// css version 2.0.3 -// © Denis Ineshin, 2014 https://github.com/IonDen -// ===================================================================================================================*/ - -/* ===================================================================================================================== -// Skin details */ - -.irs-line-mid, -.irs-line-left, -.irs-line-right, -.irs-bar, -.irs-bar-edge, -.irs-slider { - background: url(../img/sprite-skin-nice.png) repeat-x; -} - -.irs { - height: 40px; -} -.irs-with-grid { - height: 60px; -} -.irs-line { - height: 8px; top: 25px; -} - .irs-line-left { - height: 8px; - background-position: 0 -30px; - } - .irs-line-mid { - height: 8px; - background-position: 0 0; - } - .irs-line-right { - height: 8px; - background-position: 100% -30px; - } - -.irs-bar { - height: 8px; top: 25px; - background-position: 0 -60px; -} - .irs-bar-edge { - top: 25px; - height: 8px; width: 11px; - background-position: 0 -90px; - } - -.irs-shadow { - height: 1px; top: 34px; - background: #000; - opacity: 0.15; -} -.lt-ie9 .irs-shadow { - filter: alpha(opacity=15); -} - -.irs-slider { - width: 22px; height: 22px; - top: 17px; - background-position: 0 -120px; -} -.irs-slider.state_hover, .irs-slider:hover { - background-position: 0 -150px; -} - -.irs-min, .irs-max { - color: #999; - font-size: 10px; line-height: 1.333; - text-shadow: none; - top: 0; padding: 1px 3px; - background: rgba(0,0,0,0.1); - -moz-border-radius: 3px; - border-radius: 3px; -} -.lt-ie9 .irs-min, .lt-ie9 .irs-max { - background: #ccc; -} - -.irs-from, .irs-to, .irs-single { - color: #fff; - font-size: 10px; line-height: 1.333; - text-shadow: none; - padding: 1px 5px; - background: rgba(0,0,0,0.3); - -moz-border-radius: 3px; - border-radius: 3px; -} -.lt-ie9 .irs-from, .lt-ie9 .irs-to, .lt-ie9 .irs-single { - background: #999; -} - -.irs-grid-pol { - background: #99a4ac; -} -.irs-grid-text { - color: #99a4ac; -} - -.irs-disabled { -} diff --git a/css/ion.rangeSlider.skinSimple.css b/css/ion.rangeSlider.skinSimple.css deleted file mode 100644 index 34fc7e2..0000000 --- a/css/ion.rangeSlider.skinSimple.css +++ /dev/null @@ -1,102 +0,0 @@ -/* Ion.RangeSlider, Simple Skin -// css version 2.0.3 -// © Denis Ineshin, 2014 https://github.com/IonDen -// ===================================================================================================================*/ - -/* ===================================================================================================================== -// Skin details */ - -.irs-line-mid, -.irs-line-left, -.irs-line-right, -.irs-bar, -.irs-bar-edge, -.irs-slider { - background: url(../img/sprite-skin-simple.png) repeat-x; -} - -.irs { - height: 40px; -} -.irs-with-grid { - height: 60px; -} -.irs-line { - height: 6px; top: 25px; -} - .irs-line-left { - height: 6px; - background-position: 0 -30px; - } - .irs-line-mid { - height: 6px; - background-position: 0 0; - } - .irs-line-right { - height: 6px; - background-position: 100% -30px; - } - -.irs-bar { - height: 6px; top: 25px; - background-position: 0 -60px; -} - .irs-bar-edge { - top: 25px; - height: 6px; width: 7px; - background-position: 0 -90px; - } - -.irs-shadow { - height: 1px; top: 34px; - background: #000; - opacity: 0.75; -} -.lt-ie9 .irs-shadow { - filter: alpha(opacity=75); -} - -.irs-slider { - width: 8px; height: 15px; - top: 21px; - background-position: 0 -120px; -} -.irs-slider.state_hover, .irs-slider:hover { - background-position: 0 -150px; -} - -.irs-min, .irs-max { - color: #c0c0c0; - font-size: 10px; line-height: 1.333; - text-shadow: none; - top: 0; padding: 1px 3px; - background: rgba(0,0,0,0.1); - -moz-border-radius: 3px; - border-radius: 3px; -} -.lt-ie9 .irs-min, .lt-ie9 .irs-max { - background: #3654b0; -} - -.irs-from, .irs-to, .irs-single { - color: #000; - font-size: 10px; line-height: 1.333; - text-shadow: none; - padding: 1px 5px; - background: rgba(255,255,255,0.8); - -moz-border-radius: 3px; - border-radius: 3px; -} -.lt-ie9 .irs-from, .lt-ie9 .irs-to, .lt-ie9 .irs-single { - background: #d8dff3; -} - -.irs-grid-pol { - background: #777; -} -.irs-grid-text { - color: #e0e0e0; -} - -.irs-disabled { -} diff --git a/css/normalize.css b/css/normalize.css deleted file mode 100644 index 46f646a..0000000 --- a/css/normalize.css +++ /dev/null @@ -1,427 +0,0 @@ -/*! normalize.css v3.0.2 | MIT License | git.io/normalize */ - -/** - * 1. Set default font family to sans-serif. - * 2. Prevent iOS text size adjust after orientation change, without disabling - * user zoom. - */ - -html { - font-family: sans-serif; /* 1 */ - -ms-text-size-adjust: 100%; /* 2 */ - -webkit-text-size-adjust: 100%; /* 2 */ -} - -/** - * Remove default margin. - */ - -body { - margin: 0; -} - -/* HTML5 display definitions - ========================================================================== */ - -/** - * Correct `block` display not defined for any HTML5 element in IE 8/9. - * Correct `block` display not defined for `details` or `summary` in IE 10/11 - * and Firefox. - * Correct `block` display not defined for `main` in IE 11. - */ - -article, -aside, -details, -figcaption, -figure, -footer, -header, -hgroup, -main, -menu, -nav, -section, -summary { - display: block; -} - -/** - * 1. Correct `inline-block` display not defined in IE 8/9. - * 2. Normalize vertical alignment of `progress` in Chrome, Firefox, and Opera. - */ - -audio, -canvas, -progress, -video { - display: inline-block; /* 1 */ - vertical-align: baseline; /* 2 */ -} - -/** - * Prevent modern browsers from displaying `audio` without controls. - * Remove excess height in iOS 5 devices. - */ - -audio:not([controls]) { - display: none; - height: 0; -} - -/** - * Address `[hidden]` styling not present in IE 8/9/10. - * Hide the `template` element in IE 8/9/11, Safari, and Firefox < 22. - */ - -[hidden], -template { - display: none; -} - -/* Links - ========================================================================== */ - -/** - * Remove the gray background color from active links in IE 10. - */ - -a { - background-color: transparent; -} - -/** - * Improve readability when focused and also mouse hovered in all browsers. - */ - -a:active, -a:hover { - outline: 0; -} - -/* Text-level semantics - ========================================================================== */ - -/** - * Address styling not present in IE 8/9/10/11, Safari, and Chrome. - */ - -abbr[title] { - border-bottom: 1px dotted; -} - -/** - * Address style set to `bolder` in Firefox 4+, Safari, and Chrome. - */ - -b, -strong { - font-weight: bold; -} - -/** - * Address styling not present in Safari and Chrome. - */ - -dfn { - font-style: italic; -} - -/** - * Address variable `h1` font-size and margin within `section` and `article` - * contexts in Firefox 4+, Safari, and Chrome. - */ - -h1 { - font-size: 2em; - margin: 0.67em 0; -} - -/** - * Address styling not present in IE 8/9. - */ - -mark { - background: #ff0; - color: #000; -} - -/** - * Address inconsistent and variable font size in all browsers. - */ - -small { - font-size: 80%; -} - -/** - * Prevent `sub` and `sup` affecting `line-height` in all browsers. - */ - -sub, -sup { - font-size: 75%; - line-height: 0; - position: relative; - vertical-align: baseline; -} - -sup { - top: -0.5em; -} - -sub { - bottom: -0.25em; -} - -/* Embedded content - ========================================================================== */ - -/** - * Remove border when inside `a` element in IE 8/9/10. - */ - -img { - border: 0; -} - -/** - * Correct overflow not hidden in IE 9/10/11. - */ - -svg:not(:root) { - overflow: hidden; -} - -/* Grouping content - ========================================================================== */ - -/** - * Address margin not present in IE 8/9 and Safari. - */ - -figure { - margin: 1em 40px; -} - -/** - * Address differences between Firefox and other browsers. - */ - -hr { - -moz-box-sizing: content-box; - box-sizing: content-box; - height: 0; -} - -/** - * Contain overflow in all browsers. - */ - -pre { - overflow: auto; -} - -/** - * Address odd `em`-unit font size rendering in all browsers. - */ - -code, -kbd, -pre, -samp { - font-family: monospace, monospace; - font-size: 1em; -} - -/* Forms - ========================================================================== */ - -/** - * Known limitation: by default, Chrome and Safari on OS X allow very limited - * styling of `select`, unless a `border` property is set. - */ - -/** - * 1. Correct color not being inherited. - * Known issue: affects color of disabled elements. - * 2. Correct font properties not being inherited. - * 3. Address margins set differently in Firefox 4+, Safari, and Chrome. - */ - -button, -input, -optgroup, -select, -textarea { - color: inherit; /* 1 */ - font: inherit; /* 2 */ - margin: 0; /* 3 */ -} - -/** - * Address `overflow` set to `hidden` in IE 8/9/10/11. - */ - -button { - overflow: visible; -} - -/** - * Address inconsistent `text-transform` inheritance for `button` and `select`. - * All other form control elements do not inherit `text-transform` values. - * Correct `button` style inheritance in Firefox, IE 8/9/10/11, and Opera. - * Correct `select` style inheritance in Firefox. - */ - -button, -select { - text-transform: none; -} - -/** - * 1. Avoid the WebKit bug in Android 4.0.* where (2) destroys native `audio` - * and `video` controls. - * 2. Correct inability to style clickable `input` types in iOS. - * 3. Improve usability and consistency of cursor style between image-type - * `input` and others. - */ - -button, -html input[type="button"], /* 1 */ -input[type="reset"], -input[type="submit"] { - -webkit-appearance: button; /* 2 */ - cursor: pointer; /* 3 */ -} - -/** - * Re-set default cursor for disabled elements. - */ - -button[disabled], -html input[disabled] { - cursor: default; -} - -/** - * Remove inner padding and border in Firefox 4+. - */ - -button::-moz-focus-inner, -input::-moz-focus-inner { - border: 0; - padding: 0; -} - -/** - * Address Firefox 4+ setting `line-height` on `input` using `!important` in - * the UA stylesheet. - */ - -input { - line-height: normal; -} - -/** - * It's recommended that you don't attempt to style these elements. - * Firefox's implementation doesn't respect box-sizing, padding, or width. - * - * 1. Address box sizing set to `content-box` in IE 8/9/10. - * 2. Remove excess padding in IE 8/9/10. - */ - -input[type="checkbox"], -input[type="radio"] { - box-sizing: border-box; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Fix the cursor style for Chrome's increment/decrement buttons. For certain - * `font-size` values of the `input`, it causes the cursor style of the - * decrement button to change from `default` to `text`. - */ - -input[type="number"]::-webkit-inner-spin-button, -input[type="number"]::-webkit-outer-spin-button { - height: auto; -} - -/** - * 1. Address `appearance` set to `searchfield` in Safari and Chrome. - * 2. Address `box-sizing` set to `border-box` in Safari and Chrome - * (include `-moz` to future-proof). - */ - -input[type="search"] { - -webkit-appearance: textfield; /* 1 */ - -moz-box-sizing: content-box; - -webkit-box-sizing: content-box; /* 2 */ - box-sizing: content-box; -} - -/** - * Remove inner padding and search cancel button in Safari and Chrome on OS X. - * Safari (but not Chrome) clips the cancel button when the search input has - * padding (and `textfield` appearance). - */ - -input[type="search"]::-webkit-search-cancel-button, -input[type="search"]::-webkit-search-decoration { - -webkit-appearance: none; -} - -/** - * Define consistent border, margin, and padding. - */ - -fieldset { - border: 1px solid #c0c0c0; - margin: 0 2px; - padding: 0.35em 0.625em 0.75em; -} - -/** - * 1. Correct `color` not being inherited in IE 8/9/10/11. - * 2. Remove padding so people aren't caught out if they zero out fieldsets. - */ - -legend { - border: 0; /* 1 */ - padding: 0; /* 2 */ -} - -/** - * Remove default vertical scrollbar in IE 8/9/10/11. - */ - -textarea { - overflow: auto; -} - -/** - * Don't inherit the `font-weight` (applied by a rule above). - * NOTE: the default cannot safely be changed in Chrome and Safari on OS X. - */ - -optgroup { - font-weight: bold; -} - -/* Tables - ========================================================================== */ - -/** - * Remove most spacing between table cells. - */ - -table { - border-collapse: collapse; - border-spacing: 0; -} - -td, -th { - padding: 0; -} diff --git a/img/sprite-skin-flat.png b/img/sprite-skin-flat.png deleted file mode 100644 index 0f11c7cb5dfa4ad54ac603fd2fc6afadea63efa3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 304 zcmeAS@N?(olHy`uVBq!ia0y~yU}OQZx3Dk+$%fhfKY)~UfKP}kkbd~&<1;B28oYe>W)n;oI`zYCXKPqETZOo4PBATCd7zPvA>qQao15O+Dl{7F68_KdWFH$)z4*}Q$iB}OjLBA diff --git a/img/sprite-skin-modern.png b/img/sprite-skin-modern.png deleted file mode 100644 index c9060f2756791db4fcfebaa02bf1ca6b55ea7b5c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 505 zcmeAS@N?(olHy`uVBq!ia0y~yU}OQZw{S26N!RQ}KY^5efKP}kkbeF4!|8KZ4jewE zutn{{)&t1GKBslo~gD1;ZZ#p(z z@*vO%&XOR%UgJ#RdWmfsBPlU3IxN|2Okl z%v*U%k30S9`_hAq`-Gw{tPBcP>sDyu_`lT26KEO`tS`E0mz5!ZTQyht__jXXwU&Dn zoz7)z6`$YuRyEeEVmin(3=AK%=GSxq^(obKgZT^xxc^pGZ=YScd4bo3XgDmXZa&C;#!PXXKZ5R^|-!BiE#{LB!T6-}Z;+jJ(cfKP}kkbVgR=gyzMa^=c} z3m49V0YrG$!DA5arX71`FI(F?eIAh8Gi~mQ^;>5yS@Zw@e;{}2f)#x;=Kp75`SSJa zojZ5_{Q2|t?c3|uug_n(@&C=6|AT@i&s%Dl)WQn1Or#{pFPLHfrBgqeVsFnma`2a% zGwbhn`zP+xl6dwE=*kzKE{-7;x8B|kEM8h&6`r!?w)(| z=C@_G?~9-6-k0#3lrP}oF7vdZIb;P#qX0*uT3V90a(3*z+48#Q=hjw784CjK1cMK% zr~bZMaWgNz>rMal*N&TCXKU_$z3@`*>|+92Pq(>!yXAaC%t)Z4ZdrZyivoot7|ah}EXME8(c-|-@}c9UKxd`Fw{6DRYm0w=|6gKd*HrxN z<;6KOKdv=_Du0lj;`!I`qGERQ{~0ePu=sOqRcHCfY2H@ulrn=aFing*{oeyI?q5+* z%~q#Q(g~Nos9l};`$6rC+tYofc=;c^-x{o?wKVs6dhBYW);CvvvfuT5+_j>) zUj4<(Md`E4s=g#ibZPd5-S3I`YWJ#LOKRDD?TcxWH6bC354k65-ctFOw!*D>zo*OW zCCV-Pb=v*z7d<#Cv39xO&HHXC_Pr;zt~i|5nQP3h(Rayz)2_GH_gnX^4PDo|`)kSG zWd(X5$8EW^<&w_vM&#yP{tf8(V4X#xIk4cd18jRrJeeewm81 zOIki`kqOy;=~R5r>*Io++G{H|AK5mOS;Rdv3J8IQ{aGEax%~0%^L+sYAhSJP{an^L HB{Ts52LD$c diff --git a/img/sprite-skin-simple.png b/img/sprite-skin-simple.png deleted file mode 100644 index 0dc5e68ed807c752c81445f37409790dd71ecfae..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 358 zcmeAS@N?(olHy`uVBq!ia0y~yU}OQZx3Dk+$%fhfKY)~0fKP}kkoKB4SF^13UXKBv zfrFrxx2S8hxO?KXT$f)fyp#9r30S_=Va9T^zU33DHGF`o8B2ovf*Bm1-ADs+UU|AW zhE&{od&5xZV1P*L!_BP5S|M%=w==Z`waac`jo!ezG;EQFc348tDxXc_TQYrC6;J-T zU-Zx2>gQQG%a_jGR%UhMWybP(bAe_tELg~Kx@wb2bjGGzQMqDOZ~4N0Z~e7<@zuI> zo7jNT7u=Gq=e{-B+&!USQ*tE89~p~(oiUwpEp6SwE!zzLzfN(=eI{j4%m|d(a^b6Y zoaemzS2;NC=lYy5DnGQeg6GN9zOLnaE;X@e>Ym=dCok01silQMUzLG@L+?Pn;(_&@ zEgHdXEfSpK|2vgWw*O=KzqS*|V~q1+U=X;?KEL|E`m9XW>p;^PJYD@<);T3K0RX|3 BjfnsN diff --git a/ion-rangeSlider.jquery.json b/ion-rangeSlider.jquery.json deleted file mode 100644 index 72567fc..0000000 --- a/ion-rangeSlider.jquery.json +++ /dev/null @@ -1,37 +0,0 @@ -{ - "name": "ion-rangeSlider", - "version": "2.0.6", - "title": "Ion.RangeSlider", - "description": "Cool, comfortable and easily customizable range slider with many options and skin support", - "keywords": [ - "jquery", - "form", - "input", - "range", - "slider", - "rangeslider", - "interface", - "diapason", - "ui", - "noui", - "skins" - ], - "author": { - "name": "IonDen", - "url": "https://github.com/IonDen", - "email": "denis.ineshin@gmail.com" - }, - "licenses": [ - { - "type": "MIT", - "url": "http://ionden.com/a/plugins/licence-en.html" - } - ], - "homepage": "https://github.com/IonDen/ion.rangeSlider", - "docs": "https://github.com/IonDen/ion.rangeSlider/blob/master/readme.md", - "demo": "http://ionden.com/a/plugins/ion.rangeSlider/en.html", - "download": "http://ionden.com/a/plugins/ion.rangeSlider/ion.rangeSlider-2.0.6.zip", - "dependencies": { - "jquery": ">=1.8" - } -} \ No newline at end of file diff --git a/js/ion.rangeSlider.js b/js/ion.rangeSlider.js deleted file mode 100644 index c52ac92..0000000 --- a/js/ion.rangeSlider.js +++ /dev/null @@ -1,1888 +0,0 @@ -// Ion.RangeSlider -// version 2.0.6 Build: 300 -// © Denis Ineshin, 2015 -// https://github.com/IonDen -// -// Project page: http://ionden.com/a/plugins/ion.rangeSlider/en.html -// GitHub page: https://github.com/IonDen/ion.rangeSlider -// -// Released under MIT licence: -// http://ionden.com/a/plugins/licence-en.html -// ===================================================================================================================== - -;(function ($, document, window, navigator, undefined) { - "use strict"; - - // ================================================================================================================= - // Service - - var plugin_count = 0; - - var is_old_ie = (function () { - var n = navigator.userAgent, - r = /msie\s\d+/i, - v; - if (n.search(r) > 0) { - v = r.exec(n).toString(); - v = v.split(" ")[1]; - if (v < 9) { - $("html").addClass("lt-ie9"); - return true; - } - } - return false; - } ()); - - // IE8 fix - if (!Function.prototype.bind) { - Function.prototype.bind = function bind(that) { - - var target = this; - var slice = [].slice; - - if (typeof target != "function") { - throw new TypeError(); - } - - var args = slice.call(arguments, 1), - bound = function () { - - if (this instanceof bound) { - - var F = function(){}; - F.prototype = target.prototype; - var self = new F(); - - var result = target.apply( - self, - args.concat(slice.call(arguments)) - ); - if (Object(result) === result) { - return result; - } - return self; - - } else { - - return target.apply( - that, - args.concat(slice.call(arguments)) - ); - - } - - }; - - return bound; - }; - } - if (!Array.prototype.indexOf) { - Array.prototype.indexOf = function(searchElement, fromIndex) { - var k; - if (this == null) { - throw new TypeError('"this" is null or not defined'); - } - var O = Object(this); - var len = O.length >>> 0; - if (len === 0) { - return -1; - } - var n = +fromIndex || 0; - if (Math.abs(n) === Infinity) { - n = 0; - } - if (n >= len) { - return -1; - } - k = Math.max(n >= 0 ? n : len - Math.abs(n), 0); - while (k < len) { - if (k in O && O[k] === searchElement) { - return k; - } - k++; - } - return -1; - }; - } - - - - // ================================================================================================================= - // Template - - var base_html = - '' + - '' + - '01' + - '000' + - '' + - '' + - ''; - - var single_html = - '' + - '' + - ''; - - var double_html = - '' + - '' + - '' + - ''; - - var disable_html = - ''; - - - - // ================================================================================================================= - // Core - - var IonRangeSlider = function (input, options, plugin_count) { - this.VERSION = "2.0.6"; - this.input = input; - this.plugin_count = plugin_count; - this.current_plugin = 0; - this.calc_count = 0; - this.old_from = 0; - this.old_to = 0; - this.raf_id = null; - this.dragging = false; - this.force_redraw = false; - this.is_key = false; - this.is_update = false; - this.is_start = true; - this.is_active = false; - this.is_resize = false; - this.is_click = false; - - this.$cache = { - win: $(window), - body: $(document.body), - input: $(input), - cont: null, - rs: null, - min: null, - max: null, - from: null, - to: null, - single: null, - bar: null, - line: null, - s_single: null, - s_from: null, - s_to: null, - shad_single: null, - shad_from: null, - shad_to: null, - grid: null, - grid_labels: [] - }; - - // get config data attributes - var $inp = this.$cache.input; - var data = { - type: $inp.data("type"), - - min: $inp.data("min"), - max: $inp.data("max"), - from: $inp.data("from"), - to: $inp.data("to"), - step: $inp.data("step"), - - min_interval: $inp.data("minInterval"), - max_interval: $inp.data("maxInterval"), - drag_interval: $inp.data("dragInterval"), - - values: $inp.data("values"), - - from_fixed: $inp.data("fromFixed"), - from_min: $inp.data("fromMin"), - from_max: $inp.data("fromMax"), - from_shadow: $inp.data("fromShadow"), - - to_fixed: $inp.data("toFixed"), - to_min: $inp.data("toMin"), - to_max: $inp.data("toMax"), - to_shadow: $inp.data("toShadow"), - - prettify_enabled: $inp.data("prettifyEnabled"), - prettify_separator: $inp.data("prettifySeparator"), - - force_edges: $inp.data("forceEdges"), - - keyboard: $inp.data("keyboard"), - keyboard_step: $inp.data("keyboardStep"), - - grid: $inp.data("grid"), - grid_margin: $inp.data("gridMargin"), - grid_num: $inp.data("gridNum"), - grid_snap: $inp.data("gridSnap"), - - hide_min_max: $inp.data("hideMinMax"), - hide_from_to: $inp.data("hideFromTo"), - - prefix: $inp.data("prefix"), - postfix: $inp.data("postfix"), - max_postfix: $inp.data("maxPostfix"), - decorate_both: $inp.data("decorateBoth"), - values_separator: $inp.data("valuesSeparator"), - - disable: $inp.data("disable") - }; - data.values = data.values && data.values.split(","); - options = $.extend(data, options); - - // get from and to out of input - var val = $inp.prop("value"); - if (val) { - val = val.split(";"); - - if (val[0] && val[0] == +val[0]) { - val[0] = +val[0]; - } - if (val[1] && val[1] == +val[1]) { - val[1] = +val[1]; - } - - if (options.values && options.values.length) { - data.from = val[0] && options.values.indexOf(val[0]); - data.to = val[1] && options.values.indexOf(val[1]); - } else { - data.from = val[0] && +val[0]; - data.to = val[1] && +val[1]; - } - } - - // get config from options - this.options = $.extend({ - type: "single", - - min: 10, - max: 100, - from: null, - to: null, - step: 1, - - min_interval: 0, - max_interval: 0, - drag_interval: false, - - values: [], - p_values: [], - - from_fixed: false, - from_min: null, - from_max: null, - from_shadow: false, - - to_fixed: false, - to_min: null, - to_max: null, - to_shadow: false, - - prettify_enabled: true, - prettify_separator: " ", - prettify: null, - - force_edges: false, - - keyboard: false, - keyboard_step: 5, - - grid: false, - grid_margin: true, - grid_num: 4, - grid_snap: false, - - hide_min_max: false, - hide_from_to: false, - - prefix: "", - postfix: "", - max_postfix: "", - decorate_both: true, - values_separator: " — ", - - disable: false, - - onStart: null, - onChange: null, - onFinish: null, - onUpdate: null - }, options); - - this.validate(); - - this.result = { - input: this.$cache.input, - slider: null, - - min: this.options.min, - max: this.options.max, - - from: this.options.from, - from_percent: 0, - from_value: null, - - to: this.options.to, - to_percent: 0, - to_value: null - }; - - this.coords = { - // left - x_gap: 0, - x_pointer: 0, - - // width - w_rs: 0, - w_rs_old: 0, - w_handle: 0, - - // percents - p_gap: 0, - p_gap_left: 0, - p_gap_right: 0, - p_step: 0, - p_pointer: 0, - p_handle: 0, - p_single: 0, - p_single_real: 0, - p_from: 0, - p_from_real: 0, - p_to: 0, - p_to_real: 0, - p_bar_x: 0, - p_bar_w: 0, - - // grid - grid_gap: 0, - big_num: 0, - big: [], - big_w: [], - big_p: [], - big_x: [] - }; - - this.labels = { - // width - w_min: 0, - w_max: 0, - w_from: 0, - w_to: 0, - w_single: 0, - - // percents - p_min: 0, - p_max: 0, - p_from: 0, - p_from_left: 0, - p_to: 0, - p_to_left: 0, - p_single: 0, - p_single_left: 0 - }; - - this.init(); - }; - - IonRangeSlider.prototype = { - init: function (is_update) { - this.coords.p_step = this.options.step / ((this.options.max - this.options.min) / 100); - this.target = "base"; - - this.toggleInput(); - this.append(); - this.setMinMax(); - - if (is_update) { - this.force_redraw = true; - this.calc(true); - - if (this.options.onUpdate && typeof this.options.onUpdate === "function") { - this.options.onUpdate(this.result); - } - } else { - this.force_redraw = true; - this.calc(true); - - if (this.options.onStart && typeof this.options.onStart === "function") { - this.options.onStart(this.result); - } - } - - this.updateScene(); - this.raf_id = requestAnimationFrame(this.updateScene.bind(this)); - }, - - append: function () { - var container_html = ''; - this.$cache.input.before(container_html); - this.$cache.input.prop("readonly", true); - this.$cache.cont = this.$cache.input.prev(); - this.result.slider = this.$cache.cont; - - this.$cache.cont.html(base_html); - this.$cache.rs = this.$cache.cont.find(".irs"); - this.$cache.min = this.$cache.cont.find(".irs-min"); - this.$cache.max = this.$cache.cont.find(".irs-max"); - this.$cache.from = this.$cache.cont.find(".irs-from"); - this.$cache.to = this.$cache.cont.find(".irs-to"); - this.$cache.single = this.$cache.cont.find(".irs-single"); - this.$cache.bar = this.$cache.cont.find(".irs-bar"); - this.$cache.line = this.$cache.cont.find(".irs-line"); - this.$cache.grid = this.$cache.cont.find(".irs-grid"); - - if (this.options.type === "single") { - this.$cache.cont.append(single_html); - this.$cache.s_single = this.$cache.cont.find(".single"); - this.$cache.from[0].style.visibility = "hidden"; - this.$cache.to[0].style.visibility = "hidden"; - this.$cache.shad_single = this.$cache.cont.find(".shadow-single"); - } else { - this.$cache.cont.append(double_html); - this.$cache.s_from = this.$cache.cont.find(".from"); - this.$cache.s_to = this.$cache.cont.find(".to"); - this.$cache.shad_from = this.$cache.cont.find(".shadow-from"); - this.$cache.shad_to = this.$cache.cont.find(".shadow-to"); - } - - if (this.options.hide_from_to) { - this.$cache.from[0].style.display = "none"; - this.$cache.to[0].style.display = "none"; - this.$cache.single[0].style.display = "none"; - } - - this.appendGrid(); - - if (this.options.disable) { - this.appendDisableMask(); - this.$cache.input[0].disabled = true; - } else { - this.$cache.cont.removeClass("irs-disabled"); - this.$cache.input[0].disabled = false; - this.bindEvents(); - } - }, - - appendDisableMask: function () { - this.$cache.cont.append(disable_html); - this.$cache.cont.addClass("irs-disabled"); - }, - - remove: function () { - this.$cache.cont.remove(); - this.$cache.cont = null; - - this.$cache.line.off("keydown.irs_" + this.plugin_count); - - this.$cache.body.off("touchmove.irs_" + this.plugin_count); - this.$cache.body.off("mousemove.irs_" + this.plugin_count); - - this.$cache.win.off("touchend.irs_" + this.plugin_count); - this.$cache.win.off("mouseup.irs_" + this.plugin_count); - - if (is_old_ie) { - this.$cache.body.off("mouseup.irs_" + this.plugin_count); - this.$cache.body.off("mouseleave.irs_" + this.plugin_count); - } - - this.$cache.grid_labels = []; - this.coords.big = []; - this.coords.big_w = []; - this.coords.big_p = []; - this.coords.big_x = []; - - cancelAnimationFrame(this.raf_id); - }, - - bindEvents: function () { - this.$cache.body.on("touchmove.irs_" + this.plugin_count, this.pointerMove.bind(this)); - this.$cache.body.on("mousemove.irs_" + this.plugin_count, this.pointerMove.bind(this)); - - this.$cache.win.on("touchend.irs_" + this.plugin_count, this.pointerUp.bind(this)); - this.$cache.win.on("mouseup.irs_" + this.plugin_count, this.pointerUp.bind(this)); - - this.$cache.line.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); - this.$cache.line.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); - - if (this.options.drag_interval && this.options.type === "double") { - this.$cache.bar.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "both")); - this.$cache.bar.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "both")); - } else { - this.$cache.bar.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); - this.$cache.bar.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); - } - - if (this.options.type === "single") { - this.$cache.s_single.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "single")); - this.$cache.shad_single.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); - - this.$cache.s_single.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "single")); - this.$cache.shad_single.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); - } else { - this.$cache.s_from.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "from")); - this.$cache.s_to.on("touchstart.irs_" + this.plugin_count, this.pointerDown.bind(this, "to")); - this.$cache.shad_from.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); - this.$cache.shad_to.on("touchstart.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); - - this.$cache.s_from.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "from")); - this.$cache.s_to.on("mousedown.irs_" + this.plugin_count, this.pointerDown.bind(this, "to")); - this.$cache.shad_from.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); - this.$cache.shad_to.on("mousedown.irs_" + this.plugin_count, this.pointerClick.bind(this, "click")); - } - - if (this.options.keyboard) { - this.$cache.line.on("keydown.irs_" + this.plugin_count, this.key.bind(this, "keyboard")); - } - - if (is_old_ie) { - this.$cache.body.on("mouseup.irs_" + this.plugin_count, this.pointerUp.bind(this)); - this.$cache.body.on("mouseleave.irs_" + this.plugin_count, this.pointerUp.bind(this)); - } - }, - - pointerMove: function (e) { - if (!this.dragging) { - return; - } - - var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX; - this.coords.x_pointer = x - this.coords.x_gap; - - this.calc(); - }, - - pointerUp: function (e) { - if (this.current_plugin !== this.plugin_count) { - return; - } - - if (this.is_active) { - this.is_active = false; - } else { - return; - } - - var is_function = this.options.onFinish && typeof this.options.onFinish === "function", - is_original = $.contains(this.$cache.cont[0], e.target) || this.dragging; - - if (is_function && is_original) { - this.options.onFinish(this.result); - } - - this.$cache.cont.find(".state_hover").removeClass("state_hover"); - - this.force_redraw = true; - this.dragging = false; - - if (is_old_ie) { - $("*").prop("unselectable", false); - } - }, - - pointerDown: function (target, e) { - e.preventDefault(); - var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX; - if (e.button === 2) { - return; - } - - this.current_plugin = this.plugin_count; - this.target = target; - - this.is_active = true; - this.dragging = true; - - this.coords.x_gap = this.$cache.rs.offset().left; - this.coords.x_pointer = x - this.coords.x_gap; - - this.calcPointer(); - - switch (target) { - case "single": - this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_single); - break; - case "from": - this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_from); - this.$cache.s_from.addClass("state_hover"); - this.$cache.s_from.addClass("type_last"); - this.$cache.s_to.removeClass("type_last"); - break; - case "to": - this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_to); - this.$cache.s_to.addClass("state_hover"); - this.$cache.s_to.addClass("type_last"); - this.$cache.s_from.removeClass("type_last"); - break; - case "both": - this.coords.p_gap_left = this.toFixed(this.coords.p_pointer - this.coords.p_from); - this.coords.p_gap_right = this.toFixed(this.coords.p_to - this.coords.p_pointer); - this.$cache.s_to.removeClass("type_last"); - this.$cache.s_from.removeClass("type_last"); - break; - } - - if (is_old_ie) { - $("*").prop("unselectable", true); - } - - this.$cache.line.trigger("focus"); - }, - - pointerClick: function (target, e) { - e.preventDefault(); - var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX; - if (e.button === 2) { - return; - } - - this.current_plugin = this.plugin_count; - this.target = target; - - this.is_click = true; - this.coords.x_gap = this.$cache.rs.offset().left; - this.coords.x_pointer = +(x - this.coords.x_gap).toFixed(); - - this.force_redraw = true; - this.calc(); - - this.$cache.line.trigger("focus"); - }, - - key: function (target, e) { - if (this.current_plugin !== this.plugin_count || e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) { - return; - } - - switch (e.which) { - case 83: // W - case 65: // A - case 40: // DOWN - case 37: // LEFT - e.preventDefault(); - this.moveByKey(false); - break; - - case 87: // S - case 68: // D - case 38: // UP - case 39: // RIGHT - e.preventDefault(); - this.moveByKey(true); - break; - } - - return true; - }, - - // Move by key beta - // TODO: refactor than have plenty of time - moveByKey: function (right) { - var p = this.coords.p_pointer; - - if (right) { - p += this.options.keyboard_step; - } else { - p -= this.options.keyboard_step; - } - - this.coords.x_pointer = this.toFixed(this.coords.w_rs / 100 * p); - this.is_key = true; - this.calc(); - }, - - setMinMax: function () { - if (!this.options) { - return; - } - - if (this.options.hide_min_max) { - this.$cache.min[0].style.display = "none"; - this.$cache.max[0].style.display = "none"; - return; - } - - if (this.options.values.length) { - this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])); - this.$cache.max.html(this.decorate(this.options.p_values[this.options.max])); - } else { - this.$cache.min.html(this.decorate(this._prettify(this.options.min), this.options.min)); - this.$cache.max.html(this.decorate(this._prettify(this.options.max), this.options.max)); - } - - this.labels.w_min = this.$cache.min.outerWidth(false); - this.labels.w_max = this.$cache.max.outerWidth(false); - }, - - - - // ============================================================================================================= - // Calculations - - calc: function (update) { - if (!this.options) { - return; - } - - this.calc_count++; - - if (this.calc_count === 10 || update) { - this.calc_count = 0; - this.coords.w_rs = this.$cache.rs.outerWidth(false); - if (this.options.type === "single") { - this.coords.w_handle = this.$cache.s_single.outerWidth(false); - } else { - this.coords.w_handle = this.$cache.s_from.outerWidth(false); - } - } - - if (!this.coords.w_rs) { - return; - } - - this.calcPointer(); - - this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100); - var real_width = 100 - this.coords.p_handle, - real_x = this.toFixed(this.coords.p_pointer - this.coords.p_gap); - - if (this.target === "click") { - real_x = this.toFixed(this.coords.p_pointer - (this.coords.p_handle / 2)); - this.target = this.chooseHandle(real_x); - } - - if (real_x < 0) { - real_x = 0; - } else if (real_x > real_width) { - real_x = real_width; - } - - switch (this.target) { - case "base": - var w = (this.options.max - this.options.min) / 100, - f = (this.result.from - this.options.min) / w, - t = (this.result.to - this.options.min) / w; - - this.coords.p_single_real = this.toFixed(f); - this.coords.p_from_real = this.toFixed(f); - this.coords.p_to_real = this.toFixed(t); - - this.coords.p_single_real = this.checkDiapason(this.coords.p_single_real, this.options.from_min, this.options.from_max); - this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max); - this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max); - - this.coords.p_single = this.toFixed(f - (this.coords.p_handle / 100 * f)); - this.coords.p_from = this.toFixed(f - (this.coords.p_handle / 100 * f)); - this.coords.p_to = this.toFixed(t - (this.coords.p_handle / 100 * t)); - - this.target = null; - - break; - - case "single": - if (this.options.from_fixed) { - break; - } - - this.coords.p_single_real = this.calcWithStep(real_x / real_width * 100); - this.coords.p_single_real = this.checkDiapason(this.coords.p_single_real, this.options.from_min, this.options.from_max); - this.coords.p_single = this.toFixed(this.coords.p_single_real / 100 * real_width); - - break; - - case "from": - if (this.options.from_fixed) { - break; - } - - this.coords.p_from_real = this.calcWithStep(real_x / real_width * 100); - if (this.coords.p_from_real > this.coords.p_to_real) { - this.coords.p_from_real = this.coords.p_to_real; - } - this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max); - this.coords.p_from_real = this.checkMinInterval(this.coords.p_from_real, this.coords.p_to_real, "from"); - this.coords.p_from_real = this.checkMaxInterval(this.coords.p_from_real, this.coords.p_to_real, "from"); - this.coords.p_from = this.toFixed(this.coords.p_from_real / 100 * real_width); - - break; - - case "to": - if (this.options.to_fixed) { - break; - } - - this.coords.p_to_real = this.calcWithStep(real_x / real_width * 100); - if (this.coords.p_to_real < this.coords.p_from_real) { - this.coords.p_to_real = this.coords.p_from_real; - } - this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max); - this.coords.p_to_real = this.checkMinInterval(this.coords.p_to_real, this.coords.p_from_real, "to"); - this.coords.p_to_real = this.checkMaxInterval(this.coords.p_to_real, this.coords.p_from_real, "to"); - this.coords.p_to = this.toFixed(this.coords.p_to_real / 100 * real_width); - - break; - - case "both": - real_x = this.toFixed(real_x + (this.coords.p_handle * 0.1)); - - this.coords.p_from_real = this.calcWithStep((real_x - this.coords.p_gap_left) / real_width * 100); - this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max); - this.coords.p_from_real = this.checkMinInterval(this.coords.p_from_real, this.coords.p_to_real, "from"); - this.coords.p_from = this.toFixed(this.coords.p_from_real / 100 * real_width); - - this.coords.p_to_real = this.calcWithStep((real_x + this.coords.p_gap_right) / real_width * 100); - this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max); - this.coords.p_to_real = this.checkMinInterval(this.coords.p_to_real, this.coords.p_from_real, "to"); - this.coords.p_to = this.toFixed(this.coords.p_to_real / 100 * real_width); - - break; - } - - if (this.options.type === "single") { - this.coords.p_bar_x = (this.coords.p_handle / 2); - this.coords.p_bar_w = this.coords.p_single; - - this.result.from_percent = this.coords.p_single_real; - this.result.from = this.calcReal(this.coords.p_single_real); - if (this.options.values.length) { - this.result.from_value = this.options.values[this.result.from]; - } - } else { - this.coords.p_bar_x = this.toFixed(this.coords.p_from + (this.coords.p_handle / 2)); - this.coords.p_bar_w = this.toFixed(this.coords.p_to - this.coords.p_from); - - this.result.from_percent = this.coords.p_from_real; - this.result.from = this.calcReal(this.coords.p_from_real); - this.result.to_percent = this.coords.p_to_real; - this.result.to = this.calcReal(this.coords.p_to_real); - if (this.options.values.length) { - this.result.from_value = this.options.values[this.result.from]; - this.result.to_value = this.options.values[this.result.to]; - } - } - - this.calcMinMax(); - this.calcLabels(); - }, - - calcPointer: function () { - if (!this.coords.w_rs) { - this.coords.p_pointer = 0; - return; - } - - if (this.coords.x_pointer < 0 || isNaN(this.coords.x_pointer) ) { - this.coords.x_pointer = 0; - } else if (this.coords.x_pointer > this.coords.w_rs) { - this.coords.x_pointer = this.coords.w_rs; - } - - this.coords.p_pointer = this.toFixed(this.coords.x_pointer / this.coords.w_rs * 100); - }, - - chooseHandle: function (real_x) { - if (this.options.type === "single") { - return "single"; - } else { - var m_point = this.coords.p_from_real + ((this.coords.p_to_real - this.coords.p_from_real) / 2); - if (real_x >= m_point) { - return "to"; - } else { - return "from"; - } - } - }, - - calcMinMax: function () { - if (!this.coords.w_rs) { - return; - } - - this.labels.p_min = this.labels.w_min / this.coords.w_rs * 100; - this.labels.p_max = this.labels.w_max / this.coords.w_rs * 100; - }, - - calcLabels: function () { - if (!this.coords.w_rs || this.options.hide_from_to) { - return; - } - - if (this.options.type === "single") { - - this.labels.w_single = this.$cache.single.outerWidth(false); - this.labels.p_single = this.labels.w_single / this.coords.w_rs * 100; - this.labels.p_single_left = this.coords.p_single + (this.coords.p_handle / 2) - (this.labels.p_single / 2); - this.labels.p_single_left = this.checkEdges(this.labels.p_single_left, this.labels.p_single); - - } else { - - this.labels.w_from = this.$cache.from.outerWidth(false); - this.labels.p_from = this.labels.w_from / this.coords.w_rs * 100; - this.labels.p_from_left = this.coords.p_from + (this.coords.p_handle / 2) - (this.labels.p_from / 2); - this.labels.p_from_left = this.toFixed(this.labels.p_from_left); - this.labels.p_from_left = this.checkEdges(this.labels.p_from_left, this.labels.p_from); - - this.labels.w_to = this.$cache.to.outerWidth(false); - this.labels.p_to = this.labels.w_to / this.coords.w_rs * 100; - this.labels.p_to_left = this.coords.p_to + (this.coords.p_handle / 2) - (this.labels.p_to / 2); - this.labels.p_to_left = this.toFixed(this.labels.p_to_left); - this.labels.p_to_left = this.checkEdges(this.labels.p_to_left, this.labels.p_to); - - this.labels.w_single = this.$cache.single.outerWidth(false); - this.labels.p_single = this.labels.w_single / this.coords.w_rs * 100; - this.labels.p_single_left = ((this.labels.p_from_left + this.labels.p_to_left + this.labels.p_to) / 2) - (this.labels.p_single / 2); - this.labels.p_single_left = this.toFixed(this.labels.p_single_left); - this.labels.p_single_left = this.checkEdges(this.labels.p_single_left, this.labels.p_single); - - } - }, - - - - // ============================================================================================================= - // Drawings - - updateScene: function () { - if (!this.options) { - return; - } - - this.drawHandles(); - - this.raf_id = requestAnimationFrame(this.updateScene.bind(this)); - }, - - drawHandles: function () { - this.coords.w_rs = this.$cache.rs.outerWidth(false); - - if (!this.coords.w_rs) { - return; - } - - if (this.coords.w_rs !== this.coords.w_rs_old) { - this.target = "base"; - this.is_resize = true; - } - - if (this.coords.w_rs !== this.coords.w_rs_old || this.force_redraw) { - this.setMinMax(); - this.calc(true); - this.drawLabels(); - if (this.options.grid) { - this.calcGridMargin(); - this.calcGridLabels(); - } - this.force_redraw = true; - this.coords.w_rs_old = this.coords.w_rs; - this.drawShadow(); - } - - if (!this.coords.w_rs) { - return; - } - - if (!this.dragging && !this.force_redraw && !this.is_key) { - return; - } - - if (this.old_from !== this.result.from || this.old_to !== this.result.to || this.force_redraw || this.is_key) { - - this.drawLabels(); - - this.$cache.bar[0].style.left = this.coords.p_bar_x + "%"; - this.$cache.bar[0].style.width = this.coords.p_bar_w + "%"; - - if (this.options.type === "single") { - this.$cache.s_single[0].style.left = this.coords.p_single + "%"; - - this.$cache.single[0].style.left = this.labels.p_single_left + "%"; - - if (this.options.values.length) { - this.$cache.input.prop("value", this.result.from_value); - this.$cache.input.data("from", this.result.from_value); - } else { - this.$cache.input.prop("value", this.result.from); - this.$cache.input.data("from", this.result.from); - } - } else { - this.$cache.s_from[0].style.left = this.coords.p_from + "%"; - this.$cache.s_to[0].style.left = this.coords.p_to + "%"; - - if (this.old_from !== this.result.from || this.force_redraw) { - this.$cache.from[0].style.left = this.labels.p_from_left + "%"; - } - if (this.old_to !== this.result.to || this.force_redraw) { - this.$cache.to[0].style.left = this.labels.p_to_left + "%"; - } - - this.$cache.single[0].style.left = this.labels.p_single_left + "%"; - - if (this.options.values.length) { - this.$cache.input.prop("value", this.result.from_value + ";" + this.result.to_value); - this.$cache.input.data("from", this.result.from_value); - this.$cache.input.data("to", this.result.to_value); - } else { - this.$cache.input.prop("value", this.result.from + ";" + this.result.to); - this.$cache.input.data("from", this.result.from); - this.$cache.input.data("to", this.result.to); - } - } - - if ((this.old_from !== this.result.from || this.old_to !== this.result.to) && !this.is_start) { - this.$cache.input.trigger("change"); - } - - this.old_from = this.result.from; - this.old_to = this.result.to; - - var is_function = this.options.onChange && typeof this.options.onChange === "function" && !this.is_resize; - if (is_function && !this.is_update && !this.is_start) { - this.options.onChange(this.result); - } - - var is_finish = this.options.onFinish && typeof this.options.onFinish === "function"; - if (is_finish && (this.is_key || this.is_click)) { - this.options.onFinish(this.result); - } - - this.is_update = false; - this.is_resize = false; - } - - this.is_start = false; - this.is_key = false; - this.is_click = false; - this.force_redraw = false; - }, - - drawLabels: function () { - if (!this.options) { - return; - } - - var values_num = this.options.values.length, - p_values = this.options.p_values, - text_single, - text_from, - text_to; - - if (this.options.hide_from_to) { - return; - } - - if (this.options.type === "single") { - - if (values_num) { - text_single = this.decorate(p_values[this.result.from]); - this.$cache.single.html(text_single); - } else { - text_single = this.decorate(this._prettify(this.result.from), this.result.from); - this.$cache.single.html(text_single); - } - - this.calcLabels(); - - if (this.labels.p_single_left < this.labels.p_min + 1) { - this.$cache.min[0].style.visibility = "hidden"; - } else { - this.$cache.min[0].style.visibility = "visible"; - } - - if (this.labels.p_single_left + this.labels.p_single > 100 - this.labels.p_max - 1) { - this.$cache.max[0].style.visibility = "hidden"; - } else { - this.$cache.max[0].style.visibility = "visible"; - } - - } else { - - if (values_num) { - - if (this.options.decorate_both) { - text_single = this.decorate(p_values[this.result.from]); - text_single += this.options.values_separator; - text_single += this.decorate(p_values[this.result.to]); - } else { - text_single = this.decorate(p_values[this.result.from] + this.options.values_separator + p_values[this.result.to]); - } - text_from = this.decorate(p_values[this.result.from]); - text_to = this.decorate(p_values[this.result.to]); - - this.$cache.single.html(text_single); - this.$cache.from.html(text_from); - this.$cache.to.html(text_to); - - } else { - - if (this.options.decorate_both) { - text_single = this.decorate(this._prettify(this.result.from)); - text_single += this.options.values_separator; - text_single += this.decorate(this._prettify(this.result.to)); - } else { - text_single = this.decorate(this._prettify(this.result.from) + this.options.values_separator + this._prettify(this.result.to), this.result.from); - } - text_from = this.decorate(this._prettify(this.result.from), this.result.from); - text_to = this.decorate(this._prettify(this.result.to), this.result.to); - - this.$cache.single.html(text_single); - this.$cache.from.html(text_from); - this.$cache.to.html(text_to); - - } - - this.calcLabels(); - - var min = Math.min(this.labels.p_single_left, this.labels.p_from_left), - single_left = this.labels.p_single_left + this.labels.p_single, - to_left = this.labels.p_to_left + this.labels.p_to, - max = Math.max(single_left, to_left); - - if (this.labels.p_from_left + this.labels.p_from >= this.labels.p_to_left) { - this.$cache.from[0].style.visibility = "hidden"; - this.$cache.to[0].style.visibility = "hidden"; - this.$cache.single[0].style.visibility = "visible"; - - if (this.result.from === this.result.to) { - this.$cache.from[0].style.visibility = "visible"; - this.$cache.single[0].style.visibility = "hidden"; - max = to_left; - } else { - this.$cache.from[0].style.visibility = "hidden"; - this.$cache.single[0].style.visibility = "visible"; - max = Math.max(single_left, to_left); - } - } else { - this.$cache.from[0].style.visibility = "visible"; - this.$cache.to[0].style.visibility = "visible"; - this.$cache.single[0].style.visibility = "hidden"; - } - - if (min < this.labels.p_min + 1) { - this.$cache.min[0].style.visibility = "hidden"; - } else { - this.$cache.min[0].style.visibility = "visible"; - } - - if (max > 100 - this.labels.p_max - 1) { - this.$cache.max[0].style.visibility = "hidden"; - } else { - this.$cache.max[0].style.visibility = "visible"; - } - - } - }, - - drawShadow: function () { - var o = this.options, - c = this.$cache, - - is_from_min = typeof o.from_min === "number" && !isNaN(o.from_min), - is_from_max = typeof o.from_max === "number" && !isNaN(o.from_max), - is_to_min = typeof o.to_min === "number" && !isNaN(o.to_min), - is_to_max = typeof o.to_max === "number" && !isNaN(o.to_max), - - from_min, - from_max, - to_min, - to_max; - - if (o.type === "single") { - if (o.from_shadow && (is_from_min || is_from_max)) { - from_min = this.calcPercent(o.from_min || o.min); - from_max = this.calcPercent(o.from_max || o.max) - from_min; - from_min = this.toFixed(from_min - (this.coords.p_handle / 100 * from_min)); - from_max = this.toFixed(from_max - (this.coords.p_handle / 100 * from_max)); - from_min = from_min + (this.coords.p_handle / 2); - - c.shad_single[0].style.display = "block"; - c.shad_single[0].style.left = from_min + "%"; - c.shad_single[0].style.width = from_max + "%"; - } else { - c.shad_single[0].style.display = "none"; - } - } else { - if (o.from_shadow && (is_from_min || is_from_max)) { - from_min = this.calcPercent(o.from_min || o.min); - from_max = this.calcPercent(o.from_max || o.max) - from_min; - from_min = this.toFixed(from_min - (this.coords.p_handle / 100 * from_min)); - from_max = this.toFixed(from_max - (this.coords.p_handle / 100 * from_max)); - from_min = from_min + (this.coords.p_handle / 2); - - c.shad_from[0].style.display = "block"; - c.shad_from[0].style.left = from_min + "%"; - c.shad_from[0].style.width = from_max + "%"; - } else { - c.shad_from[0].style.display = "none"; - } - - if (o.to_shadow && (is_to_min || is_to_max)) { - to_min = this.calcPercent(o.to_min || o.min); - to_max = this.calcPercent(o.to_max || o.max) - to_min; - to_min = this.toFixed(to_min - (this.coords.p_handle / 100 * to_min)); - to_max = this.toFixed(to_max - (this.coords.p_handle / 100 * to_max)); - to_min = to_min + (this.coords.p_handle / 2); - - c.shad_to[0].style.display = "block"; - c.shad_to[0].style.left = to_min + "%"; - c.shad_to[0].style.width = to_max + "%"; - } else { - c.shad_to[0].style.display = "none"; - } - } - }, - - - - // ============================================================================================================= - // Service methods - - toggleInput: function () { - this.$cache.input.toggleClass("irs-hidden-input"); - }, - - calcPercent: function (num) { - var w = (this.options.max - this.options.min) / 100, - percent = (num - this.options.min) / w; - - return this.toFixed(percent); - }, - - calcReal: function (percent) { - var min = this.options.min, - max = this.options.max, - abs = 0; - - if (min < 0) { - abs = Math.abs(min); - min = min + abs; - max = max + abs; - } - - var number = ((max - min) / 100 * percent) + min, - string = this.options.step.toString().split(".")[1]; - - if (string) { - number = +number.toFixed(string.length); - } else { - number = number / this.options.step; - number = number * this.options.step; - number = +number.toFixed(0); - } - - if (abs) { - number -= abs; - } - - if (number < this.options.min) { - number = this.options.min; - } else if (number > this.options.max) { - number = this.options.max; - } - - if (string) { - return +number.toFixed(string.length); - } else { - return this.toFixed(number); - } - }, - - calcWithStep: function (percent) { - var rounded = Math.round(percent / this.coords.p_step) * this.coords.p_step; - - if (rounded > 100) { - rounded = 100; - } - if (percent === 100) { - rounded = 100; - } - - return this.toFixed(rounded); - }, - - checkMinInterval: function (p_current, p_next, type) { - var o = this.options, - current, - next; - - if (!o.min_interval) { - return p_current; - } - - current = this.calcReal(p_current); - next = this.calcReal(p_next); - - if (type === "from") { - - if (next - current < o.min_interval) { - current = next - o.min_interval; - } - - } else { - - if (current - next < o.min_interval) { - current = next + o.min_interval; - } - - } - - return this.calcPercent(current); - }, - - checkMaxInterval: function (p_current, p_next, type) { - var o = this.options, - current, - next; - - if (!o.max_interval) { - return p_current; - } - - current = this.calcReal(p_current); - next = this.calcReal(p_next); - - if (type === "from") { - - if (next - current > o.max_interval) { - current = next - o.max_interval; - } - - } else { - - if (current - next > o.max_interval) { - current = next + o.max_interval; - } - - } - - return this.calcPercent(current); - }, - - checkDiapason: function (p_num, min, max) { - var num = this.calcReal(p_num), - o = this.options; - - if (!min || typeof min !== "number") { - min = o.min; - } - - if (!max || typeof max !== "number") { - max = o.max; - } - - if (num < min) { - num = min; - } - - if (num > max) { - num = max; - } - - return this.calcPercent(num); - }, - - toFixed: function (num) { - num = num.toFixed(5); - return +num; - }, - - _prettify: function (num) { - if (!this.options.prettify_enabled) { - return num; - } - - if (this.options.prettify && typeof this.options.prettify === "function") { - return this.options.prettify(num); - } else { - return this.prettify(num); - } - }, - - prettify: function (num) { - var n = num.toString(); - return n.replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g, "$1" + this.options.prettify_separator); - }, - - checkEdges: function (left, width) { - if (!this.options.force_edges) { - return this.toFixed(left); - } - - if (left < 0) { - left = 0; - } else if (left > 100 - width) { - left = 100 - width; - } - - return this.toFixed(left); - }, - - validate: function () { - var o = this.options, - r = this.result, - v = o.values, - vl = v.length, - value, - i; - - if (typeof o.min === "string") o.min = +o.min; - if (typeof o.max === "string") o.max = +o.max; - if (typeof o.from === "string") o.from = +o.from; - if (typeof o.to === "string") o.to = +o.to; - if (typeof o.step === "string") o.step = +o.step; - - if (typeof o.from_min === "string") o.from_min = +o.from_min; - if (typeof o.from_max === "string") o.from_max = +o.from_max; - if (typeof o.to_min === "string") o.to_min = +o.to_min; - if (typeof o.to_max === "string") o.to_max = +o.to_max; - - if (typeof o.keyboard_step === "string") o.keyboard_step = +o.keyboard_step; - if (typeof o.grid_num === "string") o.grid_num = +o.grid_num; - - if (o.max <= o.min) { - if (o.min) { - o.max = o.min * 2; - } else { - o.max = o.min + 1; - } - o.step = 1; - } - - if (vl) { - o.p_values = []; - o.min = 0; - o.max = vl - 1; - o.step = 1; - o.grid_num = o.max; - o.grid_snap = true; - - - for (i = 0; i < vl; i++) { - value = +v[i]; - - if (!isNaN(value)) { - v[i] = value; - value = this._prettify(value); - } else { - value = v[i]; - } - - o.p_values.push(value); - } - } - - if (typeof o.from !== "number" || isNaN(o.from)) { - o.from = o.min; - } - - if (typeof o.to !== "number" || isNaN(o.from)) { - o.to = o.max; - } - - if (o.from < o.min || o.from > o.max) { - o.from = o.min; - } - - if (o.to > o.max || o.to < o.min) { - o.to = o.max; - } - - if (o.type === "double" && o.from > o.to) { - o.from = o.to; - } - - if (typeof o.step !== "number" || isNaN(o.step) || !o.step || o.step < 0) { - o.step = 1; - } - - if (typeof o.keyboard_step !== "number" || isNaN(o.keyboard_step) || !o.keyboard_step || o.keyboard_step < 0) { - o.keyboard_step = 5; - } - - if (o.from_min && o.from < o.from_min) { - o.from = o.from_min; - } - - if (o.from_max && o.from > o.from_max) { - o.from = o.from_max; - } - - if (o.to_min && o.to < o.to_min) { - o.to = o.to_min; - } - - if (o.to_max && o.from > o.to_max) { - o.to = o.to_max; - } - - if (r) { - if (r.min !== o.min) { - r.min = o.min; - } - - if (r.max !== o.max) { - r.max = o.max; - } - - if (r.from < r.min || r.from > r.max) { - r.from = o.from; - } - - if (r.to < r.min || r.to > r.max) { - r.to = o.to; - } - } - - if (typeof o.min_interval !== "number" || isNaN(o.min_interval) || !o.min_interval || o.min_interval < 0) { - o.min_interval = 0; - } - - if (typeof o.max_interval !== "number" || isNaN(o.max_interval) || !o.max_interval || o.max_interval < 0) { - o.max_interval = 0; - } - - if (o.min_interval && o.min_interval > o.max - o.min) { - o.min_interval = o.max - o.min; - } - - if (o.max_interval && o.max_interval > o.max - o.min) { - o.max_interval = o.max - o.min; - } - }, - - decorate: function (num, original) { - var decorated = "", - o = this.options; - - if (o.prefix) { - decorated += o.prefix; - } - - decorated += num; - - if (o.max_postfix) { - if (o.values.length && num === o.p_values[o.max]) { - decorated += o.max_postfix; - if (o.postfix) { - decorated += " "; - } - } else if (original === o.max) { - decorated += o.max_postfix; - if (o.postfix) { - decorated += " "; - } - } - } - - if (o.postfix) { - decorated += o.postfix; - } - - return decorated; - }, - - updateFrom: function () { - this.result.from = this.options.from; - this.result.from_percent = this.calcPercent(this.result.from); - if (this.options.values) { - this.result.from_value = this.options.values[this.result.from]; - } - }, - - updateTo: function () { - this.result.to = this.options.to; - this.result.to_percent = this.calcPercent(this.result.to); - if (this.options.values) { - this.result.to_value = this.options.values[this.result.to]; - } - }, - - updateResult: function () { - this.result.min = this.options.min; - this.result.max = this.options.max; - this.updateFrom(); - this.updateTo(); - }, - - - // ============================================================================================================= - // Grid - - appendGrid: function () { - if (!this.options.grid) { - return; - } - - var o = this.options, - i, z, - - total = o.max - o.min, - big_num = o.grid_num, - big_p = 0, - big_w = 0, - - small_max = 4, - local_small_max, - small_p, - small_w = 0, - - result, - html = ''; - - - - this.calcGridMargin(); - - if (o.grid_snap) { - big_num = total / o.step; - big_p = this.toFixed(o.step / (total / 100)); - } else { - big_p = this.toFixed(100 / big_num); - } - - if (big_num > 4) { - small_max = 3; - } - if (big_num > 7) { - small_max = 2; - } - if (big_num > 14) { - small_max = 1; - } - if (big_num > 28) { - small_max = 0; - } - - for (i = 0; i < big_num + 1; i++) { - local_small_max = small_max; - - big_w = this.toFixed(big_p * i); - if (big_w > 100) { - big_w = 100; - - local_small_max -= 2; - if (local_small_max < 0) { - local_small_max = 0; - } - } - this.coords.big[i] = big_w; - - small_p = (big_w - (big_p * (i - 1))) / (local_small_max + 1); - - for (z = 1; z <= local_small_max; z++) { - if (big_w === 0) { - break; - } - - small_w = this.toFixed(big_w - (small_p * z)); - - html += ''; - } - - html += ''; - - result = this.calcReal(big_w); - if (o.values.length) { - result = o.p_values[result]; - } else { - result = this._prettify(result); - } - - html += '' + result + ''; - } - this.coords.big_num = Math.ceil(big_num + 1); - - - - this.$cache.cont.addClass("irs-with-grid"); - this.$cache.grid.html(html); - this.cacheGridLabels(); - }, - - cacheGridLabels: function () { - var $label, i, - num = this.coords.big_num; - - for (i = 0; i < num; i++) { - $label = this.$cache.grid.find(".js-grid-text-" + i); - this.$cache.grid_labels.push($label); - } - - this.calcGridLabels(); - }, - - calcGridLabels: function () { - var i, label, start = [], finish = [], - num = this.coords.big_num; - - for (i = 0; i < num; i++) { - this.coords.big_w[i] = this.$cache.grid_labels[i].outerWidth(false); - this.coords.big_p[i] = this.toFixed(this.coords.big_w[i] / this.coords.w_rs * 100); - this.coords.big_x[i] = this.toFixed(this.coords.big_p[i] / 2); - - start[i] = this.toFixed(this.coords.big[i] - this.coords.big_x[i]); - finish[i] = this.toFixed(start[i] + this.coords.big_p[i]); - } - - if (this.options.force_edges) { - if (start[0] < this.coords.grid_gap) { - start[0] = this.coords.grid_gap; - finish[0] = this.toFixed(start[0] + this.coords.big_p[0]); - - this.coords.big_x[0] = this.coords.grid_gap; - } - - if (finish[num - 1] > 100 - this.coords.grid_gap) { - finish[num - 1] = 100 - this.coords.grid_gap; - start[num - 1] = this.toFixed(finish[num - 1] - this.coords.big_p[num - 1]); - - this.coords.big_x[num - 1] = this.toFixed(this.coords.big_p[num - 1] - this.coords.grid_gap); - } - } - - this.calcGridCollision(2, start, finish); - this.calcGridCollision(4, start, finish); - - for (i = 0; i < num; i++) { - label = this.$cache.grid_labels[i][0]; - label.style.marginLeft = -this.coords.big_x[i] + "%"; - } - }, - - // Collisions Calc Beta - // TODO: Refactor then have plenty of time - calcGridCollision: function (step, start, finish) { - var i, next_i, label, - num = this.coords.big_num; - - for (i = 0; i < num; i += step) { - next_i = i + (step / 2); - if (next_i >= num) { - break; - } - - label = this.$cache.grid_labels[next_i][0]; - - if (finish[i] <= start[next_i]) { - label.style.visibility = "visible"; - } else { - label.style.visibility = "hidden"; - } - } - }, - - calcGridMargin: function () { - if (!this.options.grid_margin) { - return; - } - - this.coords.w_rs = this.$cache.rs.outerWidth(false); - if (!this.coords.w_rs) { - return; - } - - if (this.options.type === "single") { - this.coords.w_handle = this.$cache.s_single.outerWidth(false); - } else { - this.coords.w_handle = this.$cache.s_from.outerWidth(false); - } - this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100); - this.coords.grid_gap = this.toFixed((this.coords.p_handle / 2) - 0.1); - - this.$cache.grid[0].style.width = this.toFixed(100 - this.coords.p_handle) + "%"; - this.$cache.grid[0].style.left = this.coords.grid_gap + "%"; - }, - - - - // ============================================================================================================= - // Public methods - - update: function (options) { - if (!this.input) { - return; - } - - this.is_update = true; - - this.options.from = this.result.from; - this.options.to = this.result.to; - - this.options = $.extend(this.options, options); - this.validate(); - this.updateResult(options); - - this.toggleInput(); - this.remove(); - this.init(true); - }, - - reset: function () { - if (!this.input) { - return; - } - - this.updateResult(); - this.update(); - }, - - destroy: function () { - if (!this.input) { - return; - } - - this.toggleInput(); - this.$cache.input.prop("readonly", false); - $.data(this.input, "ionRangeSlider", null); - - this.remove(); - this.input = null; - this.options = null; - } - }; - - $.fn.ionRangeSlider = function (options) { - return this.each(function() { - if (!$.data(this, "ionRangeSlider")) { - $.data(this, "ionRangeSlider", new IonRangeSlider(this, options, plugin_count++)); - } - }); - }; - - - - // ================================================================================================================= - // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ - // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating - - // requestAnimationFrame polyfill by Erik Möller. fixes from Paul Irish and Tino Zijdel - - // MIT license - - (function() { - var lastTime = 0; - var vendors = ['ms', 'moz', 'webkit', 'o']; - for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { - window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; - window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] - || window[vendors[x]+'CancelRequestAnimationFrame']; - } - - if (!window.requestAnimationFrame) - window.requestAnimationFrame = function(callback, element) { - var currTime = new Date().getTime(); - var timeToCall = Math.max(0, 16 - (currTime - lastTime)); - var id = window.setTimeout(function() { callback(currTime + timeToCall); }, - timeToCall); - lastTime = currTime + timeToCall; - return id; - }; - - if (!window.cancelAnimationFrame) - window.cancelAnimationFrame = function(id) { - clearTimeout(id); - }; - }()); - -} (jQuery, document, window, navigator)); diff --git a/js/ion.rangeSlider.min.js b/js/ion.rangeSlider.min.js deleted file mode 100644 index 7a232da..0000000 --- a/js/ion.rangeSlider.min.js +++ /dev/null @@ -1,68 +0,0 @@ -// Ion.RangeSlider | version 2.0.6 | https://github.com/IonDen/ion.rangeSlider -(function(g,q,h,r,u){var t=0,n=function(){var a=r.userAgent,b=/msie\s\d+/i;return 0a)?(g("html").addClass("lt-ie9"),!0):!1}();Function.prototype.bind||(Function.prototype.bind=function(a){var b=this,c=[].slice;if("function"!=typeof b)throw new TypeError;var d=c.call(arguments,1),e=function(){if(this instanceof e){var f=function(){};f.prototype=b.prototype;var f=new f,k=b.apply(f,d.concat(c.call(arguments)));return Object(k)===k?k:f}return b.apply(a, -d.concat(c.call(arguments)))};return e});Array.prototype.indexOf||(Array.prototype.indexOf=function(a,b){var c;if(null==this)throw new TypeError('"this" is null or not defined');var d=Object(this),e=d.length>>>0;if(0===e)return-1;c=+b||0;Infinity===Math.abs(c)&&(c=0);if(c>=e)return-1;for(c=Math.max(0<=c?c:e-Math.abs(c),0);c');this.$cache.input.prop("readonly",!0);this.$cache.cont=this.$cache.input.prev();this.result.slider=this.$cache.cont;this.$cache.cont.html('01000'); -this.$cache.rs=this.$cache.cont.find(".irs");this.$cache.min=this.$cache.cont.find(".irs-min");this.$cache.max=this.$cache.cont.find(".irs-max");this.$cache.from=this.$cache.cont.find(".irs-from");this.$cache.to=this.$cache.cont.find(".irs-to");this.$cache.single=this.$cache.cont.find(".irs-single");this.$cache.bar=this.$cache.cont.find(".irs-bar");this.$cache.line=this.$cache.cont.find(".irs-line");this.$cache.grid=this.$cache.cont.find(".irs-grid");"single"===this.options.type?(this.$cache.cont.append(''), -this.$cache.s_single=this.$cache.cont.find(".single"),this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.shad_single=this.$cache.cont.find(".shadow-single")):(this.$cache.cont.append(''),this.$cache.s_from=this.$cache.cont.find(".from"),this.$cache.s_to=this.$cache.cont.find(".to"),this.$cache.shad_from= -this.$cache.cont.find(".shadow-from"),this.$cache.shad_to=this.$cache.cont.find(".shadow-to"));this.options.hide_from_to&&(this.$cache.from[0].style.display="none",this.$cache.to[0].style.display="none",this.$cache.single[0].style.display="none");this.appendGrid();this.options.disable?(this.appendDisableMask(),this.$cache.input[0].disabled=!0):(this.$cache.cont.removeClass("irs-disabled"),this.$cache.input[0].disabled=!1,this.bindEvents())},appendDisableMask:function(){this.$cache.cont.append(''); -this.$cache.cont.addClass("irs-disabled")},remove:function(){this.$cache.cont.remove();this.$cache.cont=null;this.$cache.line.off("keydown.irs_"+this.plugin_count);this.$cache.body.off("touchmove.irs_"+this.plugin_count);this.$cache.body.off("mousemove.irs_"+this.plugin_count);this.$cache.win.off("touchend.irs_"+this.plugin_count);this.$cache.win.off("mouseup.irs_"+this.plugin_count);n&&(this.$cache.body.off("mouseup.irs_"+this.plugin_count),this.$cache.body.off("mouseleave.irs_"+this.plugin_count)); -this.$cache.grid_labels=[];this.coords.big=[];this.coords.big_w=[];this.coords.big_p=[];this.coords.big_x=[];cancelAnimationFrame(this.raf_id)},bindEvents:function(){this.$cache.body.on("touchmove.irs_"+this.plugin_count,this.pointerMove.bind(this));this.$cache.body.on("mousemove.irs_"+this.plugin_count,this.pointerMove.bind(this));this.$cache.win.on("touchend.irs_"+this.plugin_count,this.pointerUp.bind(this));this.$cache.win.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this));this.$cache.line.on("touchstart.irs_"+ -this.plugin_count,this.pointerClick.bind(this,"click"));this.$cache.line.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"));this.options.drag_interval&&"double"===this.options.type?(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"both")),this.$cache.bar.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"both"))):(this.$cache.bar.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.bar.on("mousedown.irs_"+ -this.plugin_count,this.pointerClick.bind(this,"click")));"single"===this.options.type?(this.$cache.s_single.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.s_single.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"single")),this.$cache.shad_single.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click"))):(this.$cache.s_from.on("touchstart.irs_"+ -this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_to.on("touchstart.irs_"+this.plugin_count,this.pointerDown.bind(this,"to")),this.$cache.shad_from.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("touchstart.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.s_from.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this,"from")),this.$cache.s_to.on("mousedown.irs_"+this.plugin_count,this.pointerDown.bind(this, -"to")),this.$cache.shad_from.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")),this.$cache.shad_to.on("mousedown.irs_"+this.plugin_count,this.pointerClick.bind(this,"click")));if(this.options.keyboard)this.$cache.line.on("keydown.irs_"+this.plugin_count,this.key.bind(this,"keyboard"));n&&(this.$cache.body.on("mouseup.irs_"+this.plugin_count,this.pointerUp.bind(this)),this.$cache.body.on("mouseleave.irs_"+this.plugin_count,this.pointerUp.bind(this)))},pointerMove:function(a){this.dragging&& -(this.coords.x_pointer=(a.pageX||a.originalEvent.touches&&a.originalEvent.touches[0].pageX)-this.coords.x_gap,this.calc())},pointerUp:function(a){if(this.current_plugin===this.plugin_count&&this.is_active){this.is_active=!1;var b=this.options.onFinish&&"function"===typeof this.options.onFinish;a=g.contains(this.$cache.cont[0],a.target)||this.dragging;if(b&&a)this.options.onFinish(this.result);this.$cache.cont.find(".state_hover").removeClass("state_hover");this.force_redraw=!0;this.dragging=!1;n&& -g("*").prop("unselectable",!1)}},pointerDown:function(a,b){b.preventDefault();var c=b.pageX||b.originalEvent.touches&&b.originalEvent.touches[0].pageX;if(2!==b.button){this.current_plugin=this.plugin_count;this.target=a;this.dragging=this.is_active=!0;this.coords.x_gap=this.$cache.rs.offset().left;this.coords.x_pointer=c-this.coords.x_gap;this.calcPointer();switch(a){case "single":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_single);break;case "from":this.coords.p_gap=this.toFixed(this.coords.p_pointer- -this.coords.p_from);this.$cache.s_from.addClass("state_hover");this.$cache.s_from.addClass("type_last");this.$cache.s_to.removeClass("type_last");break;case "to":this.coords.p_gap=this.toFixed(this.coords.p_pointer-this.coords.p_to);this.$cache.s_to.addClass("state_hover");this.$cache.s_to.addClass("type_last");this.$cache.s_from.removeClass("type_last");break;case "both":this.coords.p_gap_left=this.toFixed(this.coords.p_pointer-this.coords.p_from),this.coords.p_gap_right=this.toFixed(this.coords.p_to- -this.coords.p_pointer),this.$cache.s_to.removeClass("type_last"),this.$cache.s_from.removeClass("type_last")}n&&g("*").prop("unselectable",!0);this.$cache.line.trigger("focus")}},pointerClick:function(a,b){b.preventDefault();var c=b.pageX||b.originalEvent.touches&&b.originalEvent.touches[0].pageX;2!==b.button&&(this.current_plugin=this.plugin_count,this.target=a,this.is_click=!0,this.coords.x_gap=this.$cache.rs.offset().left,this.coords.x_pointer=+(c-this.coords.x_gap).toFixed(),this.force_redraw= -!0,this.calc(),this.$cache.line.trigger("focus"))},key:function(a,b){if(!(this.current_plugin!==this.plugin_count||b.altKey||b.ctrlKey||b.shiftKey||b.metaKey)){switch(b.which){case 83:case 65:case 40:case 37:b.preventDefault();this.moveByKey(!1);break;case 87:case 68:case 38:case 39:b.preventDefault(),this.moveByKey(!0)}return!0}},moveByKey:function(a){var b=this.coords.p_pointer,b=a?b+this.options.keyboard_step:b-this.options.keyboard_step;this.coords.x_pointer=this.toFixed(this.coords.w_rs/100* -b);this.is_key=!0;this.calc()},setMinMax:function(){this.options&&(this.options.hide_min_max?(this.$cache.min[0].style.display="none",this.$cache.max[0].style.display="none"):(this.options.values.length?(this.$cache.min.html(this.decorate(this.options.p_values[this.options.min])),this.$cache.max.html(this.decorate(this.options.p_values[this.options.max]))):(this.$cache.min.html(this.decorate(this._prettify(this.options.min),this.options.min)),this.$cache.max.html(this.decorate(this._prettify(this.options.max), -this.options.max))),this.labels.w_min=this.$cache.min.outerWidth(!1),this.labels.w_max=this.$cache.max.outerWidth(!1)))},calc:function(a){if(this.options){this.calc_count++;if(10===this.calc_count||a)this.calc_count=0,this.coords.w_rs=this.$cache.rs.outerWidth(!1),this.coords.w_handle="single"===this.options.type?this.$cache.s_single.outerWidth(!1):this.$cache.s_from.outerWidth(!1);if(this.coords.w_rs){this.calcPointer();this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100); -a=100-this.coords.p_handle;var b=this.toFixed(this.coords.p_pointer-this.coords.p_gap);"click"===this.target&&(b=this.toFixed(this.coords.p_pointer-this.coords.p_handle/2),this.target=this.chooseHandle(b));0>b?b=0:b>a&&(b=a);switch(this.target){case "base":b=(this.options.max-this.options.min)/100;a=(this.result.from-this.options.min)/b;b=(this.result.to-this.options.min)/b;this.coords.p_single_real=this.toFixed(a);this.coords.p_from_real=this.toFixed(a);this.coords.p_to_real=this.toFixed(b);this.coords.p_single_real= -this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_to_real=this.checkDiapason(this.coords.p_to_real,this.options.to_min,this.options.to_max);this.coords.p_single=this.toFixed(a-this.coords.p_handle/100*a);this.coords.p_from=this.toFixed(a-this.coords.p_handle/100*a);this.coords.p_to=this.toFixed(b-this.coords.p_handle/100*b);this.target= -null;break;case "single":if(this.options.from_fixed)break;this.coords.p_single_real=this.calcWithStep(b/a*100);this.coords.p_single_real=this.checkDiapason(this.coords.p_single_real,this.options.from_min,this.options.from_max);this.coords.p_single=this.toFixed(this.coords.p_single_real/100*a);break;case "from":if(this.options.from_fixed)break;this.coords.p_from_real=this.calcWithStep(b/a*100);this.coords.p_from_real>this.coords.p_to_real&&(this.coords.p_from_real=this.coords.p_to_real);this.coords.p_from_real= -this.checkDiapason(this.coords.p_from_real,this.options.from_min,this.options.from_max);this.coords.p_from_real=this.checkMinInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from_real=this.checkMaxInterval(this.coords.p_from_real,this.coords.p_to_real,"from");this.coords.p_from=this.toFixed(this.coords.p_from_real/100*a);break;case "to":if(this.options.to_fixed)break;this.coords.p_to_real=this.calcWithStep(b/a*100);this.coords.p_to_realthis.coords.x_pointer|| -isNaN(this.coords.x_pointer)?this.coords.x_pointer=0:this.coords.x_pointer>this.coords.w_rs&&(this.coords.x_pointer=this.coords.w_rs),this.coords.p_pointer=this.toFixed(this.coords.x_pointer/this.coords.w_rs*100)):this.coords.p_pointer=0},chooseHandle:function(a){return"single"===this.options.type?"single":a>=this.coords.p_from_real+(this.coords.p_to_real-this.coords.p_from_real)/2?"to":"from"},calcMinMax:function(){this.coords.w_rs&&(this.labels.p_min=this.labels.w_min/this.coords.w_rs*100,this.labels.p_max= -this.labels.w_max/this.coords.w_rs*100)},calcLabels:function(){this.coords.w_rs&&!this.options.hide_from_to&&("single"===this.options.type?(this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=this.coords.p_single+this.coords.p_handle/2-this.labels.p_single/2):(this.labels.w_from=this.$cache.from.outerWidth(!1),this.labels.p_from=this.labels.w_from/this.coords.w_rs*100,this.labels.p_from_left=this.coords.p_from+ -this.coords.p_handle/2-this.labels.p_from/2,this.labels.p_from_left=this.toFixed(this.labels.p_from_left),this.labels.p_from_left=this.checkEdges(this.labels.p_from_left,this.labels.p_from),this.labels.w_to=this.$cache.to.outerWidth(!1),this.labels.p_to=this.labels.w_to/this.coords.w_rs*100,this.labels.p_to_left=this.coords.p_to+this.coords.p_handle/2-this.labels.p_to/2,this.labels.p_to_left=this.toFixed(this.labels.p_to_left),this.labels.p_to_left=this.checkEdges(this.labels.p_to_left,this.labels.p_to), -this.labels.w_single=this.$cache.single.outerWidth(!1),this.labels.p_single=this.labels.w_single/this.coords.w_rs*100,this.labels.p_single_left=(this.labels.p_from_left+this.labels.p_to_left+this.labels.p_to)/2-this.labels.p_single/2,this.labels.p_single_left=this.toFixed(this.labels.p_single_left)),this.labels.p_single_left=this.checkEdges(this.labels.p_single_left,this.labels.p_single))},updateScene:function(){this.options&&(this.drawHandles(),this.raf_id=requestAnimationFrame(this.updateScene.bind(this)))}, -drawHandles:function(){this.coords.w_rs=this.$cache.rs.outerWidth(!1);if(this.coords.w_rs){this.coords.w_rs!==this.coords.w_rs_old&&(this.target="base",this.is_resize=!0);if(this.coords.w_rs!==this.coords.w_rs_old||this.force_redraw)this.setMinMax(),this.calc(!0),this.drawLabels(),this.options.grid&&(this.calcGridMargin(),this.calcGridLabels()),this.force_redraw=!0,this.coords.w_rs_old=this.coords.w_rs,this.drawShadow();if(this.coords.w_rs&&(this.dragging||this.force_redraw||this.is_key)){if(this.old_from!== -this.result.from||this.old_to!==this.result.to||this.force_redraw||this.is_key){this.drawLabels();this.$cache.bar[0].style.left=this.coords.p_bar_x+"%";this.$cache.bar[0].style.width=this.coords.p_bar_w+"%";if("single"===this.options.type)this.$cache.s_single[0].style.left=this.coords.p_single+"%",this.$cache.single[0].style.left=this.labels.p_single_left+"%",this.options.values.length?(this.$cache.input.prop("value",this.result.from_value),this.$cache.input.data("from",this.result.from_value)):(this.$cache.input.prop("value", -this.result.from),this.$cache.input.data("from",this.result.from));else{this.$cache.s_from[0].style.left=this.coords.p_from+"%";this.$cache.s_to[0].style.left=this.coords.p_to+"%";if(this.old_from!==this.result.from||this.force_redraw)this.$cache.from[0].style.left=this.labels.p_from_left+"%";if(this.old_to!==this.result.to||this.force_redraw)this.$cache.to[0].style.left=this.labels.p_to_left+"%";this.$cache.single[0].style.left=this.labels.p_single_left+"%";this.options.values.length?(this.$cache.input.prop("value", -this.result.from_value+";"+this.result.to_value),this.$cache.input.data("from",this.result.from_value),this.$cache.input.data("to",this.result.to_value)):(this.$cache.input.prop("value",this.result.from+";"+this.result.to),this.$cache.input.data("from",this.result.from),this.$cache.input.data("to",this.result.to))}this.old_from===this.result.from&&this.old_to===this.result.to||this.is_start||this.$cache.input.trigger("change");this.old_from=this.result.from;this.old_to=this.result.to;if(this.options.onChange&& -"function"===typeof this.options.onChange&&!this.is_resize&&!this.is_update&&!this.is_start)this.options.onChange(this.result);if(this.options.onFinish&&"function"===typeof this.options.onFinish&&(this.is_key||this.is_click))this.options.onFinish(this.result);this.is_resize=this.is_update=!1}this.force_redraw=this.is_click=this.is_key=this.is_start=!1}}},drawLabels:function(){if(this.options){var a=this.options.values.length,b=this.options.p_values,c;if(!this.options.hide_from_to)if("single"===this.options.type)a= -a?this.decorate(b[this.result.from]):this.decorate(this._prettify(this.result.from),this.result.from),this.$cache.single.html(a),this.calcLabels(),this.$cache.min[0].style.visibility=this.labels.p_single_left100-this.labels.p_max-1?"hidden":"visible";else{a?(this.options.decorate_both?(a=this.decorate(b[this.result.from]),a+=this.options.values_separator,a+=this.decorate(b[this.result.to])): -a=this.decorate(b[this.result.from]+this.options.values_separator+b[this.result.to]),c=this.decorate(b[this.result.from]),b=this.decorate(b[this.result.to])):(this.options.decorate_both?(a=this.decorate(this._prettify(this.result.from)),a+=this.options.values_separator,a+=this.decorate(this._prettify(this.result.to))):a=this.decorate(this._prettify(this.result.from)+this.options.values_separator+this._prettify(this.result.to),this.result.from),c=this.decorate(this._prettify(this.result.from),this.result.from), -b=this.decorate(this._prettify(this.result.to),this.result.to));this.$cache.single.html(a);this.$cache.from.html(c);this.$cache.to.html(b);this.calcLabels();b=Math.min(this.labels.p_single_left,this.labels.p_from_left);a=this.labels.p_single_left+this.labels.p_single;c=this.labels.p_to_left+this.labels.p_to;var d=Math.max(a,c);this.labels.p_from_left+this.labels.p_from>=this.labels.p_to_left?(this.$cache.from[0].style.visibility="hidden",this.$cache.to[0].style.visibility="hidden",this.$cache.single[0].style.visibility= -"visible",this.result.from===this.result.to?(this.$cache.from[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden",d=c):(this.$cache.from[0].style.visibility="hidden",this.$cache.single[0].style.visibility="visible",d=Math.max(a,c))):(this.$cache.from[0].style.visibility="visible",this.$cache.to[0].style.visibility="visible",this.$cache.single[0].style.visibility="hidden");this.$cache.min[0].style.visibility=b100-this.labels.p_max-1?"hidden":"visible"}}},drawShadow:function(){var a=this.options,b=this.$cache,c="number"===typeof a.from_min&&!isNaN(a.from_min),d="number"===typeof a.from_max&&!isNaN(a.from_max),e="number"===typeof a.to_min&&!isNaN(a.to_min),f="number"===typeof a.to_max&&!isNaN(a.to_max);"single"===a.type?a.from_shadow&&(c||d)?(c=this.calcPercent(a.from_min||a.min),d=this.calcPercent(a.from_max||a.max)-c,c=this.toFixed(c-this.coords.p_handle/100*c),d=this.toFixed(d-this.coords.p_handle/ -100*d),c+=this.coords.p_handle/2,b.shad_single[0].style.display="block",b.shad_single[0].style.left=c+"%",b.shad_single[0].style.width=d+"%"):b.shad_single[0].style.display="none":(a.from_shadow&&(c||d)?(c=this.calcPercent(a.from_min||a.min),d=this.calcPercent(a.from_max||a.max)-c,c=this.toFixed(c-this.coords.p_handle/100*c),d=this.toFixed(d-this.coords.p_handle/100*d),c+=this.coords.p_handle/2,b.shad_from[0].style.display="block",b.shad_from[0].style.left=c+"%",b.shad_from[0].style.width=d+"%"): -b.shad_from[0].style.display="none",a.to_shadow&&(e||f)?(e=this.calcPercent(a.to_min||a.min),a=this.calcPercent(a.to_max||a.max)-e,e=this.toFixed(e-this.coords.p_handle/100*e),a=this.toFixed(a-this.coords.p_handle/100*a),e+=this.coords.p_handle/2,b.shad_to[0].style.display="block",b.shad_to[0].style.left=e+"%",b.shad_to[0].style.width=a+"%"):b.shad_to[0].style.display="none")},toggleInput:function(){this.$cache.input.toggleClass("irs-hidden-input")},calcPercent:function(a){return this.toFixed((a- -this.options.min)/((this.options.max-this.options.min)/100))},calcReal:function(a){var b=this.options.min,c=this.options.max,d=0;0>b&&(d=Math.abs(b),b+=d,c+=d);a=(c-b)/100*a+b;(b=this.options.step.toString().split(".")[1])?a=+a.toFixed(b.length):(a/=this.options.step,a*=this.options.step,a=+a.toFixed(0));d&&(a-=d);athis.options.max&&(a=this.options.max);return b?+a.toFixed(b.length):this.toFixed(a)},calcWithStep:function(a){var b=Math.round(a/this.coords.p_step)* -this.coords.p_step;100d.max_interval&&(a=b-d.max_interval):a-b>d.max_interval&& -(a=b+d.max_interval);return this.calcPercent(a)},checkDiapason:function(a,b,c){a=this.calcReal(a);var d=this.options;b&&"number"===typeof b||(b=d.min);c&&"number"===typeof c||(c=d.max);ac&&(a=c);return this.calcPercent(a)},toFixed:function(a){a=a.toFixed(5);return+a},_prettify:function(a){return this.options.prettify_enabled?this.options.prettify&&"function"===typeof this.options.prettify?this.options.prettify(a):this.prettify(a):a},prettify:function(a){return a.toString().replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g, -"$1"+this.options.prettify_separator)},checkEdges:function(a,b){if(!this.options.force_edges)return this.toFixed(a);0>a?a=0:a>100-b&&(a=100-b);return this.toFixed(a)},validate:function(){var a=this.options,b=this.result,c=a.values,d=c.length,e,f;"string"===typeof a.min&&(a.min=+a.min);"string"===typeof a.max&&(a.max=+a.max);"string"===typeof a.from&&(a.from=+a.from);"string"===typeof a.to&&(a.to=+a.to);"string"===typeof a.step&&(a.step=+a.step);"string"===typeof a.from_min&&(a.from_min=+a.from_min); -"string"===typeof a.from_max&&(a.from_max=+a.from_max);"string"===typeof a.to_min&&(a.to_min=+a.to_min);"string"===typeof a.to_max&&(a.to_max=+a.to_max);"string"===typeof a.keyboard_step&&(a.keyboard_step=+a.keyboard_step);"string"===typeof a.grid_num&&(a.grid_num=+a.grid_num);a.max<=a.min&&(a.max=a.min?2*a.min:a.min+1,a.step=1);if(d)for(a.p_values=[],a.min=0,a.max=d-1,a.step=1,a.grid_num=a.max,a.grid_snap=!0,f=0;fa.max)a.from=a.min;if(a.to>a.max||a.toa.to&&(a.from=a.to);if("number"!==typeof a.step||isNaN(a.step)||!a.step||0>a.step)a.step=1;if("number"!==typeof a.keyboard_step||isNaN(a.keyboard_step)||!a.keyboard_step||0>a.keyboard_step)a.keyboard_step=5;a.from_min&&a.froma.from_max&&(a.from=a.from_max); -a.to_min&&a.toa.to_max&&(a.to=a.to_max);if(b){b.min!==a.min&&(b.min=a.min);b.max!==a.max&&(b.max=a.max);if(b.fromb.max)b.from=a.from;if(b.tob.max)b.to=a.to}if("number"!==typeof a.min_interval||isNaN(a.min_interval)||!a.min_interval||0>a.min_interval)a.min_interval=0;if("number"!==typeof a.max_interval||isNaN(a.max_interval)||!a.max_interval||0>a.max_interval)a.max_interval=0;a.min_interval&&a.min_interval>a.max-a.min&&(a.min_interval= -a.max-a.min);a.max_interval&&a.max_interval>a.max-a.min&&(a.max_interval=a.max-a.min)},decorate:function(a,b){var c="",d=this.options;d.prefix&&(c+=d.prefix);c+=a;d.max_postfix&&(d.values.length&&a===d.p_values[d.max]?(c+=d.max_postfix,d.postfix&&(c+=" ")):b===d.max&&(c+=d.max_postfix,d.postfix&&(c+=" ")));d.postfix&&(c+=d.postfix);return c},updateFrom:function(){this.result.from=this.options.from;this.result.from_percent=this.calcPercent(this.result.from);this.options.values&&(this.result.from_value= -this.options.values[this.result.from])},updateTo:function(){this.result.to=this.options.to;this.result.to_percent=this.calcPercent(this.result.to);this.options.values&&(this.result.to_value=this.options.values[this.result.to])},updateResult:function(){this.result.min=this.options.min;this.result.max=this.options.max;this.updateFrom();this.updateTo()},appendGrid:function(){if(this.options.grid){var a=this.options,b,c;b=a.max-a.min;var d=a.grid_num,e=0,f=0,k=4,g,h,l=0,m="";this.calcGridMargin();a.grid_snap? -(d=b/a.step,e=this.toFixed(a.step/(b/100))):e=this.toFixed(100/d);4g&&(g=0));this.coords.big[b]=f;h=(f-e*(b-1))/(g+1);for(c=1;c<=g&&0!==f;c++)l=this.toFixed(f-h*c),m+='';m+='';l=this.calcReal(f);l=a.values.length?a.p_values[l]:this._prettify(l);m+=''+l+""}this.coords.big_num=Math.ceil(d+1);this.$cache.cont.addClass("irs-with-grid");this.$cache.grid.html(m);this.cacheGridLabels()}},cacheGridLabels:function(){var a,b,c=this.coords.big_num;for(b=0;b100-this.coords.grid_gap&&(c[d-1]=100-this.coords.grid_gap,b[d-1]=this.toFixed(c[d-1]-this.coords.big_p[d-1]), -this.coords.big_x[d-1]=this.toFixed(this.coords.big_p[d-1]-this.coords.grid_gap)));this.calcGridCollision(2,b,c);this.calcGridCollision(4,b,c);for(a=0;a=g)break;f=this.$cache.grid_labels[e][0];f.style.visibility=c[d]<=b[e]?"visible":"hidden"}},calcGridMargin:function(){this.options.grid_margin&&(this.coords.w_rs=this.$cache.rs.outerWidth(!1), -this.coords.w_rs&&(this.coords.w_handle="single"===this.options.type?this.$cache.s_single.outerWidth(!1):this.$cache.s_from.outerWidth(!1),this.coords.p_handle=this.toFixed(this.coords.w_handle/this.coords.w_rs*100),this.coords.grid_gap=this.toFixed(this.coords.p_handle/2-.1),this.$cache.grid[0].style.width=this.toFixed(100-this.coords.p_handle)+"%",this.$cache.grid[0].style.left=this.coords.grid_gap+"%"))},update:function(a){this.input&&(this.is_update=!0,this.options.from=this.result.from,this.options.to= -this.result.to,this.options=g.extend(this.options,a),this.validate(),this.updateResult(a),this.toggleInput(),this.remove(),this.init(!0))},reset:function(){this.input&&(this.updateResult(),this.update())},destroy:function(){this.input&&(this.toggleInput(),this.$cache.input.prop("readonly",!1),g.data(this.input,"ionRangeSlider",null),this.remove(),this.options=this.input=null)}};g.fn.ionRangeSlider=function(a){return this.each(function(){g.data(this,"ionRangeSlider")||g.data(this,"ionRangeSlider", -new p(this,a,t++))})};(function(){for(var a=0,b=["ms","moz","webkit","o"],c=0;c' + + '' + + '01' + + '000' + + '' + + '' + + '' + + ''; + + var single_html = + '' + + '' + + '' + + ''; + + var double_html = + '' + + '' + + '' + + ''; + + var disable_html = + ''; + + + + // ================================================================================================================= + // Core + + var RangeSlider = function (input, options, plugin_count) { + this.VERSION = '2.0.6'; + this.input = input; + this.plugin_count = plugin_count; + this.current_plugin = 0; + this.calc_count = 0; + this.old_from = 0; + this.old_to = 0; + this.raf_id = null; + this.dragging = false; + this.force_redraw = false; + this.is_key = false; + this.is_update = false; + this.is_start = true; + this.is_active = false; + this.is_resize = false; + this.is_click = false; + + this.$cache = { + win: $(window), + body: $(document.body), + input: $(input), + cont: null, + rs: null, + min: null, + max: null, + from: null, + to: null, + single: null, + bar: null, + line: null, + s_single: null, + s_from: null, + s_to: null, + shad_single: null, + shad_from: null, + shad_to: null, + divots: null, + rings: null, + grid: null, + grid_labels: [] + }; + + // get config from data attributes + var $inp = this.$cache.input; + var data = { + type: $inp.data('type'), + + min: $inp.data('min'), + max: $inp.data('max'), + from: $inp.data('from'), + to: $inp.data('to'), + step: $inp.data('step'), + + min_interval: $inp.data('minInterval'), + max_interval: $inp.data('maxInterval'), + drag_interval: $inp.data('dragInterval'), + + values: $inp.data('values'), + labels: $inp.data('labels'), + + from_fixed: $inp.data('fromFixed'), + from_min: $inp.data('fromMin'), + from_max: $inp.data('fromMax'), + from_shadow: $inp.data('fromShadow'), + + to_fixed: $inp.data('toFixed'), + to_min: $inp.data('toMin'), + to_max: $inp.data('toMax'), + to_shadow: $inp.data('toShadow'), + + prettify_enabled: $inp.data('prettifyEnabled'), + prettify_separator: $inp.data('prettifySeparator'), + + force_edges: $inp.data('forceEdges'), + + keyboard: $inp.data('keyboard'), + keyboard_step: $inp.data('keyboardStep'), + + divots: $inp.data('divots'), + rings: $inp.data('rings'), + + grid: $inp.data('grid'), + grid_margin: $inp.data('gridMargin'), + grid_num: $inp.data('gridNum'), + grid_snap: $inp.data('gridSnap'), + + hide_min_max: $inp.data('hideMinMax'), + hide_from_to: $inp.data('hideFromTo'), + + prefix: $inp.data('prefix'), + postfix: $inp.data('postfix'), + max_postfix: $inp.data('maxPostfix'), + decorate_both: $inp.data('decorateBoth'), + values_separator: $inp.data('valuesSeparator'), + + disable: $inp.data('disable') + }; + options = $.extend(data, options); + + // get from and to out of input + var val = $inp.prop('value'); + if (val) { + val = val.split(';'); + + if (val[0] && val[0] === +val[0]) { + val[0] = +val[0]; + } + if (val[1] && val[1] === +val[1]) { + val[1] = +val[1]; + } + + if (options.values && options.values.length) { + data.from = val[0] && options.values.indexOf(val[0]); + data.to = val[1] && options.values.indexOf(val[1]); + } else { + data.from = val[0] && +val[0]; + data.to = val[1] && +val[1]; + } + } + + // get merge config with defaults + this.options = $.extend({ + type: 'single', + + min: 10, + max: 100, + from: null, + to: null, + step: 1, + + min_interval: 0, + max_interval: 0, + drag_interval: false, + + values: [], + labels: [], + + from_fixed: false, + from_min: null, + from_max: null, + from_shadow: false, + + to_fixed: false, + to_min: null, + to_max: null, + to_shadow: false, + + prettify_enabled: true, + prettify_separator: ' ', + prettify: null, + + force_edges: false, + + keyboard: false, + keyboard_step: 5, + + divots: false, + rings: false, + + grid: false, + grid_margin: true, + grid_num: 4, + grid_snap: false, + + hide_min_max: false, + hide_from_to: false, + + prefix: '', + postfix: '', + max_postfix: '', + decorate_both: true, + values_separator: ' — ', + + disable: false, + + onStart: null, + onChange: null, + onFinish: null, + onUpdate: null + }, options); + + this.validate(); + + this.result = { + input: this.$cache.input, + slider: null, + + min: this.options.min, + max: this.options.max, + + from: this.options.from, + from_percent: 0, + from_value: null, + + to: this.options.to, + to_percent: 0, + to_value: null + }; + + this.coords = { + // left + x_gap: 0, + x_pointer: 0, + + // width + w_rs: 0, + w_rs_old: 0, + w_handle: 0, + + // percents + p_gap: 0, + p_gap_left: 0, + p_gap_right: 0, + p_step: 0, + p_pointer: 0, + p_handle: 0, + p_single: 0, + p_single_real: 0, + p_from: 0, + p_from_real: 0, + p_to: 0, + p_to_real: 0, + p_bar_x: 0, + p_bar_w: 0, + + // grid + grid_gap: 0, + big_num: 0, + big: [], + big_w: [], + big_p: [], + big_x: [] + }; + + this.labels = { + // width + w_min: 0, + w_max: 0, + w_from: 0, + w_to: 0, + w_single: 0, + + // percents + p_min: 0, + p_max: 0, + p_from: 0, + p_from_left: 0, + p_to: 0, + p_to_left: 0, + p_single: 0, + p_single_left: 0 + }; + + this.init(); + }; + + RangeSlider.prototype = { + init: function (is_update) { + this.coords.p_step = this.options.step / ((this.options.max - this.options.min) / 100); + this.target = 'base'; + + this.toggleInput(); + this.append(); + this.setMinMax(); + + if (is_update) { + this.force_redraw = true; + this.calc(true); + + if (this.options.onUpdate && typeof this.options.onUpdate === 'function') { + this.options.onUpdate(this.result); + } + } else { + this.force_redraw = true; + this.calc(true); + + if (this.options.onStart && typeof this.options.onStart === 'function') { + this.options.onStart(this.result); + } + } + + this.updateScene(); + this.raf_id = requestAnimationFrame(this.updateScene.bind(this)); + }, + + append: function () { + var container_html = ''; + this.$cache.input.before(container_html); + this.$cache.input.prop('readonly', true); + this.$cache.cont = this.$cache.input.prev(); + this.result.slider = this.$cache.cont; + + this.$cache.cont.html(base_html); + this.$cache.rs = this.$cache.cont.find('.irs'); + this.$cache.min = this.$cache.cont.find('.irs-min'); + this.$cache.max = this.$cache.cont.find('.irs-max'); + this.$cache.from = this.$cache.cont.find('.irs-from'); + this.$cache.to = this.$cache.cont.find('.irs-to'); + this.$cache.single = this.$cache.cont.find('.irs-single'); + this.$cache.bar = this.$cache.cont.find('.irs-bar'); + this.$cache.line = this.$cache.cont.find('.irs-line'); + this.$cache.divots = this.$cache.cont.find('.irs-divots'); + this.$cache.grid = this.$cache.cont.find('.irs-grid'); + + if (this.options.type === 'single') { + this.$cache.cont.append(single_html); + this.$cache.s_single = this.$cache.cont.find('.single'); + this.$cache.rings = this.$cache.cont.find('.irs-rings'); + this.$cache.from[0].style.visibility = 'hidden'; + this.$cache.to[0].style.visibility = 'hidden'; + this.$cache.shad_single = this.$cache.cont.find('.shadow-single'); + } else { + this.$cache.cont.append(double_html); + this.$cache.s_from = this.$cache.cont.find('.from'); + this.$cache.s_to = this.$cache.cont.find('.to'); + this.$cache.shad_from = this.$cache.cont.find('.shadow-from'); + this.$cache.shad_to = this.$cache.cont.find('.shadow-to'); + } + + if (this.options.hide_from_to) { + this.$cache.from[0].style.display = 'none'; + this.$cache.to[0].style.display = 'none'; + this.$cache.single[0].style.display = 'none'; + } + + this.appendDivots(); + this.appendGrid(); + + if (this.options.disable) { + this.appendDisableMask(); + this.$cache.input[0].disabled = true; + } else { + this.$cache.cont.removeClass('irs-disabled'); + this.$cache.input[0].disabled = false; + this.bindEvents(); + } + }, + + appendDisableMask: function () { + this.$cache.cont.append(disable_html); + this.$cache.cont.addClass('irs-disabled'); + }, + + remove: function () { + this.$cache.cont.remove(); + this.$cache.cont = null; + + this.$cache.line.off('keydown.irs_' + this.plugin_count); + + this.$cache.body.off('touchmove.irs_' + this.plugin_count); + this.$cache.body.off('mousemove.irs_' + this.plugin_count); + + this.$cache.win.off('touchend.irs_' + this.plugin_count); + this.$cache.win.off('mouseup.irs_' + this.plugin_count); + + this.$cache.grid_labels = []; + this.coords.big = []; + this.coords.big_w = []; + this.coords.big_p = []; + this.coords.big_x = []; + + cancelAnimationFrame(this.raf_id); + }, + + bindEvents: function () { + this.$cache.body.on('touchmove.irs_' + this.plugin_count, this.pointerMove.bind(this)); + this.$cache.body.on('mousemove.irs_' + this.plugin_count, this.pointerMove.bind(this)); + + this.$cache.win.on('touchend.irs_' + this.plugin_count, this.pointerUp.bind(this)); + this.$cache.win.on('mouseup.irs_' + this.plugin_count, this.pointerUp.bind(this)); + + this.$cache.line.on('touchstart.irs_' + this.plugin_count, this.pointerClick.bind(this, 'click')); + this.$cache.line.on('mousedown.irs_' + this.plugin_count, this.pointerClick.bind(this, 'click')); + + if (this.options.drag_interval && this.options.type === 'double') { + this.$cache.bar.on('touchstart.irs_' + this.plugin_count, this.pointerDown.bind(this, 'both')); + this.$cache.bar.on('mousedown.irs_' + this.plugin_count, this.pointerDown.bind(this, 'both')); + } else { + this.$cache.bar.on('touchstart.irs_' + this.plugin_count, this.pointerClick.bind(this, 'click')); + this.$cache.bar.on('mousedown.irs_' + this.plugin_count, this.pointerClick.bind(this, 'click')); + } + + if (this.options.type === 'single') { + this.$cache.s_single.on('touchstart.irs_' + this.plugin_count, this.pointerDown.bind(this, 'single')); + this.$cache.shad_single.on('touchstart.irs_' + this.plugin_count, this.pointerClick.bind(this, 'click')); + + this.$cache.s_single.on('mousedown.irs_' + this.plugin_count, this.pointerDown.bind(this, 'single')); + this.$cache.shad_single.on('mousedown.irs_' + this.plugin_count, this.pointerClick.bind(this, 'click')); + } else { + this.$cache.s_from.on('touchstart.irs_' + this.plugin_count, this.pointerDown.bind(this, 'from')); + this.$cache.s_to.on('touchstart.irs_' + this.plugin_count, this.pointerDown.bind(this, 'to')); + this.$cache.shad_from.on('touchstart.irs_' + this.plugin_count, this.pointerClick.bind(this, 'click')); + this.$cache.shad_to.on('touchstart.irs_' + this.plugin_count, this.pointerClick.bind(this, 'click')); + + this.$cache.s_from.on('mousedown.irs_' + this.plugin_count, this.pointerDown.bind(this, 'from')); + this.$cache.s_to.on('mousedown.irs_' + this.plugin_count, this.pointerDown.bind(this, 'to')); + this.$cache.shad_from.on('mousedown.irs_' + this.plugin_count, this.pointerClick.bind(this, 'click')); + this.$cache.shad_to.on('mousedown.irs_' + this.plugin_count, this.pointerClick.bind(this, 'click')); + } + + if (this.options.keyboard) { + this.$cache.line.on('keydown.irs_' + this.plugin_count, this.key.bind(this, 'keyboard')); + } + }, + + pointerMove: function (e) { + if (!this.dragging) { + return; + } + + var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX; + this.coords.x_pointer = x - this.coords.x_gap; + + this.calc(); + }, + + pointerUp: function (e) { + if (this.current_plugin !== this.plugin_count) { + return; + } + + if (this.is_active) { + this.is_active = false; + } else { + return; + } + + var is_function = this.options.onFinish && typeof this.options.onFinish === 'function', + is_original = $.contains(this.$cache.cont[0], e.target) || this.dragging; + + if (is_function && is_original) { + this.options.onFinish(this.result); + } + + this.$cache.cont.find('.state_hover').removeClass('state_hover'); + + this.force_redraw = true; + this.dragging = false; + }, + + pointerDown: function (target, e) { + e.preventDefault(); + var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX; + if (e.button === 2) { + return; + } + + this.current_plugin = this.plugin_count; + this.target = target; + + this.is_active = true; + this.dragging = true; + + this.coords.x_gap = this.$cache.rs.offset().left; + this.coords.x_pointer = x - this.coords.x_gap; + + this.calcPointer(); + + switch (target) { + case 'single': + this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_single); + break; + case 'from': + this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_from); + this.$cache.s_from.addClass('state_hover'); + this.$cache.s_from.addClass('type_last'); + this.$cache.s_to.removeClass('type_last'); + break; + case 'to': + this.coords.p_gap = this.toFixed(this.coords.p_pointer - this.coords.p_to); + this.$cache.s_to.addClass('state_hover'); + this.$cache.s_to.addClass('type_last'); + this.$cache.s_from.removeClass('type_last'); + break; + case 'both': + this.coords.p_gap_left = this.toFixed(this.coords.p_pointer - this.coords.p_from); + this.coords.p_gap_right = this.toFixed(this.coords.p_to - this.coords.p_pointer); + this.$cache.s_to.removeClass('type_last'); + this.$cache.s_from.removeClass('type_last'); + break; + } + + this.$cache.line.trigger('focus'); + }, + + pointerClick: function (target, e) { + e.preventDefault(); + var x = e.pageX || e.originalEvent.touches && e.originalEvent.touches[0].pageX; + if (e.button === 2) { + return; + } + + this.current_plugin = this.plugin_count; + this.target = target; + + this.is_click = true; + this.coords.x_gap = this.$cache.rs.offset().left; + this.coords.x_pointer = +(x - this.coords.x_gap).toFixed(); + + this.force_redraw = true; + this.calc(); + + this.$cache.line.trigger('focus'); + }, + + key: function (target, e) { + if (this.current_plugin !== this.plugin_count || e.altKey || e.ctrlKey || e.shiftKey || e.metaKey) { + return; + } + + switch (e.which) { + case 83: // W + case 65: // A + case 40: // DOWN + case 37: // LEFT + e.preventDefault(); + this.moveByKey(false); + break; + + case 87: // S + case 68: // D + case 38: // UP + case 39: // RIGHT + e.preventDefault(); + this.moveByKey(true); + break; + } + + return true; + }, + + // Move by key beta + // TODO: refactor than have plenty of time + moveByKey: function (right) { + var p = this.coords.p_pointer; + + if (right) { + p += this.options.keyboard_step; + } else { + p -= this.options.keyboard_step; + } + + this.coords.x_pointer = this.toFixed(this.coords.w_rs / 100 * p); + this.is_key = true; + this.calc(); + }, + + setMinMax: function () { + if (!this.options) { + return; + } + + if (this.options.hide_min_max) { + this.$cache.min[0].style.display = 'none'; + this.$cache.max[0].style.display = 'none'; + return; + } + + if (this.options.values.length) { + this.$cache.min.html(this.decorate(this.options.labels[this.options.min])); + this.$cache.max.html(this.decorate(this.options.labels[this.options.max])); + } else { + this.$cache.min.html(this.decorate(this._prettify(this.options.min), this.options.min)); + this.$cache.max.html(this.decorate(this._prettify(this.options.max), this.options.max)); + } + + this.labels.w_min = this.$cache.min.outerWidth(false); + this.labels.w_max = this.$cache.max.outerWidth(false); + }, + + + + // ============================================================================================================= + // Calculations + + calc: function (update) { + if (!this.options) { + return; + } + + this.calc_count++; + + if (this.calc_count === 10 || update) { + this.calc_count = 0; + this.coords.w_rs = this.$cache.rs.outerWidth(false); + if (this.options.type === 'single') { + this.coords.w_handle = this.$cache.s_single.outerWidth(false); + } else { + this.coords.w_handle = this.$cache.s_from.outerWidth(false); + } + } + + if (!this.coords.w_rs) { + return; + } + + this.calcPointer(); + + this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100); + var real_width = 100 - this.coords.p_handle, + real_x = this.toFixed(this.coords.p_pointer - this.coords.p_gap); + + if (this.target === 'click') { + real_x = this.toFixed(this.coords.p_pointer - (this.coords.p_handle / 2)); + this.target = this.chooseHandle(real_x); + } + + if (real_x < 0) { + real_x = 0; + } else if (real_x > real_width) { + real_x = real_width; + } + + switch (this.target) { + case 'base': + var w = (this.options.max - this.options.min) / 100, + f = (this.result.from - this.options.min) / w, + t = (this.result.to - this.options.min) / w; + + this.coords.p_single_real = this.toFixed(f); + this.coords.p_from_real = this.toFixed(f); + this.coords.p_to_real = this.toFixed(t); + + this.coords.p_single_real = this.checkDiapason(this.coords.p_single_real, this.options.from_min, this.options.from_max); + this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max); + this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max); + + this.coords.p_single = this.toFixed(f - (this.coords.p_handle / 100 * f)); + this.coords.p_from = this.toFixed(f - (this.coords.p_handle / 100 * f)); + this.coords.p_to = this.toFixed(t - (this.coords.p_handle / 100 * t)); + + this.target = null; + + break; + + case 'single': + if (this.options.from_fixed) { + break; + } + + this.coords.p_single_real = this.calcWithStep(real_x / real_width * 100); + this.coords.p_single_real = this.checkDiapason(this.coords.p_single_real, this.options.from_min, this.options.from_max); + this.coords.p_single = this.toFixed(this.coords.p_single_real / 100 * real_width); + + break; + + case 'from': + if (this.options.from_fixed) { + break; + } + + this.coords.p_from_real = this.calcWithStep(real_x / real_width * 100); + if (this.coords.p_from_real > this.coords.p_to_real) { + this.coords.p_from_real = this.coords.p_to_real; + } + this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max); + this.coords.p_from_real = this.checkMinInterval(this.coords.p_from_real, this.coords.p_to_real, 'from'); + this.coords.p_from_real = this.checkMaxInterval(this.coords.p_from_real, this.coords.p_to_real, 'from'); + this.coords.p_from = this.toFixed(this.coords.p_from_real / 100 * real_width); + + break; + + case 'to': + if (this.options.to_fixed) { + break; + } + + this.coords.p_to_real = this.calcWithStep(real_x / real_width * 100); + if (this.coords.p_to_real < this.coords.p_from_real) { + this.coords.p_to_real = this.coords.p_from_real; + } + this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max); + this.coords.p_to_real = this.checkMinInterval(this.coords.p_to_real, this.coords.p_from_real, 'to'); + this.coords.p_to_real = this.checkMaxInterval(this.coords.p_to_real, this.coords.p_from_real, 'to'); + this.coords.p_to = this.toFixed(this.coords.p_to_real / 100 * real_width); + + break; + + case 'both': + real_x = this.toFixed(real_x + (this.coords.p_handle * 0.1)); + + this.coords.p_from_real = this.calcWithStep((real_x - this.coords.p_gap_left) / real_width * 100); + this.coords.p_from_real = this.checkDiapason(this.coords.p_from_real, this.options.from_min, this.options.from_max); + this.coords.p_from_real = this.checkMinInterval(this.coords.p_from_real, this.coords.p_to_real, 'from'); + this.coords.p_from = this.toFixed(this.coords.p_from_real / 100 * real_width); + + this.coords.p_to_real = this.calcWithStep((real_x + this.coords.p_gap_right) / real_width * 100); + this.coords.p_to_real = this.checkDiapason(this.coords.p_to_real, this.options.to_min, this.options.to_max); + this.coords.p_to_real = this.checkMinInterval(this.coords.p_to_real, this.coords.p_from_real, 'to'); + this.coords.p_to = this.toFixed(this.coords.p_to_real / 100 * real_width); + + break; + } + + if (this.options.type === 'single') { + this.coords.p_bar_x = (this.coords.p_handle / 2); + this.coords.p_bar_w = this.coords.p_single; + + this.result.from_percent = this.coords.p_single_real; + this.result.from = this.calcReal(this.coords.p_single_real); + if (this.options.values.length) { + this.result.from_value = this.options.values[this.result.from]; + } + } else { + this.coords.p_bar_x = this.toFixed(this.coords.p_from + (this.coords.p_handle / 2)); + this.coords.p_bar_w = this.toFixed(this.coords.p_to - this.coords.p_from); + + this.result.from_percent = this.coords.p_from_real; + this.result.from = this.calcReal(this.coords.p_from_real); + this.result.to_percent = this.coords.p_to_real; + this.result.to = this.calcReal(this.coords.p_to_real); + if (this.options.values.length) { + this.result.from_value = this.options.values[this.result.from]; + this.result.to_value = this.options.values[this.result.to]; + } + } + + this.calcMinMax(); + this.calcLabels(); + }, + + calcPointer: function () { + if (!this.coords.w_rs) { + this.coords.p_pointer = 0; + return; + } + + if (this.coords.x_pointer < 0 || isNaN(this.coords.x_pointer) ) { + this.coords.x_pointer = 0; + } else if (this.coords.x_pointer > this.coords.w_rs) { + this.coords.x_pointer = this.coords.w_rs; + } + + this.coords.p_pointer = this.toFixed(this.coords.x_pointer / this.coords.w_rs * 100); + }, + + chooseHandle: function (real_x) { + if (this.options.type === 'single') { + return 'single'; + } else { + var m_point = this.coords.p_from_real + ((this.coords.p_to_real - this.coords.p_from_real) / 2); + if (real_x >= m_point) { + return 'to'; + } else { + return 'from'; + } + } + }, + + calcMinMax: function () { + if (!this.coords.w_rs) { + return; + } + + this.labels.p_min = this.labels.w_min / this.coords.w_rs * 100; + this.labels.p_max = this.labels.w_max / this.coords.w_rs * 100; + }, + + calcLabels: function () { + if (!this.coords.w_rs || this.options.hide_from_to) { + return; + } + + if (this.options.type === 'single') { + + this.labels.w_single = this.$cache.single.outerWidth(false); + this.labels.p_single = this.labels.w_single / this.coords.w_rs * 100; + this.labels.p_single_left = this.coords.p_single + (this.coords.p_handle / 2) - (this.labels.p_single / 2); + this.labels.p_single_left = this.checkEdges(this.labels.p_single_left, this.labels.p_single); + + } else { + + this.labels.w_from = this.$cache.from.outerWidth(false); + this.labels.p_from = this.labels.w_from / this.coords.w_rs * 100; + this.labels.p_from_left = this.coords.p_from + (this.coords.p_handle / 2) - (this.labels.p_from / 2); + this.labels.p_from_left = this.toFixed(this.labels.p_from_left); + this.labels.p_from_left = this.checkEdges(this.labels.p_from_left, this.labels.p_from); + + this.labels.w_to = this.$cache.to.outerWidth(false); + this.labels.p_to = this.labels.w_to / this.coords.w_rs * 100; + this.labels.p_to_left = this.coords.p_to + (this.coords.p_handle / 2) - (this.labels.p_to / 2); + this.labels.p_to_left = this.toFixed(this.labels.p_to_left); + this.labels.p_to_left = this.checkEdges(this.labels.p_to_left, this.labels.p_to); + + this.labels.w_single = this.$cache.single.outerWidth(false); + this.labels.p_single = this.labels.w_single / this.coords.w_rs * 100; + this.labels.p_single_left = ((this.labels.p_from_left + this.labels.p_to_left + this.labels.p_to) / 2) - (this.labels.p_single / 2); + this.labels.p_single_left = this.toFixed(this.labels.p_single_left); + this.labels.p_single_left = this.checkEdges(this.labels.p_single_left, this.labels.p_single); + + } + }, + + + + // ============================================================================================================= + // Drawings + + updateScene: function () { + if (!this.options) { + return; + } + + this.drawHandles(); + + this.raf_id = requestAnimationFrame(this.updateScene.bind(this)); + }, + + drawRings: function () { + if (!this.options.rings) { + return; + } + + $('.irs-rings').remove('.irs-ring'); + + var i = 0, + w_diff = 0, + p_diff = 0, + w_ring = 0, + p_ring = 0, + f_ring = 0, + html = '', + num_rings = Math.round(this.coords.p_single_real / this.coords.p_step); + + for (i = num_rings; i > 0; i--) { + w_diff = 4 * i - 2; + p_diff = this.toFixed(((w_diff + 2) / 2) / this.coords.w_rs * 100); + w_ring = this.coords.w_handle + w_diff; + p_ring = this.coords.p_single - p_diff; + f_ring = i * 100; + + html += ''; + } + + this.$cache.rings.html(html); + this.$cache.ring = this.$cache.cont.find('.irs-ring'); + this.$cache.ring.on('touchstart.irs_' + this.plugin_count, this.pointerDown.bind(this, 'single')); + this.$cache.ring.on('mousedown.irs_' + this.plugin_count, this.pointerDown.bind(this, 'single')); + + var $rings = this.$cache.ring; + $rings.each(function() { + var $element = $(this); + $element.css('left', $(this).data('left')); + $element.css('width', $(this).data('width')); + $element.css('height', $(this).data('width')); + $element.css('border-radius', $(this).data('width')); + $element.css('display', 'none'); + }); + + function animateRings() { + $rings.each(function() { + var $element = $(this); + var fade = $element.data('fade'); + $element.delay(fade).fadeIn(500).fadeOut(500); + }); + } + animateRings(); + setInterval(animateRings, 2000); + }, + + drawHandles: function () { + this.coords.w_rs = this.$cache.rs.outerWidth(false); + + if (!this.coords.w_rs) { + return; + } + + if (this.coords.w_rs !== this.coords.w_rs_old) { + this.target = 'base'; + this.is_resize = true; + } + + if (this.coords.w_rs !== this.coords.w_rs_old || this.force_redraw) { + this.setMinMax(); + this.calc(true); + this.drawLabels(); + if (this.options.grid) { + this.calcGridMargin(); + this.calcGridLabels(); + } + this.force_redraw = true; + this.coords.w_rs_old = this.coords.w_rs; + this.drawShadow(); + } + + if (!this.coords.w_rs) { + return; + } + + if (!this.dragging && !this.force_redraw && !this.is_key) { + return; + } + + if (this.old_from !== this.result.from || this.old_to !== this.result.to || this.force_redraw || this.is_key) { + this.drawLabels(); + this.redrawDivots(); + this.drawRings(); + + this.$cache.bar[0].style.left = this.coords.p_bar_x + '%'; + this.$cache.bar[0].style.width = this.coords.p_bar_w + '%'; + + if (this.options.type === 'single') { + this.$cache.s_single[0].style.left = this.coords.p_single + '%'; + + this.$cache.single[0].style.left = this.labels.p_single_left + '%'; + + if (this.options.values.length) { + this.$cache.input.prop('value', this.result.from_value); + this.$cache.input.data('from', this.result.from_value); + } else { + this.$cache.input.prop('value', this.result.from); + this.$cache.input.data('from', this.result.from); + } + } else { + this.$cache.s_from[0].style.left = this.coords.p_from + '%'; + this.$cache.s_to[0].style.left = this.coords.p_to + '%'; + + if (this.old_from !== this.result.from || this.force_redraw) { + this.$cache.from[0].style.left = this.labels.p_from_left + '%'; + } + if (this.old_to !== this.result.to || this.force_redraw) { + this.$cache.to[0].style.left = this.labels.p_to_left + '%'; + } + + this.$cache.single[0].style.left = this.labels.p_single_left + '%'; + + if (this.options.values.length) { + this.$cache.input.prop('value', this.result.from_value + ';' + this.result.to_value); + this.$cache.input.data('from', this.result.from_value); + this.$cache.input.data('to', this.result.to_value); + } else { + this.$cache.input.prop('value', this.result.from + ';' + this.result.to); + this.$cache.input.data('from', this.result.from); + this.$cache.input.data('to', this.result.to); + } + } + + if ((this.old_from !== this.result.from || this.old_to !== this.result.to) && !this.is_start) { + this.$cache.input.trigger('change'); + } + + this.old_from = this.result.from; + this.old_to = this.result.to; + + var is_function = this.options.onChange && typeof this.options.onChange === 'function' && !this.is_resize; + if (is_function && !this.is_update && !this.is_start) { + this.options.onChange(this.result); + } + + var is_finish = this.options.onFinish && typeof this.options.onFinish === 'function'; + if (is_finish && (this.is_key || this.is_click)) { + this.options.onFinish(this.result); + } + + this.is_update = false; + this.is_resize = false; + } + + this.is_start = false; + this.is_key = false; + this.is_click = false; + this.force_redraw = false; + }, + + drawLabels: function () { + if (!this.options) { + return; + } + + var values_num = this.options.values.length, + labels = this.options.labels, + text_single, + text_from, + text_to; + + if (this.options.hide_from_to) { + return; + } + + if (this.options.type === 'single') { + + if (values_num) { + text_single = this.decorate(labels[this.result.from]); + this.$cache.single.html(text_single); + } else { + text_single = this.decorate(this._prettify(this.result.from), this.result.from); + this.$cache.single.html(text_single); + } + + this.calcLabels(); + + if (this.labels.p_single_left < this.labels.p_min + 1) { + this.$cache.min[0].style.visibility = 'hidden'; + } else { + this.$cache.min[0].style.visibility = 'visible'; + } + + if (this.labels.p_single_left + this.labels.p_single > 100 - this.labels.p_max - 1) { + this.$cache.max[0].style.visibility = 'hidden'; + } else { + this.$cache.max[0].style.visibility = 'visible'; + } + + } else { + + if (values_num) { + + if (this.options.decorate_both) { + text_single = this.decorate(labels[this.result.from]); + text_single += this.options.values_separator; + text_single += this.decorate(labels[this.result.to]); + } else { + text_single = this.decorate(labels[this.result.from] + this.options.values_separator + labels[this.result.to]); + } + text_from = this.decorate(labels[this.result.from]); + text_to = this.decorate(labels[this.result.to]); + + this.$cache.single.html(text_single); + this.$cache.from.html(text_from); + this.$cache.to.html(text_to); + + } else { + + if (this.options.decorate_both) { + text_single = this.decorate(this._prettify(this.result.from)); + text_single += this.options.values_separator; + text_single += this.decorate(this._prettify(this.result.to)); + } else { + text_single = this.decorate(this._prettify(this.result.from) + this.options.values_separator + this._prettify(this.result.to), this.result.from); + } + text_from = this.decorate(this._prettify(this.result.from), this.result.from); + text_to = this.decorate(this._prettify(this.result.to), this.result.to); + + this.$cache.single.html(text_single); + this.$cache.from.html(text_from); + this.$cache.to.html(text_to); + + } + + this.calcLabels(); + + var min = Math.min(this.labels.p_single_left, this.labels.p_from_left), + single_left = this.labels.p_single_left + this.labels.p_single, + to_left = this.labels.p_to_left + this.labels.p_to, + max = Math.max(single_left, to_left); + + if (this.labels.p_from_left + this.labels.p_from >= this.labels.p_to_left) { + this.$cache.from[0].style.visibility = 'hidden'; + this.$cache.to[0].style.visibility = 'hidden'; + this.$cache.single[0].style.visibility = 'visible'; + + if (this.result.from === this.result.to) { + this.$cache.from[0].style.visibility = 'visible'; + this.$cache.single[0].style.visibility = 'hidden'; + max = to_left; + } else { + this.$cache.from[0].style.visibility = 'hidden'; + this.$cache.single[0].style.visibility = 'visible'; + max = Math.max(single_left, to_left); + } + } else { + this.$cache.from[0].style.visibility = 'visible'; + this.$cache.to[0].style.visibility = 'visible'; + this.$cache.single[0].style.visibility = 'hidden'; + } + + if (min < this.labels.p_min + 1) { + this.$cache.min[0].style.visibility = 'hidden'; + } else { + this.$cache.min[0].style.visibility = 'visible'; + } + + if (max > 100 - this.labels.p_max - 1) { + this.$cache.max[0].style.visibility = 'hidden'; + } else { + this.$cache.max[0].style.visibility = 'visible'; + } + + } + }, + + drawShadow: function () { + var o = this.options, + c = this.$cache, + + is_from_min = typeof o.from_min === 'number' && !isNaN(o.from_min), + is_from_max = typeof o.from_max === 'number' && !isNaN(o.from_max), + is_to_min = typeof o.to_min === 'number' && !isNaN(o.to_min), + is_to_max = typeof o.to_max === 'number' && !isNaN(o.to_max), + + from_min, + from_max, + to_min, + to_max; + + if (o.type === 'single') { + if (o.from_shadow && (is_from_min || is_from_max)) { + from_min = this.calcPercent(o.from_min || o.min); + from_max = this.calcPercent(o.from_max || o.max) - from_min; + from_min = this.toFixed(from_min - (this.coords.p_handle / 100 * from_min)); + from_max = this.toFixed(from_max - (this.coords.p_handle / 100 * from_max)); + from_min = from_min + (this.coords.p_handle / 2); + + c.shad_single[0].style.display = 'block'; + c.shad_single[0].style.left = from_min + '%'; + c.shad_single[0].style.width = from_max + '%'; + } else { + c.shad_single[0].style.display = 'none'; + } + } else { + if (o.from_shadow && (is_from_min || is_from_max)) { + from_min = this.calcPercent(o.from_min || o.min); + from_max = this.calcPercent(o.from_max || o.max) - from_min; + from_min = this.toFixed(from_min - (this.coords.p_handle / 100 * from_min)); + from_max = this.toFixed(from_max - (this.coords.p_handle / 100 * from_max)); + from_min = from_min + (this.coords.p_handle / 2); + + c.shad_from[0].style.display = 'block'; + c.shad_from[0].style.left = from_min + '%'; + c.shad_from[0].style.width = from_max + '%'; + } else { + c.shad_from[0].style.display = 'none'; + } + + if (o.to_shadow && (is_to_min || is_to_max)) { + to_min = this.calcPercent(o.to_min || o.min); + to_max = this.calcPercent(o.to_max || o.max) - to_min; + to_min = this.toFixed(to_min - (this.coords.p_handle / 100 * to_min)); + to_max = this.toFixed(to_max - (this.coords.p_handle / 100 * to_max)); + to_min = to_min + (this.coords.p_handle / 2); + + c.shad_to[0].style.display = 'block'; + c.shad_to[0].style.left = to_min + '%'; + c.shad_to[0].style.width = to_max + '%'; + } else { + c.shad_to[0].style.display = 'none'; + } + } + }, + + + + // ============================================================================================================= + // Service methods + + toggleInput: function () { + this.$cache.input.toggleClass('irs-hidden-input'); + }, + + calcPercent: function (num) { + var w = (this.options.max - this.options.min) / 100, + percent = (num - this.options.min) / w; + + return this.toFixed(percent); + }, + + calcReal: function (percent) { + var min = this.options.min, + max = this.options.max, + abs = 0; + + if (min < 0) { + abs = Math.abs(min); + min = min + abs; + max = max + abs; + } + + var number = ((max - min) / 100 * percent) + min, + string = this.options.step.toString().split('.')[1]; + + if (string) { + number = +number.toFixed(string.length); + } else { + number = number / this.options.step; + number = number * this.options.step; + number = +number.toFixed(0); + } + + if (abs) { + number -= abs; + } + + if (number < this.options.min) { + number = this.options.min; + } else if (number > this.options.max) { + number = this.options.max; + } + + if (string) { + return +number.toFixed(string.length); + } else { + return this.toFixed(number); + } + }, + + calcWithStep: function (percent) { + var rounded = Math.round(percent / this.coords.p_step) * this.coords.p_step; + + if (rounded > 100) { + rounded = 100; + } + if (percent === 100) { + rounded = 100; + } + + return this.toFixed(rounded); + }, + + checkMinInterval: function (p_current, p_next, type) { + var o = this.options, + current, + next; + + if (!o.min_interval) { + return p_current; + } + + current = this.calcReal(p_current); + next = this.calcReal(p_next); + + if (type === 'from') { + + if (next - current < o.min_interval) { + current = next - o.min_interval; + } + + } else { + + if (current - next < o.min_interval) { + current = next + o.min_interval; + } + + } + + return this.calcPercent(current); + }, + + checkMaxInterval: function (p_current, p_next, type) { + var o = this.options, + current, + next; + + if (!o.max_interval) { + return p_current; + } + + current = this.calcReal(p_current); + next = this.calcReal(p_next); + + if (type === 'from') { + + if (next - current > o.max_interval) { + current = next - o.max_interval; + } + + } else { + + if (current - next > o.max_interval) { + current = next + o.max_interval; + } + + } + + return this.calcPercent(current); + }, + + checkDiapason: function (p_num, min, max) { + var num = this.calcReal(p_num), + o = this.options; + + if (!min || typeof min !== 'number') { + min = o.min; + } + + if (!max || typeof max !== 'number') { + max = o.max; + } + + if (num < min) { + num = min; + } + + if (num > max) { + num = max; + } + + return this.calcPercent(num); + }, + + toFixed: function (num) { + num = num.toFixed(5); + return +num; + }, + + _prettify: function (num) { + if (!this.options.prettify_enabled) { + return num; + } + + if (this.options.prettify && typeof this.options.prettify === 'function') { + return this.options.prettify(num); + } else { + return this.prettify(num); + } + }, + + prettify: function (num) { + var n = num.toString(); + return n.replace(/(\d{1,3}(?=(?:\d\d\d)+(?!\d)))/g, '$1' + this.options.prettify_separator); + }, + + checkEdges: function (left, width) { + if (!this.options.force_edges) { + return this.toFixed(left); + } + + if (left < 0) { + left = 0; + } else if (left > 100 - width) { + left = 100 - width; + } + + return this.toFixed(left); + }, + + validate: function () { + var o = this.options, + r = this.result, + v = o.values, + vl = v.length, + value, + i; + + if (typeof o.min === 'string') { + o.min = +o.min; + } + if (typeof o.max === 'string') { + o.max = +o.max; + } + if (typeof o.from === 'string') { + o.from = +o.from; + } + if (typeof o.to === 'string') { + o.to = +o.to; + } + if (typeof o.step === 'string') { + o.step = +o.step; + } + + if (typeof o.from_min === 'string') { + o.from_min = +o.from_min; + } + if (typeof o.from_max === 'string') { + o.from_max = +o.from_max; + } + if (typeof o.to_min === 'string') { + o.to_min = +o.to_min; + } + if (typeof o.to_max === 'string') { + o.to_max = +o.to_max; + } + + if (typeof o.keyboard_step === 'string') { + o.keyboard_step = +o.keyboard_step; + } + if (typeof o.grid_num === 'string') { + o.grid_num = +o.grid_num; + } + + if (o.max <= o.min) { + if (o.min) { + o.max = o.min * 2; + } else { + o.max = o.min + 1; + } + o.step = 1; + } + + if (vl) { + o.min = 0; + o.max = vl - 1; + o.step = 1; + o.grid_num = o.max; + o.grid_snap = true; + + if (!o.labels.length) { + for (i = 0; i < vl; i++) { + value = +v[i]; + + if (!isNaN(value)) { + v[i] = value; + value = this._prettify(value); + } else { + value = v[i]; + } + + o.labels.push(value); + } + } + } + + if (typeof o.from !== 'number' || isNaN(o.from)) { + o.from = o.min; + } + + if (typeof o.to !== 'number' || isNaN(o.from)) { + o.to = o.max; + } + + if (o.from < o.min || o.from > o.max) { + o.from = o.min; + } + + if (o.to > o.max || o.to < o.min) { + o.to = o.max; + } + + if (o.type === 'double' && o.from > o.to) { + o.from = o.to; + } + + if (typeof o.step !== 'number' || isNaN(o.step) || !o.step || o.step < 0) { + o.step = 1; + } + + if (typeof o.keyboard_step !== 'number' || isNaN(o.keyboard_step) || !o.keyboard_step || o.keyboard_step < 0) { + o.keyboard_step = 5; + } + + if (o.from_min && o.from < o.from_min) { + o.from = o.from_min; + } + + if (o.from_max && o.from > o.from_max) { + o.from = o.from_max; + } + + if (o.to_min && o.to < o.to_min) { + o.to = o.to_min; + } + + if (o.to_max && o.from > o.to_max) { + o.to = o.to_max; + } + + if (r) { + if (r.min !== o.min) { + r.min = o.min; + } + + if (r.max !== o.max) { + r.max = o.max; + } + + if (r.from < r.min || r.from > r.max) { + r.from = o.from; + } + + if (r.to < r.min || r.to > r.max) { + r.to = o.to; + } + } + + if (typeof o.min_interval !== 'number' || isNaN(o.min_interval) || !o.min_interval || o.min_interval < 0) { + o.min_interval = 0; + } + + if (typeof o.max_interval !== 'number' || isNaN(o.max_interval) || !o.max_interval || o.max_interval < 0) { + o.max_interval = 0; + } + + if (o.min_interval && o.min_interval > o.max - o.min) { + o.min_interval = o.max - o.min; + } + + if (o.max_interval && o.max_interval > o.max - o.min) { + o.max_interval = o.max - o.min; + } + }, + + decorate: function (num, original) { + var decorated = '', + o = this.options; + + if (o.prefix) { + decorated += o.prefix; + } + + decorated += num; + + if (o.max_postfix) { + if (o.values.length && num === o.labels[o.max]) { + decorated += o.max_postfix; + if (o.postfix) { + decorated += ' '; + } + } else if (original === o.max) { + decorated += o.max_postfix; + if (o.postfix) { + decorated += ' '; + } + } + } + + if (o.postfix) { + decorated += o.postfix; + } + + return decorated; + }, + + updateFrom: function () { + this.result.from = this.options.from; + this.result.from_percent = this.calcPercent(this.result.from); + if (this.options.values) { + this.result.from_value = this.options.values[this.result.from]; + } + }, + + updateTo: function () { + this.result.to = this.options.to; + this.result.to_percent = this.calcPercent(this.result.to); + if (this.options.values) { + this.result.to_value = this.options.values[this.result.to]; + } + }, + + updateResult: function () { + this.result.min = this.options.min; + this.result.max = this.options.max; + this.updateFrom(); + this.updateTo(); + }, + + + + // ============================================================================================================= + // Divots + + appendDivots: function () { + if (!this.options.divots) { + return; + } + + var o = this.options, + i, + + total = o.max - o.min, + big_num = total / o.step, + p_single_real = 0, + p_single = 0, + + html = ''; + + this.calcDivotsMargin(); + var real_width = 100 - this.coords.p_handle; + + for (i = 0; i < big_num + 1; i++) { + + p_single_real = this.calcWithStep(i / big_num * 100); + p_single_real = this.checkDiapason(p_single_real, this.options.from_min, this.options.from_max); + p_single = this.toFixed(p_single_real / 100 * real_width); + + html += ''; + } + + this.$cache.divots.html(html); + this.$cache.divot = this.$cache.cont.find('.irs-divot'); + this.$cache.divot.on('touchstart.irs_' + this.plugin_count, this.pointerClick.bind(this, 'click')); + this.$cache.divot.on('mousedown.irs_' + this.plugin_count, this.pointerClick.bind(this, 'click')); + + this.$cache.divot.each(function() { + $(this).css('left', $(this).data('left')); + }); + }, + + calcDivotsMargin: function () { + this.coords.w_rs = this.$cache.rs.outerWidth(false); + if (!this.coords.w_rs) { + return; + } + + if (this.options.type === 'single') { + this.coords.w_handle = this.$cache.s_single.outerWidth(false); + } else { + this.coords.w_handle = this.$cache.s_from.outerWidth(false); + } + this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100); + }, + + redrawDivots: function () { + this.$cache.divots.remove('.irs-divot'); + this.appendDivots(); + }, + + + + // ============================================================================================================= + // Grid + + appendGrid: function () { + if (!this.options.grid) { + return; + } + + var o = this.options, + i, z, + + total = o.max - o.min, + big_num = o.grid_num, + big_p = 0, + big_w = 0, + + small_max = 4, + local_small_max, + small_p, + small_w = 0, + + result, + html = ''; + + this.calcGridMargin(); + + if (o.grid_snap) { + big_num = total / o.step; + big_p = this.toFixed(o.step / (total / 100)); + } else { + big_p = this.toFixed(100 / big_num); + } + + if (big_num > 4) { + small_max = 3; + } + if (big_num > 7) { + small_max = 2; + } + if (big_num > 14) { + small_max = 1; + } + if (big_num > 28) { + small_max = 0; + } + + for (i = 0; i < big_num + 1; i++) { + local_small_max = small_max; + + big_w = this.toFixed(big_p * i); + if (big_w > 100) { + big_w = 100; + + local_small_max -= 2; + if (local_small_max < 0) { + local_small_max = 0; + } + } + this.coords.big[i] = big_w; + + small_p = (big_w - (big_p * (i - 1))) / (local_small_max + 1); + + for (z = 1; z <= local_small_max; z++) { + if (big_w === 0) { + break; + } + + small_w = this.toFixed(big_w - (small_p * z)); + + html += ''; + } + + html += ''; + + result = this.calcReal(big_w); + if (o.values.length) { + result = o.labels[result]; + } else { + result = this._prettify(result); + } + + html += '' + result + ''; + } + this.coords.big_num = Math.ceil(big_num + 1); + + this.$cache.cont.addClass('irs-with-grid'); + this.$cache.grid.html(html); + + $('.irs-grid-pol').each(function() { + $(this).css('left', $(this).data('left')); + }); + $('.irs-grid-text').each(function() { + $(this).css('left', $(this).data('left')); + }); + + this.cacheGridLabels(); + }, + + cacheGridLabels: function () { + var $label, i, + num = this.coords.big_num; + + for (i = 0; i < num; i++) { + $label = this.$cache.grid.find('.js-grid-text-' + i); + this.$cache.grid_labels.push($label); + } + + this.calcGridLabels(); + }, + + calcGridLabels: function () { + var i, label, start = [], finish = [], + num = this.coords.big_num; + + for (i = 0; i < num; i++) { + this.coords.big_w[i] = this.$cache.grid_labels[i].outerWidth(false); + this.coords.big_p[i] = this.toFixed(this.coords.big_w[i] / this.coords.w_rs * 100); + this.coords.big_x[i] = this.toFixed(this.coords.big_p[i] / 2); + + start[i] = this.toFixed(this.coords.big[i] - this.coords.big_x[i]); + finish[i] = this.toFixed(start[i] + this.coords.big_p[i]); + } + + if (this.options.force_edges) { + if (start[0] < this.coords.grid_gap) { + start[0] = this.coords.grid_gap; + finish[0] = this.toFixed(start[0] + this.coords.big_p[0]); + + this.coords.big_x[0] = this.coords.grid_gap; + } + + if (finish[num - 1] > 100 - this.coords.grid_gap) { + finish[num - 1] = 100 - this.coords.grid_gap; + start[num - 1] = this.toFixed(finish[num - 1] - this.coords.big_p[num - 1]); + + this.coords.big_x[num - 1] = this.toFixed(this.coords.big_p[num - 1] - this.coords.grid_gap); + } + } + + this.calcGridCollision(2, start, finish); + this.calcGridCollision(4, start, finish); + + for (i = 0; i < num; i++) { + label = this.$cache.grid_labels[i][0]; + label.style.marginLeft = -this.coords.big_x[i] + '%'; + } + }, + + // Collisions Calc Beta + // TODO: Refactor then have plenty of time + calcGridCollision: function (step, start, finish) { + var i, next_i, label, + num = this.coords.big_num; + + for (i = 0; i < num; i += step) { + next_i = i + (step / 2); + if (next_i >= num) { + break; + } + + label = this.$cache.grid_labels[next_i][0]; + + if (finish[i] <= start[next_i]) { + label.style.visibility = 'visible'; + } else { + label.style.visibility = 'hidden'; + } + } + }, + + calcGridMargin: function () { + if (!this.options.grid_margin) { + return; + } + + this.coords.w_rs = this.$cache.rs.outerWidth(false); + if (!this.coords.w_rs) { + return; + } + + if (this.options.type === 'single') { + this.coords.w_handle = this.$cache.s_single.outerWidth(false); + } else { + this.coords.w_handle = this.$cache.s_from.outerWidth(false); + } + this.coords.p_handle = this.toFixed(this.coords.w_handle / this.coords.w_rs * 100); + this.coords.grid_gap = this.toFixed((this.coords.p_handle / 2) - 0.1); + + this.$cache.grid[0].style.width = this.toFixed(100 - this.coords.p_handle) + '%'; + this.$cache.grid[0].style.left = this.coords.grid_gap + '%'; + }, + + + + // ============================================================================================================= + // Public methods + + update: function (options) { + if (!this.input) { + return; + } + + this.is_update = true; + + this.options.from = this.result.from; + this.options.to = this.result.to; + + this.options = $.extend(this.options, options); + this.validate(); + this.updateResult(options); + + this.toggleInput(); + this.remove(); + this.init(true); + }, + + reset: function () { + if (!this.input) { + return; + } + + this.updateResult(); + this.update(); + }, + + destroy: function () { + if (!this.input) { + return; + } + + this.toggleInput(); + this.$cache.input.prop('readonly', false); + $.data(this.input, 'rangeSlider', null); + + this.remove(); + this.input = null; + this.options = null; + } + }; + + $.fn.rangeSlider = function (options) { + return this.each(function() { + if (!$.data(this, 'rangeSlider')) { + $.data(this, 'rangeSlider', new RangeSlider(this, options, plugin_count++)); + } + }); + }; + + + + // ================================================================================================================= + // requestAnimationFrame polyfill by Erik Möller. Fixes from Paul Irish and Tino Zijdel + // + // http://paulirish.com/2011/requestanimationframe-for-smart-animating/ + // http://my.opera.com/emoller/blog/2011/12/20/requestanimationframe-for-smart-er-animating + // MIT license + + (function() { + var lastTime = 0; + var vendors = ['ms', 'moz', 'webkit', 'o']; + for(var x = 0; x < vendors.length && !window.requestAnimationFrame; ++x) { + window.requestAnimationFrame = window[vendors[x]+'RequestAnimationFrame']; + window.cancelAnimationFrame = window[vendors[x]+'CancelAnimationFrame'] + || window[vendors[x]+'CancelRequestAnimationFrame']; + } + + if (!window.requestAnimationFrame) { + window.requestAnimationFrame = function(callback, element) { + var currTime = new Date().getTime(); + var timeToCall = Math.max(0, 16 - (currTime - lastTime)); + var id = window.setTimeout(function() { callback(currTime + timeToCall); }, + timeToCall); + lastTime = currTime + timeToCall; + return id; + }; + } + + if (!window.cancelAnimationFrame) { + window.cancelAnimationFrame = function(id) { + clearTimeout(id); + }; + } + }()); + +}); diff --git a/less/rangeslider.less b/less/rangeslider.less new file mode 100644 index 0000000..c7fdc85 --- /dev/null +++ b/less/rangeslider.less @@ -0,0 +1,163 @@ +@handle-size: 12px; +@slider-top: 70%; +@slider-color: @tw-color-gray-light; +@slider-line-height: 0px; +@label-font-size: 14px; +@label-font-weight: @tw-font-weight-heavy; +@label-line-height: 1.333; + +.irs { + position: relative; + display: block; + height: 55px; + -webkit-touch-callout: none; + user-select: none; + + .irs-line { + position: relative; + display: block; + overflow: hidden; + outline: none; + height: @slider-line-height; + top: @slider-top; + transform: translateY(-50%); + background: @color-white; + border: 1px solid @slider-color; + border-radius: 16px; + + .irs-line-left, .irs-line-mid, .irs-line-right { + position: absolute; + display: block; + top: 0; + height: 8px; + } + .irs-line-left { + left: 0; + width: 11%; + } + .irs-line-mid { + left: 9%; + width: 82%; + } + .irs-line-right { + right: 0; + width: 11%; + } + } + + .irs-bar { + position: absolute; + display: block; + left: 0; + width: 0; + height: @slider-line-height; + top: @slider-top; + transform: translateY(-50%); + border-top: 1px solid @slider-color; + border-bottom: 1px solid @slider-color; + background: @tw-color-blue-primary; + } + + .irs-bar-edge { + position: absolute; + display: block; + height: @slider-line-height; + top: @slider-top; + transform: translateY(-50%); + left: 0; + width: 14px; + border: 1px solid @slider-color; + border-right: 0; + background: @tw-color-blue-primary; + border-radius: 16px 0 0 16px; + } + + .irs-divot { + position: absolute; + display: block; + z-index: 1; + top: @slider-top; + transform: translateY(-50%); + width: @handle-size; + height: @handle-size; + background: @slider-color; + border-radius: @handle-size; + cursor: pointer; + } + + .irs-slider { + position: absolute; + display: block; + z-index: 3; + top: @slider-top; + transform: translateY(-50%); + width: @handle-size; + height: @handle-size; + background: @tw-color-blue-primary; + border-radius: @handle-size; + cursor: pointer; + } + + .irs-ring { + position: absolute; + display: block; + z-index: 2; + top: @slider-top; + transform: translateY(-50%); + background: @color-white; + border: 1px solid @tw-color-blue-primary; + cursor: pointer; + } + + .irs-min, .irs-max { + position: absolute; + display: block; + color: @slider-color; + font-size: @label-font-size; + font-weight: @label-font-weight; + line-height: @label-line-height; + text-shadow: none; + top: 0; + background: none; + cursor: default; + } + .irs-min { + left: 0; + } + .irs-max { + right: 0; + } + + .irs-from, .irs-to, .irs-single { + position: absolute; + display: block; + top: 0; + left: 0; + cursor: default; + white-space: nowrap; + color: @tw-color-blue-primary; + font-size: @label-font-size; + font-weight: @label-font-weight; + line-height: @label-line-height; + text-shadow: none; + background: none; + } +} + +.irs-hidden-input { + position: absolute !important; + display: block !important; + top: 0 !important; + left: 0 !important; + width: 0 !important; + height: 0 !important; + font-size: 0 !important; + line-height: 0 !important; + padding: 0 !important; + margin: 0 !important; + outline: none !important; + z-index: -9999 !important; + background: none !important; + border-style: solid !important; + border-color: transparent !important; +} diff --git a/package.json b/package.json deleted file mode 100644 index 1d7a66a..0000000 --- a/package.json +++ /dev/null @@ -1,61 +0,0 @@ -{ - "name": "ion-rangeslider", - "version": "2.0.6", - "description": "Cool, comfortable and easily customizable range slider with many options and skin support", - "homepage": "http://ionden.com/a/plugins/ion.rangeSlider/en.html", - "author": { - "name": "Denis Ineshin (IonDen)", - "email": "ionden.tech@gmail.com", - "url": "https://github.com/IonDen" - }, - "keywords": [ - "jquery-plugin", - "jquery", - "form", - "input", - "range", - "slider", - "rangeslider", - "interface", - "diapason", - "ui", - "noui", - "skins" - ], - "main": "./js/ion.rangeSlider.js", - "directories": { - "lib": "js" - }, - "repository": { - "type": "git", - "url": "git://github.com/IonDen/ion.rangeSlider.git" - }, - "bugs": { - "url": "https://github.com/IonDen/ion.rangeSlider/issues" - }, - "license": "MIT", - "dependencies": { - "jquery": ">=1.8" - }, - "ignore": [ - ".idea", - "PSD", - "bower.json", - "ion-rangeSlider.jquery.json", - "readme.ru.md" - ], - - "spm": { - "main": "js/ion.rangeSlider.js", - "dependencies": { - "jquery": "1.11.2" - }, - "ignore": [ - ".idea", - "PSD", - "bower.json", - "ion-rangeSlider.jquery.json", - "readme.ru.md" - ] - } -} \ No newline at end of file diff --git a/readme.ru.md b/readme.ru.md deleted file mode 100644 index 7fbe3b9..0000000 --- a/readme.ru.md +++ /dev/null @@ -1,479 +0,0 @@ -# Ion.Range Slider 2.0.6 - -> English description | Описание на русском - -Удобный легкий слайдер диапазонов -* Страница проекта и демо -* Download ion.rangeSlider-2.0.6.zip - -*** - -## Описание -* Ion.RangeSlider — классный, удобный и легко настраиваемый слайдер диапазонов -* Слайдер поддерживает события и публичные методы, имеет гибкие настройки, может быть полностью видоизменен через CSS -* Кроссбраузерная поддержка: Google Chrome, Mozilla Firefox 3.6+, Opera 12+, Safari 5+, Internet Explorer 8+ -* Плагин поддерживает устройства с touch-экраном (iPhone, iPad, Nexus, etc.) -* Репозиторий на GitHub -* Плагин свободно распространяется на условиях лицензии MIT -* Используюя этот плагин, вы сможете создавать крутейшие слайдеры диапазонов, такие как этот: - -![ion.rangeSlider](http://ionden.com/a/plugins/ion.rangeSlider/static/img/ion-range-slider.png) - -## Ключевые особенности -* Поддержка скинов. (5 скина в комплекте и PSD для изготовления собственных) -* Неограниченное кол-во слайдеров на одной странице без существенных потерь производительности и конфликтов между ними -* Два режима работы с 1 или 2 ползунками -* Поддержка отрицательных и дробных значений -* Возможность редактировать шаг и привязывать сетку к шагу -* Можно использовать собственный массив значений для слайдера -* Настраиваемая сетка значений -* Отключаемые элементы интерфейса (мин. и макс. значение, текущие значение, сетка) -* Постфиксы и префиксы для указания единиц измерения ($20, 20 € и т.п.) -* Дополнительный постфикс для максимального значения (например $0 — $100+) -* Воможнось улучшить читабельность больших цифр (например 10000000 -> 10 000 000 или 10.000.000) -* Слайдер пишет свое значение прямо в value исходного поля input, что позволяет вставить сладер прямо внутрь любой формы -* Любой параметр слайдера можно так же задать через data-атрибут (например data-min="10") -* Слайдер поддерживает параметр disabled, позволяет делать слайдер неактивным -* Слайдер поддерживает внешние методы (update, reset и remove), позволяющие управлять слайдером уже после создания -* Для продвинутых пользователей есть поддержка колбэков (onStart, onChange, onFinish, onUpdate). Слайдер передает свои значения в эти функции первым аргументом в виде объекта -* Слайдер поддерживает работу с датой и временем - - -## Демо - -* Базовые настройки -* Расширенные настройки -* Взаимодействия - - -## Зависимости - -* jQuery 1.8.x+ - - -## Использование - -Подключаем библиотеки: -* jQuery -* ion.rangeSlider.min.js - -Подключаем стили: -* normalize.css (желательно, если он у вас еще не подключен) -* ion.rangeSlider.css - -Не забываем про скин. 5 скинов включены в архив. Выберите один: -* ion.rangeSlider.skinFlat.css + sprite-skin-flat.png -* ion.rangeSlider.skinHTML5.css + без картинок -* ion.rangeSlider.skinModern.css + sprite-skin-modern.png -* ion.rangeSlider.skinNice.css + sprite-skin-nice.png -* ion.rangeSlider.skinSimple.css + sprite-skin-simple.png - -Либо воспользуйтесь вложенным в архив PSD файлом, и нарисуйте собственный скин (не забудьте модифицировать размеры элементов в CSS файле) - - -## Устанавливаем с помощью bower - -* bower install ionrangeslider - - -## Устанавливаем с помощью npm - -* npm install ion-rangeslider - - -## Устанавливаем с помощью spm [![](http://spmjs.io/badge/ion-rangeslider)](http://spmjs.io/package/ion-rangeslider) - -* spm install ion-rangeslider - - -## Инициализация - -Создаем базовое поле input type="text": -```html - -``` - -Чтобы запустить слайдер, вызовите ionRangeSlider для нужного элемента: -```javascript -$("#example_id").ionRangeSlider(); -``` - -## Демо для новичков -Если вы новичок в веб разработке и не уверены как правильно подключить этот плагин на вашу страницу, то скачайте вот -этот демо пример - - -## Миграция с версии 1.x на 2.x -* Все параметры (кроме функций) теперь записываются так: param_name, а не paramName -* Изменились названия некоторых параметров: hasGrid → grid, onLoad → onStart -* Изменился формат объекта с данными слайдера, возвращаемый в колбэки. Например: fromNumber → from -* Слайдер теперь постоянно записывает свои значения в поле value и в атрибуты data-from и data-to - - -## Площадка для эксперементов с плагином - - -## Настройка - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
АтрибутПо умолчаниюТипОписание
type
data-type
"single"stringПозволяет выбрать тип слайдера, может принимать значение single - для одиночного слайдера или double - для двойного слайдера
min
data-min
10numberОбозначает минимальное возможное значение слайдера.
max
data-max
100numberОбозначает максимальное возможное значение слайдера.
from
data-from
minnumberПозволяет задать стартовую позицию левого ползунка (или единственного ползунка)
to
data-to
maxnumberПозволяет задать стартовую позицию правого ползунка
step
data-step
1numberЗадает шаг движения ползунков. Всегда больше нуля. Может быть дробным.
min_interval
data-min-interval
numberЗадает минимальный диапазон между ползунками. Только для типа "double"
max_interval
data-max-interval
numberЗадает максимальный диапазон между ползунками. Только для типа "double"
drag_interval
data-drag-interval
falsebooleanРазрешает пользователю перетаскивать весь диапазон. Только для типа "double" (beta)
values
data-values
[]arrayПереопределяет значения слайдера, значениями взятыми из массива values. Параметры min, max, step переопределяются автоматически.
from_fixed
data-from-fixed
falsebooleanФиксирует позицию левого ползунка (или единственного ползунка).
from_min
data-from-min
minnumberОграничивает минимальную позицию левого ползунка.
from_max
data-from-max
maxnumberОграничивает максимальную позицию левого ползунка.
from_shadow
data-from-shadow
falsebooleanПодсвечивает ограничения наложенные на левый ползунок.
to_fixed
data-to-fixed
falsebooleanФиксирует позицию правого ползунка.
to_min
data-to-min
minnumberОграничивает минимальную позицию правого ползунка.
to_max
data-to-max
maxnumberОграничивает максимальную позицию правого ползунка.
to_shadow
data-to-shadow
falsebooleanПодсвечивает ограничения наложенные на правый ползунок.
prettify_enabled
data-prettify-enabled
truebooleanУлучшает внешний вид длинных цифр. 10000000 → 10 000 000
prettify_separator
data-prettify-separator
" "stringПозволяет выбирать разделитель для улучшения читаемости длинных цифр. 10 000, 10.000, 10-000 и т.п.
prettify
nullfunctionСобственная функция для постобработки значений слайдера. Позволяет делать с цифрами всё что угодно, например приобразовывать в даты и время.
force_edges
data-force-edges
falsebooleanЗаставляет слайдер всегда оставаться внутри границ своего контейнера.
keyboard
data-keyboard
falsebooleanАктивирует управление слайдером с помощью клавиатуры. Влево: &larr, &darr, A, S. Вправо: &rarr, &uarr, W, D.
keyboard_step
data-keyboard-step
5numberШаг движения ползунка при управлении с клавиатуры. Задается в процентах.
grid
data-grid
falsebooleanВключает отображение сетки значений.
grid_margin
data-grid-margin
truebooleanВыравнивает сетку по крайним позициям ползунков, либо по границам контейнера.
grid_num
data-grid-num
4numberКоличество ячеек в сетке.
grid_snap
data-grid-snap
falsebooleanПривязка сетки к шагу слайдера (параметр step). Если активирован, то параметр grid_num не учитывается.
hide_min_max
data-hide-min-max
falsebooleanПрячет лейблы "min" и "max"
hide_from_to
data-hide-from-to
falsebooleanПрячет лейблы "from" и "to"
prefix
data-prefix
stringОтобразить префикс для значений слайдера. Будет отображен перед цифрой, например $100.
postfix
data-postfix
stringОтобразить постфикс для значений слайдера. Будет отображен после цифры, например 100 руб.
max_postfix
data-max-postfix
stringОтобразить дополнительный постфикс для максимального значения слайдера. Будет отображен если один из ползунков достигнет крайнего правого значения. Например 0 — 100+
decorate_both
data-decorate-both
truebooleanИспользуется для типа "double", в случае если задан prefix и/или postfix. Определяет, как декорировать близко расположенные значения.
Например: $10k — $100k или же $10 — 100k
values_separator
data-values-separator
" — "stringРазделитель для близко расположенных значений. Используется для типа "double". Например: 10 — 100, 10 to 100, 10 + 100, 10 → 100 и т.д.
disable
data-disable
falsebooleanБлокирует слайдер, делает его не активным.
onStart
nullfunctionКоллбэк. Вызывается при старте слайдера.
onChange
nullfunctionКоллбэк. Вызывается каждый раз когда обновляются значения слайдера.
onFinish
nullfunctionКоллбэк. Вызывается когда пользователь заканчивает перемещать ползунок.
onUpdate
nullfunctionКоллбэк. Вызывается когда слайдер обновляется методом update или reset.
- - -## Описание данных передаваемых в колбэки (onChange и т.д): - -Результат имеет тип object и передается коллбэк первым аргументом: -```javascript -Obj: { - "input": object, // jQuery-ссылка на input - "slider": object, // jQuery-ссылка на контейнер слайдера - "min": 0, // значение MIN - "max": 1000, // значение MAX - "from": 100, // значение ОТ - "from_percent": 10, // значение ОТ в процентах - "from_value": 0, // индекс ОТ массива values (если используется) - "to": 900, // значение ДО - "to_percent": 90, // значение ДО в процентах - "to_value": 0 // индекс ДО массива values (если используется) -} -``` - -## Создание слайдера c параметрами - -Пример -```javascript -$("#example").ionRangeSlider({ - min: 0, - max: 10000, - from: 1000, - to: 9000, - type: 'double', - prefix: "$", - grid: true, - grid_num: 10 -}); -``` - -Слайдер с параметрами можно также инициализировать используя атрибуты data-* у тэга input: -```html -data-min="0" -data-max="10000" -data-from="1000" -data-to="9000" -data-type="double" -data-prefix="$" -data-grid="true" -data-grid-num="10" -``` - -## Публичные методы - -Для того чтобы использовать публичные методы, вначале нужно записать значение слайдера в переменную:: -```javascript -// Запускаем слайдер -$("#range").ionRangeSlider({ - type: "double", - min: 0, - max: 1000, - from: 200, - to: 500, - grid: true -}); - -// Записываем инстанс в переменную -var slider = $("#range").data("ionRangeSlider"); - -// Запускаем публичный метод -slider.reset(); -``` - -Всего существует 3 публичных метода: -```javascript -// UPDATE - обновляет значения слайдера (можно менять любые значения) -slider.update({ - from: 300, - to: 400 -}); - -// RESET - сбрасывает слайдер к исходным значениям -slider.reset(); - -// DESTROY - убивает слайдер и восстанавливает исходный input -slider.destroy(); -``` - -## Еще раз взглянем на демо - -* Базовые настройки -* Расширенные настройки -* Взаимодействия - -В демках есть примеры использования всех опций слайдера - - -## История обновлений - -## Поддержка -[![](https://pledgie.com/campaigns/25694.png?skin_name=chrome)](https://pledgie.com/campaigns/25694) \ No newline at end of file