Leaf Input and Submit

This commit is contained in:
2016-12-06 11:53:30 -05:00
parent a3b8b7a881
commit 6fd7e46f5d
74 changed files with 56144 additions and 1291 deletions
@@ -0,0 +1,24 @@
using System.Linq;
using System.Web.Mvc;
namespace LeafWeb.WebCms.Controllers
{
public class FluxnetSiteController : BaseController
{
public JsonResult Autocomplete(string query)
{
var sites = DataService.GetFluxnetSitesAutocomplete(query).Take(50).ToList();
var data = new
{
suggestions =
from s in sites
select new
{
value = $"{s.SiteName} / {s.FluxnetId}",
data = s.FluxnetId
}
};
return Json(data, JsonRequestBehavior.AllowGet);
}
}
}