28 lines
1020 B
Plaintext
28 lines
1020 B
Plaintext
@model LeafWeb.Web.ViewModels.LeafCharter.LeafCharterViewModel
|
|
|
|
@Html.DropDownList("CurveId", new SelectList(Model.AvailableCurveId, Model.CurveId), "Select CurveId")
|
|
|
|
<img id="chart"/>
|
|
|
|
@section Scripts
|
|
{
|
|
<script type="text/javascript">
|
|
$(function () {
|
|
$('#CurveId')
|
|
.change(function () {
|
|
var $chart = $("#chart");
|
|
var $spinner = $(this).after('<i class="fa fa-spinner fa-spin"></i>').next('i');
|
|
$chart.attr('src', "");
|
|
var curveId = $("option:selected", this).text();
|
|
var url =
|
|
"@Html.Raw(Url.Action("LeafCharts", new {leafInputId = Model.LeafInputId, curveId="curveId"}))";
|
|
url = url.replace("=curveId", "=" + curveId);
|
|
$chart.attr('src', url)
|
|
.load(function() {
|
|
$spinner.remove();
|
|
});
|
|
});
|
|
});
|
|
</script>
|
|
}
|