Added Fluxnet Site
This commit is contained in:
@@ -63,6 +63,7 @@
|
|||||||
<Compile Include="Models\CntrlComparison.cs" />
|
<Compile Include="Models\CntrlComparison.cs" />
|
||||||
<Compile Include="Models\CntrlComparisonFittingInfo.cs" />
|
<Compile Include="Models\CntrlComparisonFittingInfo.cs" />
|
||||||
<Compile Include="Models\CntrlComparisonPhotosyntheticInfo.cs" />
|
<Compile Include="Models\CntrlComparisonPhotosyntheticInfo.cs" />
|
||||||
|
<Compile Include="Models\FluxnetSite.cs" />
|
||||||
<Compile Include="Models\LeafInput.cs" />
|
<Compile Include="Models\LeafInput.cs" />
|
||||||
<Compile Include="Models\LeafInputData.cs" />
|
<Compile Include="Models\LeafInputData.cs" />
|
||||||
<Compile Include="Models\LeafInputFile.cs" />
|
<Compile Include="Models\LeafInputFile.cs" />
|
||||||
|
|||||||
@@ -0,0 +1,10 @@
|
|||||||
|
namespace LeafWeb.Core.Models
|
||||||
|
{
|
||||||
|
public class FluxnetSite
|
||||||
|
{
|
||||||
|
public string FluxnetId { get; set; }
|
||||||
|
public string SiteName { get; set; }
|
||||||
|
public string Country { get; set; }
|
||||||
|
public string LandUnit { get; set; }
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -4,5 +4,12 @@ $(document)
|
|||||||
var input = $(this),
|
var input = $(this),
|
||||||
numFiles = input.get(0).files ? input.get(0).files.length : 1,
|
numFiles = input.get(0).files ? input.get(0).files.length : 1,
|
||||||
label = input.val().replace(/\\/g, '/').replace(/.*\//, '');
|
label = input.val().replace(/\\/g, '/').replace(/.*\//, '');
|
||||||
input.trigger('fileselect', [numFiles, label]);
|
input.trigger('fileselect', [input, numFiles, label]);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
$('.btn-file :file').on('fileselect', function (event, input, numFiles, label) {
|
||||||
|
console.log(numFiles);
|
||||||
|
console.log(label);
|
||||||
|
});
|
||||||
|
});
|
||||||
@@ -1,29 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Configuration;
|
|
||||||
|
|
||||||
namespace LeafWeb.Web.Utility
|
|
||||||
{
|
|
||||||
public static class DateTimeExtensions
|
|
||||||
{
|
|
||||||
static string timeZoneId = ConfigurationManager.AppSettings["TimeZoneId"] ?? "W. Europe Standard Time";
|
|
||||||
|
|
||||||
public static DateTime ToLocalTime(this DateTime dt)
|
|
||||||
{
|
|
||||||
// dt.DateTimeKind should be Utc!
|
|
||||||
var tzi = TimeZoneInfo.FindSystemTimeZoneById(timeZoneId);
|
|
||||||
return TimeZoneInfo.ConvertTimeFromUtc(DateTime.SpecifyKind(dt, DateTimeKind.Utc), tzi);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static DateTime ToUtcTime(this DateTime dt)
|
|
||||||
{
|
|
||||||
var tzi = TimeZoneInfo.FindSystemTimeZoneById(timeZoneId);
|
|
||||||
return TimeZoneInfo.ConvertTimeToUtc(dt, tzi);
|
|
||||||
}
|
|
||||||
|
|
||||||
public static DateTime RoundDown(this DateTime dateTime, int minutes)
|
|
||||||
{
|
|
||||||
return new DateTime(dateTime.Year, dateTime.Month,
|
|
||||||
dateTime.Day, dateTime.Hour, (dateTime.Minute / minutes) * minutes, 0);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -1,25 +0,0 @@
|
|||||||
using System;
|
|
||||||
using System.Threading;
|
|
||||||
using System.Web;
|
|
||||||
using System.Web.Mvc;
|
|
||||||
|
|
||||||
namespace LeafWeb.Web.Utility
|
|
||||||
{
|
|
||||||
public static class LocalizationHelper
|
|
||||||
{
|
|
||||||
[Obsolete("specifying the language through <meta http-equiv=\"content-language\" content= > is obsolete. Use <html lang=> instead")]
|
|
||||||
public static IHtmlString MetaContentLanguage(this HtmlHelper html)
|
|
||||||
{
|
|
||||||
var acceptLang = HttpUtility.HtmlAttributeEncode(Thread.CurrentThread.CurrentUICulture.ToString());
|
|
||||||
return new HtmlString(string.Format("<meta http-equiv=\"content-language\" content=\"{0}\"/>", acceptLang));
|
|
||||||
}
|
|
||||||
|
|
||||||
public static string Lang
|
|
||||||
{
|
|
||||||
get
|
|
||||||
{
|
|
||||||
return HttpUtility.HtmlAttributeEncode(Thread.CurrentThread.CurrentUICulture.ToString());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -4,19 +4,21 @@
|
|||||||
<p>
|
<p>
|
||||||
There is no limit on the number of files you may submit for analysis. Keep selecting files and hitting the Add button until all of the files you need to upload are shown in the list. Then enter an identifier for this set of data and click the Upload button.
|
There is no limit on the number of files you may submit for analysis. Keep selecting files and hitting the Add button until all of the files you need to upload are shown in the list. Then enter an identifier for this set of data and click the Upload button.
|
||||||
</p>
|
</p>
|
||||||
@using (Html.BeginForm("Index", "LeafInput", FormMethod.Post, new { @class = "form-horizontal well" }))
|
<div class="row">
|
||||||
{
|
<div class="col-md-5">
|
||||||
@Html.Partial("_ValidationSummary")
|
@using (Html.BeginForm("Index", "LeafInput", FormMethod.Post, new {@class = "form-horizontal well", enctype= "multipart/form-data" }))
|
||||||
<fieldset>
|
{
|
||||||
<legend></legend>
|
@Html.Partial("_ValidationSummary")
|
||||||
@Html.EditorFor(m=> m.Name)
|
<fieldset>
|
||||||
@Html.EditorFor(m=> m.Email)
|
@Html.EditorFor(m => m.Name)
|
||||||
@Html.EditorFor(m=> m.EmailConfirm)
|
@Html.EditorFor(m => m.Email)
|
||||||
@Html.EditorFor(m=> m.LeafInputId)
|
@Html.EditorFor(m => m.EmailConfirm)
|
||||||
@Html.EditorFor(m=> m.SiteID)
|
@Html.EditorFor(m => m.LeafInputId)
|
||||||
@Html.EditorFor(m=> m.Files)
|
@Html.EditorFor(m => m.SiteID)
|
||||||
<div class="form-actions">
|
@Html.EditorFor(m => m.Files)
|
||||||
<input type="submit" value="Create" class="btn btn-primary" />
|
<div class="form-actions">
|
||||||
</div>
|
<input type="submit" value="Create" class="btn btn-primary"/>
|
||||||
</fieldset>
|
</div>
|
||||||
}
|
</fieldset>
|
||||||
|
}</div>
|
||||||
|
</div>
|
||||||
@@ -27,7 +27,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Html.TextBox(
|
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, htmlAttributes)
|
||||||
"",
|
|
||||||
ViewData.TemplateInfo.FormattedModelValue,
|
|
||||||
htmlAttributes)
|
|
||||||
@@ -2,16 +2,6 @@
|
|||||||
@model int?
|
@model int?
|
||||||
|
|
||||||
@{
|
@{
|
||||||
int i;
|
|
||||||
if (!Model.HasValue)
|
|
||||||
{
|
|
||||||
i = 0;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
i = Model.Value;
|
|
||||||
}
|
|
||||||
|
|
||||||
var htmlAttributes = new RouteValueDictionary();
|
var htmlAttributes = new RouteValueDictionary();
|
||||||
if (ViewBag.@class != null)
|
if (ViewBag.@class != null)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -3,14 +3,7 @@
|
|||||||
|
|
||||||
@{
|
@{
|
||||||
float f;
|
float f;
|
||||||
if (!Model.HasValue)
|
f = !Model.HasValue ? 0.0f : Model.Value;
|
||||||
{
|
|
||||||
f = 0.0f;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
f = Model.Value;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
<div class="form-group@(Html.ValidationErrorFor(m => m, " has-error"))">
|
<div class="form-group@(Html.ValidationErrorFor(m => m, " has-error"))">
|
||||||
|
|||||||
@@ -22,5 +22,4 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, htmlAttributes)
|
||||||
@Html.TextBox("", ViewData.TemplateInfo.FormattedModelValue, htmlAttributes)
|
|
||||||
@@ -11,10 +11,8 @@
|
|||||||
}
|
}
|
||||||
<div class="form-group @lowerPropertyName">
|
<div class="form-group @lowerPropertyName">
|
||||||
@Html.LabelForModel(new { @class = "control-label" })
|
@Html.LabelForModel(new { @class = "control-label" })
|
||||||
<div class="controls">
|
@RenderBody()
|
||||||
@RenderBody()
|
@Html.ValidationMessage("", new { @class = "help-block"})
|
||||||
@Html.ValidationMessage("", new { @class = "help-block"})
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -618,8 +618,6 @@
|
|||||||
<DependentUpon>Global.asax</DependentUpon>
|
<DependentUpon>Global.asax</DependentUpon>
|
||||||
</Compile>
|
</Compile>
|
||||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||||
<Compile Include="Utility\DateTimeExtensions.cs" />
|
|
||||||
<Compile Include="Utility\LocalizationHelper.cs" />
|
|
||||||
<Compile Include="Utility\MarkdownHelper.cs" />
|
<Compile Include="Utility\MarkdownHelper.cs" />
|
||||||
<Compile Include="Utility\Validation.cs" />
|
<Compile Include="Utility\Validation.cs" />
|
||||||
<Compile Include="ViewModels\LeafInput\CreateViewModel.cs" />
|
<Compile Include="ViewModels\LeafInput\CreateViewModel.cs" />
|
||||||
|
|||||||
Reference in New Issue
Block a user