Add CurveId Selection for charter

This commit is contained in:
2016-04-25 11:26:53 -04:00
parent 74641c5cf1
commit 8c218cda48
14 changed files with 2747 additions and 10 deletions
+26 -2
View File
@@ -1,3 +1,27 @@
@model int
@model LeafWeb.Web.ViewModels.LeafCharter.LeafCharterViewModel
<img src="@Url.Action("LeafCharts", new {leafInputId = Model})" alt="image" />
@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>
}