Widget:CJP4: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
Line 63: | Line 63: | ||
function updateDisplay() { | function updateDisplay() { | ||
$("#slider").slider({ | |||
min: 0, | |||
max: 25, | |||
step: 1, | |||
values: [1,25], | |||
slide: function(event, ui) { | |||
if (ui.values[0] < ui.values[1]) | |||
{ | |||
$("input.pillSizeSlider[data-index=0]").val(ui.values[0]); | |||
$("input.pillSizeSlider[data-index=1]").val(ui.values[1]); | |||
} | |||
else if (ui.values[0] > ui.values[1]) | |||
{ | |||
$("input.pillSizeSlider[data-index=1]").val(ui.values[0]); | |||
$("input.pillSizeSlider[data-index=0]").val(ui.values[1]); | |||
} | |||
else | |||
{ | |||
$("input.pillSizeSlider[data-index=0]").val(ui.values[0]); | |||
$("input.pillSizeSlider[data-index=1]").val(ui.values[1]); | |||
} | |||
} | |||
}); | |||
$("input.pillSizeSlider").change(function() { | |||
var $this = $(this); | |||
$("#slider").slider("values", $this.data("index"), $this.val()); | |||
}); | |||
if (document.getElementById('selectedShape').value) | if (document.getElementById('selectedShape').value) | ||
{ | { | ||
Line 450: | Line 480: | ||
</div> | </div> | ||
<div id="propertySize-container"> | <div id="propertySize-container"> | ||
Show Pills | Show Pills between:<input type="text" class="pillSizeSlider" data-index="0" name="selectedMinSize" id="selectedMinSize" size="5" /> mm and <input type="text" class="pillSizeSlider" data-index="1" name="selectedMaxSize" id="selectedMaxSize" size="5" /> mm | ||
<br/> | <br/> | ||
<div id="slider"></div> | |||
</div> | </div> | ||
<div id="propertyNDCIngreds-container"> | <div id="propertyNDCIngreds-container"> |