Update chart UI, update Jquery
This commit is contained in:
@@ -1 +1 @@
|
||||
C:\Users\poprhythm\AppData\Local\Temp\Temporary ASP.NET Files\vs\f80e29bb\faae20bf\App_Web_all.generated.cs.8f9494c4.ymeptwl9.dll
|
||||
C:\Users\poprhythm\AppData\Local\Temp\Temporary ASP.NET Files\vs\f80e29bb\faae20bf\App_Web_all.generated.cs.8f9494c4.q2jvbaow.dll
|
||||
@@ -17,7 +17,7 @@
|
||||
Html.RequiresCss("~/Content/site.css");
|
||||
Html.RequiresCss("~/Content/style.css");
|
||||
Html.RequiresCss("~/css/rte.css");
|
||||
Html.RequiresJs("~/scripts/jquery-1.11.1.js", 0);
|
||||
Html.RequiresJs("~/scripts/jquery-1.12.4.js", 0);
|
||||
Html.RequiresJs("~/scripts/bootstrap.js", 0);
|
||||
Html.RequiresJs("~/scripts/site.js");
|
||||
}
|
||||
|
||||
@@ -46,8 +46,5 @@
|
||||
|
||||
@helper ChartLink(dynamic item)
|
||||
{
|
||||
if (item.HasLeafChart)
|
||||
{
|
||||
@Html.Partial("DisplayTemplates/_ChartLink", (int)item.LeafInputId)
|
||||
}
|
||||
@Html.Partial("DisplayTemplates/_ChartLink", (int)item.LeafInputId)
|
||||
}
|
||||
@@ -19,6 +19,6 @@
|
||||
{
|
||||
if (item.HasLeafChart)
|
||||
{
|
||||
@Html.Partial("DisplayTemplates/_ChartLink", (int)item.LeafInputId)
|
||||
@Html.Partial("DisplayTemplates/_ChartButton", (int)item.LeafInputId)
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,6 @@
|
||||
@model int
|
||||
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1100)?leafInputId=@Model" class="btn btn-default btn-xs" role="button">
|
||||
<span class="glyphicon glyphicon-stats"></span>
|
||||
Chart
|
||||
</a>
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
@model int
|
||||
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1100)?leafInputId=@Model" class="btn btn-default btn-xs" role="button">
|
||||
<a href="@UmbracoContext.Current.UrlProvider.GetUrl(1100)?leafInputId=@Model">
|
||||
<span class="glyphicon glyphicon-stats"></span>
|
||||
Chart
|
||||
</a>
|
||||
|
||||
@@ -695,12 +695,13 @@
|
||||
<Content Include="Config\applications.config" />
|
||||
<Content Include="Config\404handlers.config" />
|
||||
<None Include="Properties\PublishProfiles\LeafWebUmbraco - Web Deploy.pubxml" />
|
||||
<None Include="scripts\jquery-1.11.1.intellisense.js" />
|
||||
<Content Include="scripts\Chart.js" />
|
||||
<Content Include="scripts\jquery-1.11.1.js" />
|
||||
<Content Include="scripts\jquery-1.11.1.min.js" />
|
||||
<None Include="scripts\jquery-1.12.4.intellisense.js" />
|
||||
<Content Include="scripts\jquery-1.12.4.js" />
|
||||
<Content Include="scripts\jquery-1.12.4.min.js" />
|
||||
<Content Include="scripts\jquery.autocomplete.js" />
|
||||
<Content Include="scripts\jquery.autocomplete.min.js" />
|
||||
<Content Include="scripts\jquery-1.12.4.min.map" />
|
||||
<None Include="scripts\jquery.validate-vsdoc.js" />
|
||||
<Content Include="scripts\jquery.validate.js" />
|
||||
<Content Include="scripts\jquery.validate.min.js" />
|
||||
@@ -753,7 +754,6 @@
|
||||
<SubType>Designer</SubType>
|
||||
</None>
|
||||
<None Include="Backload\Web.Backload.config" />
|
||||
<Content Include="scripts\jquery-1.11.1.min.map" />
|
||||
<Content Include="Views\Results\DownloadNotFound.cshtml" />
|
||||
<Content Include="Views\Results\Index.cshtml" />
|
||||
<Content Include="Views\MacroPartials\Results.cshtml" />
|
||||
@@ -790,6 +790,7 @@
|
||||
<Content Include="Views\Shared\DisplayTemplates\_ChartLink.cshtml" />
|
||||
<Content Include="Views\Shared\DisplayTemplates\_LeafInputStatus.cshtml" />
|
||||
<Content Include="Views\Shared\DisplayTemplates\_DetailsLink.cshtml" />
|
||||
<Content Include="Views\Shared\DisplayTemplates\_ChartButton.cshtml" />
|
||||
<None Include="Web.Debug.config">
|
||||
<DependentUpon>Web.config</DependentUpon>
|
||||
</None>
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
<package id="HtmlAgilityPack" version="1.4.9" targetFramework="net452" />
|
||||
<package id="ImageProcessor" version="2.4.5.0" targetFramework="net452" />
|
||||
<package id="ImageProcessor.Web" version="4.6.6.0" targetFramework="net452" />
|
||||
<package id="jQuery" version="1.11.1" targetFramework="net452" />
|
||||
<package id="jQuery" version="1.12.4" targetFramework="net452" />
|
||||
<package id="jquery.validate.unobtrusive.bootstrap" version="1.2.3" targetFramework="net452" />
|
||||
<package id="jQuery.Validation" version="1.11.1" targetFramework="net452" />
|
||||
<package id="Lucene.Net" version="2.9.4.1" targetFramework="net452" />
|
||||
|
||||
Vendored
+19
-14
@@ -16,32 +16,37 @@
|
||||
};
|
||||
|
||||
var baseUrl = "/umbraco/surface/Chart/ChartCurve";
|
||||
var $chart = $("#chart");
|
||||
var $chartError = $('#chart-error');
|
||||
|
||||
$('#CurveId')
|
||||
.change(function () {
|
||||
$('#chart-error').removeClass('text-danger').text('');
|
||||
var $chart = $("#chart");
|
||||
$chart.removeAttr('src');
|
||||
$chartError.removeClass('text-danger').text('');
|
||||
|
||||
// this is the "Select CurveId" instruction
|
||||
if (this.selectedIndex === 0) {
|
||||
$chart.removeAttr('src');
|
||||
return;
|
||||
}
|
||||
|
||||
var curveId = $("option:selected", this).text();
|
||||
|
||||
var $spinner = $chart.after('<span class="glyphicon glyphicon-refresh gly-spin" style="font-size: 3em"></span>').next('span');
|
||||
$chart.after('<span class="glyphicon glyphicon-refresh gly-spin" style="font-size: 3em"></span>');
|
||||
|
||||
var leafInputId = getUrlParameter("leafInputId");
|
||||
var url = baseUrl + "?leafInputId=" + leafInputId + "&curveId=" + curveId;
|
||||
$chart.load(function () {
|
||||
$spinner.remove();
|
||||
})
|
||||
.error(function () {
|
||||
//$chart.removeAttr('src');
|
||||
$spinner.remove();
|
||||
$('#chart-error').addClass('text-danger').text('A problem was encountered loading this chart.');
|
||||
return;
|
||||
})
|
||||
.attr('src', url);
|
||||
|
||||
$chart.attr('src', url);
|
||||
});
|
||||
|
||||
$chart.load(function () {
|
||||
$chart.next('span.gly-spin').remove(); // remove spinner
|
||||
})
|
||||
.error(function () {
|
||||
$chart.next('span.gly-spin').remove(); // remove spinner
|
||||
if ($chart.attr('src') != undefined) {
|
||||
$chart.removeAttr('src');
|
||||
$chartError.addClass('text-danger').text('A problem was encountered loading this chart.');
|
||||
}
|
||||
});
|
||||
});
|
||||
Vendored
-4
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Vendored
+2687
-1987
File diff suppressed because it is too large
Load Diff
Vendored
+5
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user