diff --git a/fd-slider-rails.gemspec b/fd-slider-rails.gemspec index 387d617..a71a843 100644 --- a/fd-slider-rails.gemspec +++ b/fd-slider-rails.gemspec @@ -7,16 +7,16 @@ require "fd-slider-rails/version" Gem::Specification.new do |s| s.name = "fd-slider-rails" s.version = FdSliderRails::VERSION - s.authors = ["TODO: Your name"] - s.email = ["TODO: Your email"] + s.authors = ["Marten Veldthuis"] + s.email = ["marten@veldthuis.com"] s.homepage = "TODO" - s.summary = "TODO: Summary of FdSliderRails." + s.summary = "Rails Engine version of the fd-slider JavaScript" s.description = "TODO: Description of FdSliderRails." s.files = Dir["{app,config,db,lib}/**/*"] + ["MIT-LICENSE", "Rakefile", "README.rdoc"] s.test_files = Dir["test/**/*"] - s.add_dependency "rails", "~> 3.2.2" + s.add_dependency "rails", "~> 3.1" # s.add_dependency "jquery-rails" s.add_development_dependency "sqlite3" diff --git a/vendor/assets/images/blank.gif b/vendor/assets/images/blank.gif new file mode 100644 index 0000000..2ee74b3 Binary files /dev/null and b/vendor/assets/images/blank.gif differ diff --git a/vendor/assets/images/fd-slider/fd-handle-disabled.png b/vendor/assets/images/fd-slider/fd-handle-disabled.png new file mode 100644 index 0000000..a7a56b3 Binary files /dev/null and b/vendor/assets/images/fd-slider/fd-handle-disabled.png differ diff --git a/vendor/assets/images/fd-slider/fd-handle-glow.png b/vendor/assets/images/fd-slider/fd-handle-glow.png new file mode 100644 index 0000000..d1ed77c Binary files /dev/null and b/vendor/assets/images/fd-slider/fd-handle-glow.png differ diff --git a/vendor/assets/images/fd-slider/fd-handle-no-value.png b/vendor/assets/images/fd-slider/fd-handle-no-value.png new file mode 100644 index 0000000..4c01667 Binary files /dev/null and b/vendor/assets/images/fd-slider/fd-handle-no-value.png differ diff --git a/vendor/assets/images/fd-slider/fd-handle-normal.png b/vendor/assets/images/fd-slider/fd-handle-normal.png new file mode 100644 index 0000000..0ddcd89 Binary files /dev/null and b/vendor/assets/images/fd-slider/fd-handle-normal.png differ diff --git a/vendor/assets/images/fd-slider/fd-slider-sprite.png b/vendor/assets/images/fd-slider/fd-slider-sprite.png new file mode 100644 index 0000000..49887aa Binary files /dev/null and b/vendor/assets/images/fd-slider/fd-slider-sprite.png differ diff --git a/vendor/assets/javascripts/fd-slider.min.js b/vendor/assets/javascripts/fd-slider.min.js new file mode 100644 index 0000000..553df74 --- /dev/null +++ b/vendor/assets/javascripts/fd-slider.min.js @@ -0,0 +1,26 @@ +/*! Unobtrusive Slider Control / HTML5 Input Range polyfill - MIT/GPL2 @freqdec */ +var fdSlider=(function(){var sliders={},uniqueid=0,mouseWheelEnabled=true,fullARIA=true,describedBy="fd-slider-describedby",varSetRules={onfocus:true,onvalue:true},noRangeBar=false,html5Animation="jump",isOpera=Object.prototype.toString.call(window.opera)==="[object Opera]",fpRegExp=/^([-]{0,1}[0-9]+(\.[0-9]+){0,1})$/,stepRegExp=/^([0-9]+(\.[0-9]+){0,1})$/;var parseJSON=function(str){if(typeof str!=="string"||str==""){return{}}try{if(typeof JSON==="object"&&typeof(JSON.parse)==="function"){return JSON.parse(str)}else{if(/mousewheelenabled|fullaria|describedby|norangebar|html5animation|varsetrules/.test(str.toLowerCase())){var f=Function(["var document,top,self,window,parent,Number,Date,Object,Function,","Array,String,Math,RegExp,Image,ActiveXObject;","return (",str.replace(/<\!--.+-->/gim,"").replace(/\bfunction\b/g,"function-"),");"].join(""));return f()}}}catch(e){}return{err:"Could not parse the JSON object"}};var affectJSON=function(json){if(typeof json!=="object"){return}for(key in json){value=json[key];switch(key.toLowerCase()){case"mousewheelenabled":mouseWheelEnabled=!!value;break;case"fullaria":fullARIA=!!value;break;case"describedby":describedBy=String(value);break;case"norangebar":noRangeBar=!!value;break;case"html5animation":html5Animation=String(value).search(/^(jump|tween|timed)$/i)!=-1?String(value).toLowerCase():"jump";break;case"varsetrules":if("onfocus" in value){varSetRules.onfocus=!!value.onfocus}if("onvalue" in value){varSetRules.onvalue=!!value.onvalue}break}}};var addEvent=function(obj,type,fn){if(obj.attachEvent){obj.attachEvent("on"+type,fn)}else{obj.addEventListener(type,fn,true)}};var removeEvent=function(obj,type,fn){try{if(obj.detachEvent){obj.detachEvent("on"+type,fn)}else{obj.removeEventListener(type,fn,true)}}catch(err){}};var stopEvent=function(e){e=e||window.event;if(e.stopPropagation){e.stopPropagation();e.preventDefault()} +/*@cc_on@*/ +/*@if(@_win32) + e.cancelBubble = true; + e.returnValue = false; + /*@end@*/ +return false};var preventDefault=function(e){e=e||window.event;if(e.preventDefault){e.preventDefault();return}e.returnValue=false};var addClass=function(e,c){if(new RegExp("(^|\\s)"+c+"(\\s|$)").test(e.className)){return}e.className+=(e.className?" ":"")+c};var removeClass=function(e,c){e.className=!c?"":e.className.replace(new RegExp("(^|\\s)"+c+"(\\s|$)")," ").replace(/^\s\s*/,"").replace(/\s\s*$/,"")};var getValueSet=function(){var obj={};for(id in sliders){obj[id]=sliders[id].getValueSet()}return obj};var setValueSet=function(sliderId,tf){sliders[sliderId].setValueSet(!!tf)};var sliderExists=function(slider){return !!(slider in sliders&&sliders.hasOwnProperty(slider))};var createSlider=function(options){if(!options||!options.inp||!options.inp.tagName||options.inp.tagName.search(/^input|select/i)==-1){return false}options.html5Shim=false;if(options.inp.tagName.toLowerCase()=="select"){if(options.inp.options.length<2){return false}options.min=0;options.max=options.inp.options.length-1;options.step=1;options.precision=0;options.scale=false;options.forceValue=true}else{if(String(options.inp.type).search(/^(text|range)$/i)==-1){return false}options.min=options.min&&String(options.min).search(fpRegExp)!=-1?+options.min:0;options.max=options.max&&String(options.max).search(fpRegExp)!=-1?+options.max:100;options.step=options.step&&String(options.step).search(stepRegExp)!=-1?options.step:1;options.precision=options.precision&&String(options.precision).search(/^[0-9]+$/)!=-1?options.precision:(String(options.step).search(/\.([0-9]+)$/)!=-1?String(options.step).match(/\.([0-9]+)$/)[1].length:0);options.scale=options.scale||false;options.forceValue=("forceValue" in options)?!!options.forceValue:false}options.ariaFormat=("ariaFormat" in options)&&typeof options.ariaFormat=="function"?options.ariaFormat:false;options.maxStep=options.maxStep&&String(options.maxStep).search(stepRegExp)!=-1?+options.maxStep:+options.step*2;options.classNames=options.classNames||"";options.callbacks=options.callbacks||false;destroySingleSlider(options.inp.id);sliders[options.inp.id]=new fdRange(options);return true};var getAttribute=function(elem,att){return elem.getAttribute(att)||""};var init=function(){var inputs=document.getElementsByTagName("input"),options;for(var i=0,inp;inp=inputs[i];i++){if(inp.tagName.toLowerCase()=="input"&&inp.type.toLowerCase()=="text"&&(getAttribute(inp,"min")&&getAttribute(inp,"min").search(fpRegExp)!=-1||getAttribute(inp,"max")&&getAttribute(inp,"max").search(fpRegExp)!=-1||getAttribute(inp,"step")&&getAttribute(inp,"step").search(/^(any|([0-9]+(\.[0-9]+){0,1}))$/i)!=-1)){if(inp.id&&document.getElementById("fd-slider-"+inp.id)){continue}else{if(inp.id&&!document.getElementById("fd-slider-"+inp.id)){destroySingleSlider(inp.id)}}if(!inp.id){inp.id="fd-slider-form-elem-"+uniqueid++}options={inp:inp,callbacks:[],animation:html5Animation,vertical:getAttribute(inp,"data-fd-slider-vertical")?true:!!(inp.offsetHeight>inp.offsetWidth),classNames:getAttribute(inp,"data-fd-slider-vertical"),html5Shim:true};if(options.vertical&&!getAttribute(inp,"data-fd-slider-vertical")){options.inpHeight=inp.offsetHeight}options.min=getAttribute(inp,"min")||0;options.max=getAttribute(inp,"max")||100;options.step=getAttribute(inp,"step").search(/^any$/i)!=-1?options.max-options.min:getAttribute(inp,"step").search(stepRegExp)!=-1?inp.getAttribute("step"):1;options.precision=String(options.step).search(/\.([0-9]+)$/)!=-1?String(options.step).match(/\.([0-9]+)$/)[1].length:0;options.maxStep=options.step*2;destroySingleSlider(options.inp.id);sliders[options.inp.id]=new fdRange(options)}}return true};var destroySingleSlider=function(id){if(id in sliders&&sliders.hasOwnProperty(id)){sliders[id].destroy();delete sliders[id];return true}return false};var destroyAllsliders=function(e){for(slider in sliders){if(sliders.hasOwnProperty(slider)){sliders[slider].destroy()}}sliders=[]};var unload=function(e){destroyAllsliders();sliders=null};var resize=function(e){for(slider in sliders){if(sliders.hasOwnProperty(slider)){sliders[slider].onResize()}}};var onDomReady=function(){removeEvent(window,"load",init);init()};var removeOnLoadEvent=function(){removeEvent(window,"load",init)};function fdRange(options){var inp=options.inp,disabled=false,tagName=inp.tagName.toLowerCase(),min=+options.min,max=+options.max,rMin=+options.min,rMax=+options.max,range=Math.abs(max-min),step=tagName=="select"?1:+options.step,maxStep=options.maxStep?+options.maxStep:step*2,precision=options.precision||0,steps=Math.ceil(range/step),scale=options.scale||false,hideInput=!!options.hideInput,animation=options.animation||"",vertical=!!options.vertical,callbacks=options.callbacks||{},classNames=options.classNames||"",html5Shim=!!options.html5Shim,defaultVal=max=33&&e.keyCode<=40)||!kbEnabled||e.keyCode==45||e.keyCode==46){return stopEvent(e)}return true}function onKeyDown(e){if(!kbEnabled){return true}e=e||window.event;var kc=e.keyCode!=null?e.keyCode:e.charCode,value;if(kc<33||(kc>40&&(kc!=45&&kc!=46))){return true}value=getWorkingValueFromInput();if(kc==37||kc==40||kc==46||kc==34){value-=(e.ctrlKey||kc==34?+maxStep:+step)}else{if(kc==39||kc==38||kc==45||kc==33){value+=(e.ctrlKey||kc==33?+maxStep:+step)}else{if(kc==35){value=rMax}else{if(kc==36){value=rMin}}}}userSet=true;valueToPixels(getValidValue(value));callback("update");preventDefault(e)}function onMouseOver(e){addClass(innerWrapper,"fd-slider-hover")}function onMouseOut(e){removeClass(innerWrapper,"fd-slider-hover")}function onMouseDown(e){e=e||window.event;preventDefault(e);var targ;if(e.target){targ=e.target}else{if(e.srcElement){targ=e.srcElement}}if(targ&&targ.nodeType==3){targ=targ.parentNode}if(e.touches){if(e.targetTouches&&e.targetTouches.length!=1){return false}e=e.touches[0];touchEvents=true}clearTimeout(timer);timer=null;kbEnabled=false;userSet=true;if(targ.className.search("fd-slider-handle")!=-1){mousePos=vertical?e.clientY:e.clientX;handlePos=parseInt(vertical?handle.offsetTop:handle.offsetLeft)||0;trackMouse(e);if(!touchEvents){addEvent(document,"mousemove",trackMouse);addEvent(document,"mouseup",stopDrag)}else{addEvent(document,"touchmove",trackMouse);addEvent(document,"touchend",stopDrag);removeEvent(outerWrapper,"mousedown",onMouseDown)}addClass(innerWrapper,"fd-slider-active");addClass(document.body,"fd-slider-drag-"+(vertical?"vertical":"horizontal"));callback("dragstart")}else{locate();var posx=0;if(e.pageX||e.pageY){posx=vertical?e.pageY:e.pageX}else{if(e.clientX||e.clientY){posx=vertical?e.clientY+document.body.scrollTop+document.documentElement.scrollTop:e.clientX+document.body.scrollLeft+document.documentElement.scrollLeft}}posx-=vertical?y+Math.round(handle.offsetHeight/2):x+Math.round(handle.offsetWidth/2);posx=snapToPxValue(posx);if(animation=="tween"){addClass(innerWrapper,"fd-slider-active");tweenTo(posx)}else{if(animation=="timed"){addClass(innerWrapper,"fd-slider-active");addEvent(document,touchEvents?"touchend":"mouseup",onDocMouseUp);destPos=posx;onTimer()}else{pixelsToValue(posx)}}}return stopEvent(e)}function onDocMouseUp(e){e=e||window.event;preventDefault(e);removeEvent(document,touchEvents?"touchend":"mouseup",onDocMouseUp);removeClass(innerWrapper,"fd-slider-active");clearTimeout(timer);timer=null;kbEnabled=true;return stopEvent(e)}function stopDrag(e){e=e||window.event;preventDefault(e);if(touchEvents){removeEvent(document,"touchmove",trackMouse);removeEvent(document,"touchend",stopDrag)}else{removeEvent(document,"mousemove",trackMouse);removeEvent(document,"mouseup",stopDrag)}kbEnabled=true;removeClass(document.body,"fd-slider-drag-"+(vertical?"vertical":"horizontal"));removeClass(innerWrapper,"fd-slider-active");callback("dragend");return stopEvent(e)}function trackMouse(e){e=e||window.event;preventDefault(e);if(e.touches){if(e.targetTouches&&e.targetTouches.length!=1){return false}e=e.touches[0]}pixelsToValue(snapToPxValue(handlePos+(vertical?e.clientY-mousePos:e.clientX-mousePos)));return false}function increment(inc){var value=getWorkingValueFromInput();userSet=true;value+=inc*step;valueToPixels(getValidValue(value))}function locate(){var curleft=0,curtop=0,obj=outerWrapper;try{while(obj.offsetParent){curleft+=obj.offsetLeft;curtop+=obj.offsetTop;obj=obj.offsetParent}}catch(err){}x=curleft;y=curtop}function onTimer(){var xtmp=parseInt(vertical?handle.offsetTop:handle.offsetLeft,10);xtmp=Math.round((destPos20?50:100)}else{kbEnabled=true;removeClass(innerWrapper,"fd-slider-active");callback("finalise")}}var tween=function(){frame++;var c=tweenC,d=20,t=frame,b=tweenB,x=Math.ceil((t==d)?b+c:c*(-Math.pow(2,-10*t/d)+1)+b);pixelsToValue(t==d?tweenX:x);if(t!=d){callback("move");timer=setTimeout(tween,20)}else{clearTimeout(timer);timer=null;kbEnabled=true;removeClass(innerWrapper,"fd-slider-focused");removeClass(innerWrapper,"fd-slider-active");callback("finalise")}};function tweenTo(tx){kbEnabled=false;tweenX=parseInt(tx,10);tweenB=parseInt(vertical?handle.offsetTop:handle.offsetLeft,10);tweenC=tweenX-tweenB;tweenD=20;frame=0;if(!timer){timer=setTimeout(tween,20)}}function checkValue(value){if(isNaN(value)||value===""||typeof value=="undefined"){userSet=false;return defaultVal}else{if(valueMath.max(rMin,rMax)){userSet=false;return Math.max(rMin,rMax)}}}userSet=true;return value}function getWorkingValueFromInput(){return getValidValue(tagName=="input"?parseFloat(inp.value):inp.selectedIndex)}function getValidValue(value){return(isNaN(value)||value===""||typeof value=="undefined")?defaultVal:Math.min(Math.max(value,Math.min(rMin,rMax)),Math.max(rMin,rMax))}function pixelsToValue(px){var val=getValidValue(scale?percentToValue(pixelsToPercent(px)):vertical?max-(Math.round(px/stepPx)*step):min+(Math.round(px/stepPx)*step));handle.style[vertical?"top":"left"]=(px||0)+"px";redrawRange();setInputValue((tagName=="select"||step==1)?Math.round(val):val)}function valueToPixels(val){var clearVal=false,value;if((typeof val=="undefined"||isNaN(val)||val==="")&&tagName=="input"&&!forceValue){value=defaultVal;clearVal=true;userSet=false}else{value=checkValue(val)}handle.style[vertical?"top":"left"]=(scale?percentToPixels(valueToPercent(value)):vertical?Math.round(((max-value)/step)*stepPx):Math.round(((value-min)/step)*stepPx))+"px";redrawRange();setInputValue(clearVal?"":value)}function snapToPxValue(px){if(scale){return Math.max(Math.min(rMaxPx,px),rMinPx)}else{var rem=px%stepPx;if(rem&&rem>=(stepPx/2)){px+=(stepPx-rem)}else{px-=rem}if(pxMath.max(Math.abs(rMinPx),Math.abs(rMaxPx))){px=Math.max(Math.abs(rMinPx),Math.abs(rMaxPx))}}return Math.min(Math.max(px,0),rMaxPx)}}function percentToValue(pct){var st=0,fr=min,value;for(var s in scale){if(!scale.hasOwnProperty(s)){continue}if(pct>=st&&pct<=+s){value=fr+((pct-st)*(+scale[s]-fr))/(+s-st)}st=+s;fr=+scale[s]}return value}function valueToPercent(value){var st=0,fr=min,pct=0;for(var s in scale){if(!scale.hasOwnProperty(s)){continue}if(value>=fr&&value<=+scale[s]){pct=st+(value-fr)*(+s-st)/(+scale[s]-fr)}st=+s;fr=+scale[s]}return pct}function percentToPixels(percent){return((outerWrapper[vertical?"offsetHeight":"offsetWidth"]-handle[vertical?"offsetHeight":"offsetWidth"])/100)*percent}function pixelsToPercent(pixels){return pixels/((outerWrapper[vertical?"offsetHeight":"offsetWidth"]-outerWrapper[handle?"offsetHeight":"offsetWidth"])/100)}function setInputValue(val){callback("update");if(!userSet){addClass(innerWrapper,"fd-slider-no-value")}else{removeClass(innerWrapper,"fd-slider-no-value")}if(tagName=="select"){try{val=parseInt(val,10);if(inp.selectedIndex===val){updateAriaValues();return}inp.options[val].selected=true}catch(err){}}else{if(val!=""){val=(min+(Math.round((val-min)/step)*step)).toFixed(precision)}if(inp.value===val){updateAriaValues();return}inp.value=val}updateAriaValues();callback("change")}function checkInputValue(value){return !(isNaN(value)||value===""||valueMath.max(rMin,rMax))}function setSliderRange(newMin,newMax){if(rMin>rMax){newMin=Math.min(min,Math.max(newMin,newMax));newMax=Math.max(max,Math.min(newMin,newMax));rMin=Math.max(newMin,newMax);rMax=Math.min(newMin,newMax)}else{newMin=Math.max(min,Math.min(newMin,newMax));newMax=Math.min(max,Math.max(newMin,newMax));rMin=Math.min(newMin,newMax);rMax=Math.max(newMin,newMax)}if(defaultValMath.max(rMin,rMax)){defaultVal=Math.max(rMin,rMax)}}handle.setAttribute("aria-valuemin",rMin);handle.setAttribute("aria-valuemax",rMax);checkValue(tagName=="input"?parseFloat(inp.value):inp.selectedIndex);redraw()}function redrawRange(){if(noRangeBar){return}if(vertical){rangeBar.style.height=Math.max(1,(bar.offsetHeight-handle.offsetTop))+"px"}else{rangeBar.style.width=Math.max(1,handle.offsetLeft)+"px"}}function findLabel(){var label=false,labelList=document.getElementsByTagName("label");for(var i=0,lbl;lbl=labelList[i];i++){if((lbl.htmlFor&&lbl.htmlFor==inp.id)||(lbl.getAttribute("for")==inp.id)){label=lbl;break}}if(label&&!label.id){label.id=inp.id+"_label"}return label}function updateAriaValues(){var val=tagName=="select"?inp.options[inp.selectedIndex].value:inp.value,valTxt=ariaFormat?ariaFormat(val):tagName=="select"?(inp.options[inp.selectedIndex].text?inp.options[inp.selectedIndex].text:val):val;handle.setAttribute("aria-valuenow",val);handle.setAttribute("aria-valuetext",valTxt)}function onInputChange(e){userSet=true;valueToPixels(tagName=="input"?parseFloat(inp.value):inp.selectedIndex);updateAriaValues()}function onReset(e){if(tagName=="input"){inp.value=inp.defaultValue}else{inp.selectedIndex=resetDef}checkValue(tagName=="select"?inp.options[inp.selectedIndex].value:inp.value);redraw();updateAriaValues()}function valueSet(tf){userSet=!!tf}function setTabIndex(e,i){e.setAttribute(! +/*@cc_on!@*/ +false?"tabIndex":"tabindex",i);e.tabIndex=i}(function(){if(html5Shim||hideInput){addClass(inp,"fd-form-element-hidden")}else{addEvent(inp,"change",onInputChange)}if(html5Shim){inp.stepUp=function(n){increment(n||1)};inp.stepDown=function(n){increment(n||-1)}}outerWrapper=document.createElement("span");outerWrapper.className="fd-slider"+(vertical?"-vertical ":" ")+classNames;outerWrapper.id="fd-slider-"+inp.id;if(vertical&&inpHeight){outerWrapper.style.height=inpHeight+"px"}innerWrapper=document.createElement("span");innerWrapper.className="fd-slider-wrapper"+(!html5Shim?" fd-slider-no-value":"");ieBlur=document.createElement("span");ieBlur.className="fd-slider-inner";bar=document.createElement("span");bar.className="fd-slider-bar";if(fullARIA){handle=document.createElement("span")}else{handle=document.createElement("a");handle.setAttribute("href","#");addEvent(handle,"click",stopEvent)}setTabIndex(handle,0);handle.className="fd-slider-handle";handle.appendChild(document.createTextNode(String.fromCharCode(160)));innerWrapper.appendChild(ieBlur);if(!noRangeBar){rangeBar=document.createElement("span");rangeBar.className="fd-slider-range";innerWrapper.appendChild(rangeBar)}innerWrapper.appendChild(bar);innerWrapper.appendChild(handle);outerWrapper.appendChild(innerWrapper);inp.parentNode.insertBefore(outerWrapper,inp);if(isOpera|| +/*@cc_on!@*/ +!true){handle.unselectable="on";bar.unselectable="on";ieBlur.unselectable="on";outerWrapper.unselectable="on";innerWrapper.unselectable="on";if(!noRangeBar){rangeBar.unselectable="on"}}outerWrapper.setAttribute("role","application");handle.setAttribute("role","slider");handle.setAttribute("aria-valuemin",tagName=="select"?inp.options[0].value:min);handle.setAttribute("aria-valuemax",tagName=="select"?inp.options[inp.options.length-1].value:max);var lbl=findLabel();if(lbl){handle.setAttribute("aria-labelledby",lbl.id);handle.id="fd-slider-handle-"+inp.id; +/*@cc_on + /*@if(@_win32) + lbl.setAttribute("htmlFor", handle.id); + @else @*/ +lbl.setAttribute("for",handle.id); +/*@end + @*/ +}if(document.getElementById(describedBy)){handle.setAttribute("aria-describedby",describedBy)}if(inp.getAttribute("disabled")==true){disableSlider(true)}else{enableSlider(true)}if(varSetRules.onvalue){userSet=true;checkValue(tagName=="input"?parseFloat(inp.value):inp.selectedIndex)}if(inp.form){addEvent(inp.form,"reset",onReset)}updateAriaValues();callback("create");redraw()})();return{onResize:function(e){if(outerWrapper.offsetHeight!=sliderH||outerWrapper.offsetWidth!=sliderW){redraw()}},destroy:function(){destroySlider()},reset:function(){valueToPixels(tagName=="input"?parseFloat(inp.value):inp.selectedIndex)},stepUp:function(n){increment(Math.abs(n)||1)},stepDown:function(n){increment(-Math.abs(n)||-1)},increment:function(n){increment(n)},disable:function(){disableSlider()},enable:function(){enableSlider()},setRange:function(mi,mx){setSliderRange(mi,mx)},getValueSet:function(){return !!userSet},setValueSet:function(tf){valueSet(tf)},checkValue:function(){if(varSetRules.onvalue){userSet=true;checkValue(tagName=="input"?parseFloat(inp.value):inp.selectedIndex)}updateAriaValues();redraw()}}}addEvent(window,"load",init);addEvent(window,"load",function(){setTimeout(function(){var slider;for(slider in sliders){sliders[slider].checkValue()}},0)});addEvent(window,"resize",resize);addEvent(window,"unload",unload);(function(){var scriptFiles=document.getElementsByTagName("script"),scriptInner=String(scriptFiles[scriptFiles.length-1].innerHTML).replace(/[\n\r\s\t]+/g," ").replace(/^\s+/,"").replace(/\s+$/,""),json=parseJSON(scriptInner);if(typeof json==="object"&&!("err" in json)){affectJSON(json)}})(); +/*@cc_on + @if (@_jscript_version < 9) + addClass(document.documentElement, "oldie"); + @end + @*/ +return{createSlider:function(opts){return createSlider(opts)},onDomReady:function(){onDomReady()},destroyAll:function(){destroyAllsliders()},destroySlider:function(id){return destroySingleSlider(id)},redrawAll:function(){resize()},addEvent:addEvent,removeEvent:removeEvent,stopEvent:stopEvent,increment:function(id,numSteps){if(!sliderExists(id)){return false}sliders[id].increment(numSteps)},stepUp:function(id,n){if(!sliderExists(id)){return false}sliders[id].stepUp(Math.abs(n)||1)},stepDown:function(id,n){if(!sliderExists(id)){return false}sliders[id].stepDown(-Math.abs(n)||-1)},setRange:function(id,newMin,newMax){if(!sliderExists(id)){return false}sliders[id].setRange(newMin,newMax)},updateSlider:function(id){if(!sliderExists(id)){return false}sliders[id].reset()},disable:function(id){if(!sliderExists(id)){return false}sliders[id].disable()},enable:function(id){if(!sliderExists(id)){return false}sliders[id].enable()},getValueSet:function(){return getValueSet()},setValueSet:function(a,tf){if(!sliderExists(id)){return false}setValueSet(a,tf)},setGlobalVariables:function(json){affectJSON(json)},removeOnload:function(){removeOnLoadEvent()}}})(); \ No newline at end of file diff --git a/vendor/assets/stylesheets/fd-slider.css.erb b/vendor/assets/stylesheets/fd-slider.css.erb new file mode 100644 index 0000000..18284eb --- /dev/null +++ b/vendor/assets/stylesheets/fd-slider.css.erb @@ -0,0 +1,988 @@ +/* + + Don't use this version of the file in a production environment. A minified + version tailored specifically to your needs can be generated in-browser by + using the /css-generator/index.html file. + + Notes for the adventurous: + + 1. The script automagically adds the classname "oldie" to IE6, 7 & 8. + + 2. A combination of the .oldie class and "safe css hacks" are used to target + specific IE versions. See: http://mathiasbynens.be/notes/safe-css-hacks + + 3. MSHTML has been used to base64 encode the various png images used for the + drag handle in IE6 and 7. IE7 gets served one base64 encoded image sprite + whereas IE6 gets served individual base64 encoded images. + + See: http://www.phpied.com/the-proper-mhtml-syntax/ for more info on MHTML + + The base64 encoded images have been placed into their own .mht file. This + means only IE6 and 7 will ever be burdened with downloading the file. + + A Microsoft security update in July 2011 means that .mht files now have to + be delivered with the mimetype "message/rfc822". If using IIS, there is + nothing to do as IIS appears to default to using the required + "message/rfc822" mimetype, if using Apache, there are two ways in which to + configure this behaviour: + + A. You have Admin rights and can restart the Apache server + + Update the apache_root/httpd/conf/Srm.conf file and add the following + line: + + AddType message/rfc822 mht + + This method requires that you restart Apache. + + B. You can simply use an htaccess directive + + You can add the following to an .htaccess file that sits in the same + directory as the .mht file (or to an htaccess file at the root of your + website if one exists already): + + AddType message/rfc822 mht + + You do not need to restart Apache for the change to take effect. + + Yikes - I cant do either of the above! + + Don't worry, using the .mht file isn't compulsory - just replace the + various mhtml: references (found within the .oldie classes) to point to + the correct image file on your server (not forgetting to actually upload + the image files to your server of course). + + All of the relevant rules have further instructions embedded within them. + + 4. All browsers but IE6 get one "normal" base64 encoded image sprite. IE6 has + to use separate images for each animation state. + + 5. The drag handle is only 20px in width & height, most probably not suitable + for touch screen devices. + + 6. It's painless to base64 encode your own images, use an online encoder. + See: http://www.google.com/search?q=base+64+encoder - the only problem is + that IE6 needs each frame of the handle sprite to be encoded individually. + + 7. If you want to use a different image for vertical slider drag handles, + uncomment the relevant classes below (easy to spot as they all have the + classname ".fd-slider-vertical" somewhere within the declaration). + + 8. As a reminder, the following HTML is being targetted by the CSS: + + + + + + +   + + + +*/ + +/* + Element: Form element associated with the slider + Notes: The styles given to the associated form element in order to hide + it within the display +*/ +.fd-form-element-hidden + { + display:none; + } +/* + Element: Outer wrapper + Orientation: Horizontal +*/ +.fd-slider + { + width:100%; + height:20px; + margin:0 0 10px 0; + } +/* + Element: Outer wrapper + Orientation: Vertical + Notes: You may wish to float the vertical sliders left or use + display:inline-block (inline-block should work even in IE6 as the slider + is constructed from span elements but don't quote me on that) +*/ +.fd-slider-vertical + { + width:20px; + height:100%; + margin:0 10px 10px 0; + } +/* + Element: Outer wrapper + Orientation: Both horizontal & vertical +*/ +.fd-slider, +.fd-slider-vertical + { + text-align:center; + display:block; + position:relative; + cursor:pointer; + text-decoration:none; + border:0 none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; + } +/* + Element: Outer Wrapper + Orientation: Both horizontal & vertical + Notes: IE6 & 7 need a transparent gif as a background in order for + hover events to work. This has been base64 encoded within the .mht file. + As it's not a png, no AlphaImageLoader filter is required for IE6. +*/ +.oldie .fd-slider, +.oldie .fd-slider-vertical + { + /* + If using the .mht file then uncomment the following rule and edit the + filepath to match the absolute path to the fd-slider.mht file on your + server (replace "www.your-domain.com/the/path/to/") + */ + + /* + + *background:transparent url(mhtml:http://www.your-domain.com/the/path/to/fd-slider.mht!blank) repeat; + + */ + + /* + If not using the .mht file then uncomment the following rule and edit + the filepath to match the absolute path to the blank.gif file on your + server (replace "www.your-domain.com/the/path/to/") + */ + + *background:transparent url(<%= asset_path 'fd-slider/blank.gif' %>) repeat; + + } +/* + Element: Inner wrapper + Notes: All other DOM elements added as children to this element. +*/ +.fd-slider-wrapper + { + position:absolute; + top:0; + left:0; + width:100%; + height:100%; + } +/* + Element: Inner wrapper + Notes: IE6 needs an expression as it cannot do a height:100% on + absolutely positioned elements and it also can't position on four + corners - so we are left with a "one time evaluated" self-deleting + expression to do the dirty work. +*/ + +.oldie .fd-slider-vertical .fd-slider-wrapper + { + *clear:expression(style.height=parentNode.offsetHeight+'px',style.clear='none', 0); + } +/* + Element: ieBlur shiv + Notes: Used only by IE for the onfocus "Blur" effect +*/ +.fd-slider-inner + { + display:none; + } +/* + Element: ieBlur shiv + Orientation: Horizontal + Notes: IE6, 7 & 8 only. + Use the "Blur" filter to simulate the box-shadow - not brilliant but the + best we can do for IE. IE6 can't absolutely position on 4 sides so we + reset the right to "auto" and use a nasty expression to calculate the + width dynamically. +*/ +.oldie .fd-slider-inner + { + position:absolute; + height:2px; + border:1px solid #bbf; + background:#bbf; + top:4px; + bottom:none; + left:4px; + right:12px; + z-index:2; + margin:0; + padding:0; + overflow:hidden; + line-height:4px; + _right:auto; + _width:expression((this.parentNode.offsetWidth - 12) + "px"); + filter:progid:DXImageTransform.Microsoft.Blur(pixelradius=3.5); + } +/* + Element: ieBlur shiv + Orientation: Vertical + Notes: Reposition the "Blur" filter for the vertical slider for IE6, + 7 & 8. The "Blur" filter rule cascades from the rule above so no need to + redeclare here, we just reposition. +*/ +.oldie .fd-slider-vertical .fd-slider-inner + { + width:2px; + height:auto; + bottom:12px; + right:auto; + _bottom:auto; + *clear:expression(style.height=(parentNode.offsetHeight - 8)+'px',style.clear='none', 0); + } +/* + Element: ieBlur shiv + Orientation: Horizontal & Vertical + Notes: Display the "Blurred" inner div for IE6, 7 & 8 when the slider + gains focus +*/ +.oldie .fd-slider-focused .fd-slider-inner + { + display:block; + } +/* + Element: Inner track bar + Orientation: Horizontal +*/ +.fd-slider-bar + { + display:block; + position:absolute; + top:8px; + right:10px; + left:10px; + z-index:2; + height:2px; + margin:0; + padding:0; + overflow:hidden; + border:1px solid #bbb; + border-bottom:1px solid #aaa; + border-right:1px solid #aaa; + border:1px solid rgba(187, 187, 187, .8); + border-bottom:1px solid rgba(170, 170, 170, .8); + border-right:1px solid rgba(170, 170, 170, .8); + line-height:4px; + background-color:#ddd; + background-image: -webkit-gradient(linear, left top, left bottom, from(#ececec), to(#ccc)); + background-image: -webkit-linear-gradient(top, #ececec, #ccc); + background-image: -moz-linear-gradient(top, #ececec, #ccc); + background-image: -ms-linear-gradient(top, #ececec, #ccc); + background-image: -o-linear-gradient(top, #ececec, #ccc); + background-image: linear-gradient(to bottom, #ececec, #ccc); + -webkit-border-radius:2px; + -moz-border-radius:2px; + border-radius:2px; + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; + } +/* + Element: Inner track bar + Orientation: Horizontal + Notes: For IE6 & 7 & 8. IE6 does not recognise absolute positioning on + four sides (top, right, bottom & left) so we use an expression to + dynamically calculate the track bar size. Yes, it is horrible - you + don't need to remind me. +*/ +.oldie .fd-slider-bar + { + _right:auto; + _width:expression((this.parentNode.offsetWidth - 20) + "px"); + filter:progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ffececec',endColorstr='#ffcccccc'); + } +/* + Element: Inner track bar + Orientation: Vertical +*/ +.fd-slider-vertical .fd-slider-bar + { + width:2px; + top:10px; + right:auto; + bottom:10px; + left:8px; + height:auto; + background-color:#ddd; + background-image: -webkit-gradient(linear, left top, right top, from(#ececec), to(#ccc)); + background-image: -webkit-linear-gradient(left, #ececec, #ccc); + background-image: -moz-linear-gradient(left, #ececec, #ccc); + background-image: -ms-linear-gradient(left, #ececec, #ccc); + background-image: -o-linear-gradient(left, #ececec, #ccc); + background-image: linear-gradient(to right, #ececec, #ccc); + } +/* + Element: Inner track bar + Orientation: Vertical + Notes: For IE6 & 7 & 8. The gradient filter colour strings in AARRGGBB + format (to save you one less google). IE6 gets repositioned and alas, + an expression to calculate the height. +*/ +.oldie .fd-slider-vertical .fd-slider-bar + { + _bottom:auto; + *clear:expression(style.height=(parentNode.offsetHeight - 20)+'px',style.clear='none', 0); + filter:progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ffececec',endColorstr='#ffcccccc'); + } +/* + Element: Inner track bar + Orientation: Horizontal & Vertical + State: Focused + Notes: Drop shadow on the inner bar when focused - newer browsers get + an animation. IE6, 7 & 8 get a "Blur" filter on an inner SPAN + .fd-slider-inner instead +*/ +.fd-slider-focused .fd-slider-bar + { + -webkit-box-shadow: 0 0 6px rgba(10, 130, 170, 0.7); + -moz-box-shadow: 0 0 6px rgba(10, 130, 170, 0.7); + box-shadow: 0 0 6px rgba(10, 130, 170, 0.7); + -webkit-animation:fd-pulse 2s infinite; + -moz-animation:fd-pulse 2s infinite; + -ms-animation:fd-pulse 2s infinite; + -o-animation:fd-pulse 2s infinite; + } +/* + Element: Inner animated range bar + Orientation: Horizontal +*/ +.fd-slider-range + { + display:block; + position:absolute; + top:9px; + left:11px; + z-index:3; + height:2px; + margin:0; + padding:0; + overflow:hidden; + line-height:2px; + background-color:#4cc; + background-image: -webkit-gradient(linear, left top, right top, from(#6cc), to(#3cf)); + background-image: -webkit-linear-gradient(left, #6cc, #3cf); + background-image: -moz-linear-gradient(left, #6cc, #3cf); + background-image: -ms-linear-gradient(left, #6cc, #3cf); + background-image: -o-linear-gradient(left, #6cc, #3cf); + background-image: linear-gradient(to right, #6cc, #3cf); + -webkit-border-radius:2px; + -moz-border-radius:2px; + border-radius:2px; + -webkit-background-clip: padding-box; + -moz-background-clip: padding; + background-clip: padding-box; + } +/* + Element: Inner range bar + Orientation: Horizontal + Notes: IE6, 7 & 8 +*/ +.oldie .fd-slider-range + { + /* IE6 - is this needed? To test. */ + _left:10px; + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ff66cccc',endColorstr='#ff33ccff'); + } +/* + Element: Inner range bar + Orientation: Vertical +*/ +.fd-slider-vertical .fd-slider-range + { + height:auto; + width:2px; + top:auto; + right:auto; + bottom:11px; + left:9px; + background-image: -webkit-gradient(linear, left top, left bottom, from(#3cf), to(#6cc)); + background-image: -webkit-linear-gradient(top, #3cf, #6cc); + background-image: -moz-linear-gradient(top, #3cf, #6cc); + background-image: -ms-linear-gradient(top, #3cf, #6cc); + background-image: -o-linear-gradient(top, #3cf, #6cc); + background-image: linear-gradient(to bottom, #3cf, #6cc); + } +/* + Element: Inner range bar + Orientation: Vertical + Notes: IE6, 7 & 8 +*/ +.oldie .fd-slider-vertical .fd-slider-range + { + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ff66cccc',endColorstr='#ff33ccff'); + } +/* + Element: Drag handle + Orientation: Horizontal + State: Default. + Notes: The image sprite used for the handle is base64 encoded below. IE7 + gets its own version within the .mht file, IE6 does not use an image + sprite and it is necessary to base64 encode individual animation frames + within the .mht file. +*/ +.fd-slider-handle + { + position:absolute; + display:block; + padding:0; + border:0 none; + margin:0; + z-index:3; + top:0; + left:0; + width:20px; + height:20px; + outline:0 none; + background-color:transparent; + background-image:url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAABQCAYAAAAZQFV3AAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAyBpVFh0WE1MOmNvbS5hZG9iZS54bXAAAAAAADw/eHBhY2tldCBiZWdpbj0i77u/IiBpZD0iVzVNME1wQ2VoaUh6cmVTek5UY3prYzlkIj8+IDx4OnhtcG1ldGEgeG1sbnM6eD0iYWRvYmU6bnM6bWV0YS8iIHg6eG1wdGs9IkFkb2JlIFhNUCBDb3JlIDUuMC1jMDYwIDYxLjEzNDc3NywgMjAxMC8wMi8xMi0xNzozMjowMCAgICAgICAgIj4gPHJkZjpSREYgeG1sbnM6cmRmPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5LzAyLzIyLXJkZi1zeW50YXgtbnMjIj4gPHJkZjpEZXNjcmlwdGlvbiByZGY6YWJvdXQ9IiIgeG1sbnM6eG1wPSJodHRwOi8vbnMuYWRvYmUuY29tL3hhcC8xLjAvIiB4bWxuczp4bXBNTT0iaHR0cDovL25zLmFkb2JlLmN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iirhmYh5/0oB5mDk8r18c2ub3nkyUKFUtVa4MXyPp7UHml4exj6cy74/OL48fTcezmnUVKoCU6lqY/nK4Fjig0ufm4P8QSGAlQbq4dTZbuh//WtwPFQPgaCLl6p2YGYyBjev3oOpsU+xJ8Yib6UQIHAq+FCO8tZeDNsoLNFZ5W1uv+mVCwHFgobNRI0C3zO2TPWrEGBc/xZgAJyadcoLu6zuAAAAAElFTkSuQmCC); + background-position:0 0; + cursor:W-resize; + line-height:20px; + font-size:10px; + -moz-outline:0 none; + -webkit-touch-callout: none; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; + } +/* + Element: Drag handle + Orientation: Horizontal + State: Default + Notes: IE6, 7 & 8 use a nasty expression in order to not draw focus + outline on drag handle. +*/ +.oldie .fd-slider-handle + { + /* IE6 & 7 - set the handle sprite as the background image */ + + /* + If using the .mht file then uncomment the following rule and edit the + filepath to match the absolute path to the fd-slider.mht file on your + server (replace "www.your-domain.com/the/path/to/") + */ + + /* + + *background-image:url(mhtml:http://www.your-domain.com/the/path/to/fd-slider.mht!fullsprite); + + */ + + /* + If not using the .mht file then uncomment the following rule and edit + the filepath to match the absolute path to the fd-slider-sprite.png + file on your server (replace "www.your-domain.com/the/path/to/") + */ + + *background-image:url(<%= asset_path 'fd-slider/fd-slider-sprite.png' %>); + + /**********************************************************************/ + + /* IE6 - reset the background image sprite stipulated above. */ + _background-image:none; + + /* + IE6 - use the AlphaImageLoader to either load a base64 encoded image + from the .mht file or a normal png image from the server + */ + + /* + If using the .mht file then uncomment the following rule and edit the + filepath to match the absolute path to the fd-slider.mht file on your + server (replace "www.your-domain.com/the/path/to/") + */ + + /* + + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='mhtml:http://www.your-domain.com/the/path/to/fd-slider.mht!handlenormal'); + + */ + + /* + If not using the .mht file then uncomment the following rule and edit + the filepath to match the absolute path to the fd-handle-normal.png + file on your server (replace "www.your-domain.com/the/path/to/") + */ + + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='<%= asset_path 'fd-slider/fd-handle-normal.png' %>'); + + /* IE6, 7 & 8 */ + outline:expression(hideFocus='true'); + } +/* + Element: Drag handle + Orientation: Horizontal & Vertical + State: Focused + Notes: Attempts to remove the focus outline, remove the rule if it + offends your sensibilities. +*/ +.fd-slider-handle:focus + { + outline:0 none; + border:0 none; + -moz-user-focus:normal; + } +.fd-slider-handle:focus::-moz-focus-inner + { + border-color: transparent; + } +/* + Element: Drag handle + Orientation: Horizontal + State: Focused and Hovered and also while handle is animating into + position or being dragged. + Notes: I'm using the same image for focused, hover and active states + but you can, of course, go wild. +*/ +.fd-slider-focused .fd-slider-handle, +.fd-slider-hover .fd-slider-handle, +.fd-slider-active .fd-slider-handle + { + background-position:0 -20px; + } +/* + Element: Drag handle + Orientation: Horizontal + State: Focused and Hovered and also while handle is animating into + position or being dragged. + Notes: IE6 only. +*/ +.oldie .fd-slider-focused .fd-slider-handle, +.oldie .fd-slider-hover .fd-slider-handle, +.oldie .fd-slider-active .fd-slider-handle + { + /* + IE6 - use the AlphaImageLoader to either load a base64 encoded image + from the .mht file or a normal png image from the server + */ + + /* + If using the .mht file then uncomment the following rule and edit the + filepath to match the absolute path to the fd-slider.mht file on your + server (replace "www.your-domain.com/the/path/to/") + */ + + /* + + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='mhtml:http://www.your-domain.com/the/path/to/fd-slider.mht!handleglow'); + + */ + + /* + If not using the .mht file then uncomment the following rule and edit + the filepath to match the absolute path to the fd-handle-glow.png + file on your server (replace "www.your-domain.com/the/path/to/") + */ + + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='<%= asset_path 'fd-slider/fd-handle-glow.png' %>'); + } +/* + Element: Drag handle + Orientation: Vertical + Notes: Change the cursor to the correct icon. +*/ +.fd-slider-vertical .fd-slider-handle + { + cursor:N-resize; + } +/* + Element: Drag handle + Orientation: Vertical + Notes: IE6, 7 & 8 + +.oldie .fd-slider-vertical .fd-slider-handle + { + } +*/ +/* + Element: Drag handle + Orientation: Vertical + State: Focused and Hovered and also while handle is animating into + position or being dragged. + +.fd-slider-vertical .fd-slider-focused .fd-slider-handle, +.fd-slider-vertical .fd-slider-hover .fd-slider-handle, +.fd-slider-vertical .fd-slider-active .fd-slider-handle + { + } +*/ +/* + Element: Drag handle + Orientation: Vertical + State: Focused and Hovered and also while handle is animating into + position or being dragged. + Notes: IE6, 7 & 8 + +.oldie .fd-slider-vertical .fd-slider-focused .fd-slider-handle, +.oldie .fd-slider-vertical .fd-slider-hover .fd-slider-handle, +.oldie .fd-slider-vertical .fd-slider-active .fd-slider-handle + { + } +*/ +/* + Element: Drag handle + Orientation: Horizontal & Vertical + State: User has not yet used the slider to set a value + Notes: I screwed the positioning of the image sprite by 1px which is why + it's -59px and not -60px. Yeah - I suck at Photoshop. +*/ +.fd-slider-no-value .fd-slider-handle + { + background-position:0 -59px; + } +/* + Element: Drag handle + Orientation: Horizontal + State: User has not yet used the slider to set a value + Notes: IE6 only +*/ +.oldie .fd-slider-no-value .fd-slider-handle + { + /* + IE6 - use the AlphaImageLoader to either load a base64 encoded image + from the .mht file or a normal png image from the server + */ + + /* + If using the .mht file then uncomment the following rule and edit the + filepath to match the absolute path to the fd-slider.mht file on your + server (replace "www.your-domain.com/the/path/to/") + */ + + /* + + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='mhtml:http://www.your-domain.com/the/path/to/fd-slider.mht!handlenovalue'); + + */ + + /* + If not using the .mht file then uncomment the following rule and edit + the filepath to match the absolute path to the fd-handle-no-value.png + file on your server (replace "www.your-domain.com/the/path/to/") + */ + + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='<%= asset_path 'fd-slider/fd-handle-no-value.png' %>'); + } +/* + Element: Drag handle + Orientation: Vertical + State: User has not yet used the slider to set a value + Notes: IE6, 7 & 8. Only required should you use a different image for + vertical sliders. + +.oldie .fd-slider-vertical .fd-slider-no-value .fd-slider-handle + { + } +*/ +/* + Element: document.body + Orientation: Horizontal and Vertical + Notes: Class given to body to change cursor style when dragging. It also + attempts to stop text selection while dragging. +*/ +body.fd-slider-drag-horizontal, +body.fd-slider-drag-horizontal *, +body.fd-slider-drag-vertical, +body.fd-slider-drag-vertical * + { + cursor:N-resize !important; + -webkit-user-select: none; + -khtml-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + -o-user-select: none; + user-select: none; + } +/* + Element: document.body + Orientation: Horizontal + Notes: Class given to body to change cursor style when dragging +*/ +body.fd-slider-drag-horizontal, +body.fd-slider-drag-horizontal * + { + cursor:W-resize !important; + } +/* + Element: Inner wrapper + Orientation: Horizontal & Vertical + State: disabled + Notes: Class given to slider when disabled +*/ +.fd-slider-disabled + { + opacity:.8; + cursor:default; + } +/* + Element: Drag handle + Orientation: Horizontal + State: disabled + Notes: Class given to slider when disabled +*/ +.fd-slider-disabled .fd-slider-handle + { + cursor:default !important; + background-position:0 -40px; + opacity:1; + } +/* + Element: Drag handle + Orientation: Horizontal + State: disabled + Notes: IE6 only +*/ +.oldie .fd-slider-disabled .fd-slider-handle + { + /* + IE6 - use the AlphaImageLoader to either load a base64 encoded image + from the .mht file or a normal png image from the server + */ + + /* + If using the .mht file then uncomment the following rule and edit the + filepath to match the absolute path to the fd-slider.mht file on your + server (replace "www.your-domain.com/the/path/to/") + */ + + /* + + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='mhtml:http://www.your-domain.com/the/path/to/fd-slider.mht!handledisabled'); + + */ + + /* + If not using the .mht file then uncomment the following rule and edit + the filepath to match the absolute path to the fd-handle-disabled.png + file on your server (replace "www.your-domain.com/the/path/to/") + */ + + _filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled=true,sizingMethod=crop,src='<%= asset_path 'fd-slider/fd-handle-disabled.png' %>'); + } +/* + Element: Drag handle + Orientation: Vertical + State: disabled + +.fd-slider-vertical .fd-slider-disabled .fd-slider-handle + { + } +.oldie .fd-slider-vertical .fd-slider-disabled .fd-slider-handle + { + } +*/ +/* + Element: Inner track bar + Orientation: Horizontal + State: disabled +*/ +.fd-slider-disabled .fd-slider-bar + { + cursor:auto !important; + border:1px solid #888; + border-bottom:1px solid #999; + border-right:1px solid #999; + border:1px solid rgba(136,136,136,.8); + border-bottom:1px solid rgba(153,153,153,.8); + border-right:1px solid rgba(153,153,153,.8); + background-color:#555; + background-image: -webkit-gradient(linear, left top, right top, from(#666), to(#333)); + background-image: -webkit-linear-gradient(left, #666, #333); + background-image: -moz-linear-gradient(left, #666, #333); + background-image: -ms-linear-gradient(left, #666, #333); + background-image: -o-linear-gradient(left, #666, #333); + background-image: linear-gradient(to right, #666, #333); + } +/* + Element: Inner track bar + Orientation: Vertical + State: disabled +*/ +.fd-slider-vertical .fd-slider-disabled .fd-slider-bar + { + background-image: -webkit-gradient(linear, left top, right bottom, from(#333), to(#666)); + background-image: -webkit-linear-gradient(top, #333, #666); + background-image: -moz-linear-gradient(top, #333, #666); + background-image: -ms-linear-gradient(top, #333, #666); + background-image: -o-linear-gradient(top, #333, #666); + background-image: linear-gradient(to bottom, #333, #666); + } +/* + Element: Inner track bar + Orientation: Horizontal + State: disabled + Notes: IE6, 7 & 8 +*/ +.oldie .fd-slider-disabled .fd-slider-bar + { + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ff666666',endColorstr='#ff333333'); + } +/* + Element: Inner track bar + Orientation: Vertical + State: disabled + Notes: IE6, 7 & 8 +*/ +.oldie .fd-slider-vertical .fd-slider-disabled .fd-slider-bar + { + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ff666666',endColorstr='#ff333333'); + } +/* + Element: Range bar + Orientation: Horizontal + State: disabled +*/ +.fd-slider-disabled .fd-slider-range + { + cursor:auto !important; + background-color:#222; + background-image: -webkit-gradient(linear, left top, right top, from(#222), to(#000)); + background-image: -webkit-linear-gradient(left, #222, #000); + background-image: -moz-linear-gradient(left, #222, #000); + background-image: -ms-linear-gradient(left, #222, #000); + background-image: -o-linear-gradient(left, #222, #000); + background-image: linear-gradient(to right, #222, #000); + } +/* + Element: Range bar + Orientation: Horizontal + State: disabled + Notes: IE6, 7 & 8 +*/ +.oldie .fd-slider-disabled .fd-slider-range + { + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=0,startColorstr='#ff222222',endColorstr='#ff000000'); + } +/* + Element: Range bar + Orientation: Vertical + State: disabled +*/ +.fd-slider-vertical .fd-slider-disabled .fd-slider-range + { + background-image: -webkit-gradient(linear, left top, right bottom, from(#000), to(#222)); + background-image: -webkit-linear-gradient(top, #000, #222); + background-image: -moz-linear-gradient(top, #000, #222); + background-image: -ms-linear-gradient(top, #000, #222); + background-image: -o-linear-gradient(top, #000, #222); + background-image: linear-gradient(to bottom, #000, #222); + } +/* + Element: Range bar + Orientation: Vertical + State: disabled + Notes: IE6, 7 & 8 +*/ +.oldie .fd-slider-vertical .fd-slider-disabled .fd-slider-range + { + filter: progid:DXImageTransform.Microsoft.gradient(GradientType=1,startColorstr='#ff222222',endColorstr='#ff000000'); + } +/* + The various prefixed keyframe rules for the glow effect used whenever + the slider gains keyboard focus +*/ +@-webkit-keyframes fd-pulse { +0% { + box-shadow:0 0 3px rgba(100, 130, 170, 0.55); + } +20% { + box-shadow:0 0 4px rgba(70, 130, 170, 0.6); + } +40% { + box-shadow:0 0 5px rgba(40, 130, 170, 0.65); + } +60% { + box-shadow:0 0 6px rgba(10, 130, 170, 0.7); + } +80% { + box-shadow:0 0 5px rgba(40, 130, 170, 0.65); + } +100% { + box-shadow:0 0 4px rgba(70, 130, 170, 0.6); + } +} +@-moz-keyframes fd-pulse { +0% { + box-shadow:0 0 3px rgba(100, 130, 170, 0.55); + } +20% { + box-shadow:0 0 4px rgba(70, 130, 170, 0.6); + } +40% { + box-shadow:0 0 5px rgba(40, 130, 170, 0.65); + } +60% { + box-shadow:0 0 6px rgba(10, 130, 170, 0.7); + } +80% { + box-shadow:0 0 5px rgba(40, 130, 170, 0.65); + } +100% { + box-shadow:0 0 4px rgba(70, 130, 170, 0.6); + } +} +@-ms-keyframes fd-pulse { +0% { + box-shadow:0 0 3px rgba(100, 130, 170, 0.55); + } +20% { + box-shadow:0 0 4px rgba(70, 130, 170, 0.6); + } +40% { + box-shadow:0 0 5px rgba(40, 130, 170, 0.65); + } +60% { + box-shadow:0 0 6px rgba(10, 130, 170, 0.7); + } +80% { + box-shadow:0 0 5px rgba(40, 130, 170, 0.65); + } +100% { + box-shadow:0 0 4px rgba(70, 130, 170, 0.6); + } +} +@-o-keyframes fd-pulse { +0% { + box-shadow:0 0 3px rgba(100, 130, 170, 0.55); + } +20% { + box-shadow:0 0 4px rgba(70, 130, 170, 0.6); + } +40% { + box-shadow:0 0 5px rgba(40, 130, 170, 0.65); + } +60% { + box-shadow:0 0 6px rgba(10, 130, 170, 0.7); + } +80% { + box-shadow:0 0 5px rgba(40, 130, 170, 0.65); + } +100% { + box-shadow:0 0 4px rgba(70, 130, 170, 0.6); + } +}