<head>
<title>Flexstore on Rails</title>
<%= stylesheet_link_tag "flexstore", :media => "all" %>
<script type="text/javascript" src="/flex/embedflash.js" ></script>
<script type="text/javascript" src="/flex/FABridge.js" ></script>
<script type="text/javascript" src="/yui/YAHOO.js" ></script>
<script type="text/javascript" src="/yui/event.js" ></script>
<script type="text/javascript" src="/yui/dom.js" ></script>
<script type="text/javascript" src="/yui/dragdrop.js" ></script>
<script type="text/javascript" src="/yui/slider.js" ></script>
<script type="text/javascript">
var slider1, slider2;
function init() {
document.getElementById("camera").checked = false;
document.getElementById("video").checked = false;
document.getElementById("triband").checked = false;
slider1 = YAHOO.widget.Slider.getHorizSlider("slider1", "thumb1", 0, 200, 2);
slider1.onChange = function(offsetFromStart) {
var newValue = offsetFromStart * 5;
document.getElementById("value1").innerHTML = newValue;
var flexApp = FABridge.store.root();
flexApp.setMinimum(newValue);
};
slider1.onMouseUp = function() {
var flexApp = FABridge.store.root();
flexApp.layoutTiles();
};
slider2 = YAHOO.widget.Slider.getHorizSlider("slider2", "thumb2", 200, 0, 2);
slider2.onChange = function(offsetFromStart) {
var newValue = 1000 + offsetFromStart * 5;
document.getElementById("value2").innerHTML = newValue;
var flexApp = FABridge.store.root();
flexApp.setMaximum(newValue);
};
slider2.onMouseUp = function() {
var flexApp = FABridge.store.root();
flexApp.layoutTiles();
};
}
window.onload = init;
</script>
</head>
<body style="margin-top:20px; margin-left:20px;">
Select your price range:<br />
<br />
<div id="slider1" class="sliderBG"
onkeypress="return handleHorizSliderKey(this, YAHOO.util.Event.getEvent(event))" >
Minimum: $<span id="value1" >0</span>
<div id="thumb1" class="thumb"><img id="img1" src="/yui/horizSlider.png"></div>
</div>
<br /><br />
<div id="slider2" class="sliderBG"
onkeypress="return handleHorizSliderKey(this, YAHOO.util.Event.getEvent(event))" >
Maximum: $<span id="value2" >1000</span>
<div id="thumb2" class="thumb" style="left:200px"><img src="/yui/horizSlider.png"></div>
</div>
<br /><br />
Select the required features<br />on your mobile device:<br />
<br />
<table>
<tr><td><input type="checkbox" id="camera" onClick="var app = FABridge.store.root();app.setCamera(this.checked);"/></td><td>Camera</td></tr>
<tr><td><input type="checkbox" id="video" onClick="var app = FABridge.store.root();app.setVideo(this.checked);"/></td><td>Video</td></tr>
<tr><td><input type="checkbox" id="triband" onClick="var app = FABridge.store.root();app.setTriband(this.checked);"/></td><td>Triband</td></tr>
</table>
<div id="flex">
<script>embedFlash("flexApp", "/flex/catalog.swf", 690, 510, "bridgeName=store");</script>
</div>
</body>
</html>
<li>	Test the application 
http://localhost:3000/store/flex