Bug Tracker

Show
Ignore:
Timestamp:
03/17/08 15:02:33 (10 months ago)
Author:
joern.zaefferer
Message:

ui.slider: fixed ranges to never overlap (first handle is always smaller smaller then second handle); refactored drag and moveTo to reuse computations; code formatting cleanup

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/ui/tests/slider.html

    r5000 r5060  
    3939 
    4040 
     41.zoom { position: relative } 
     42 
     43.handle{ 
     44    position: absolute;  
     45    height: 5px; 
     46    width: 21px; 
     47    margin-left: -3px; 
     48    background-color: #6EA8FE; 
     49    border: solid 1px #000; 
     50    cursor: pointer; 
     51    font-size: 1px; 
     52} 
     53 
     54.slider{ 
     55    background: url(images/zoom_bar.png); 
     56    height: 137px; 
     57    width: 18px; 
     58} 
     59 
    4160 
    4261</style> 
     
    6584<div id='slider2' style="position: absolute; top: 0px; right: 0px; margin: 20px; height: 400px; width: 20px; background: #ccc;"> 
    6685    <div class='ui-slider-handle' style='height: 20px; background: #888;'></div>     
     86</div> 
     87 
     88<div class="zoom"> 
     89    <img src="images/zoom_plus.png" height="16" width="18" class="theme_backgroundColor" /><br/> 
     90    <div class="slider"><div class="handle"></div></div><br/> 
     91    <img src="images/zoom_minus.png" height="15" width="18" class="theme_backgroundColor" style="position: absolute; top: 160px;" /> 
    6792</div> 
    6893     
     
    113138     
    114139    $(".range").rangeSlider(); 
     140     
     141     $(".slider").slider({ 
     142        handle: '.handle', 
     143        steps: 10, 
     144        startValue: 70 
     145    }); 
     146    $(".zoom img:first").click(function(){ 
     147        $(".slider").slider("moveTo", "-=10" ); 
     148    }); 
     149    $(".zoom img:last").click(function(){ 
     150        $(".slider").slider("moveTo", "+=10"); 
     151    }); 
    115152 
    116153});