Leaf Input and Submit
This commit is contained in:
@@ -1,11 +1,13 @@
|
||||
@inherits UmbracoTemplatePage
|
||||
@{
|
||||
Layout = "Master.cshtml";
|
||||
|
||||
var leafInputBackload = GetBoolProperty(Model.Content.Properties, "leafInputBackload");
|
||||
}
|
||||
|
||||
@section Styles
|
||||
{
|
||||
@Styles.Render("~/backload/blueimp/bootstrap/BasicPlusUI/css")
|
||||
@if (leafInputBackload) { @Styles.Render("~/backload/blueimp/bootstrap/BasicPlusUI/css") }
|
||||
}
|
||||
|
||||
@CurrentPage.GetGridHtml("content", "fanoe")
|
||||
@@ -13,15 +15,32 @@
|
||||
@section Scripts
|
||||
{
|
||||
<!-- Scripts for the jQquery File Upload Plugin in Basic Plus UI style* -->
|
||||
@Scripts.Render("~/backload/blueimp/bootstrap/BasicPlusUI")
|
||||
@if (leafInputBackload) { @Scripts.Render("~/backload/blueimp/bootstrap/BasicPlusUI") }
|
||||
<!-- jQuery autocomplete* -->
|
||||
@Scripts.Render("~/bundles/autocomplete")
|
||||
<!-- The application script -->
|
||||
<script src="/Scripts/LeafInput.js"></script>
|
||||
<script type="text/javascript">
|
||||
initFileUpload("@Session.SessionID");
|
||||
$('input#SiteId').autocomplete({
|
||||
serviceUrl: '/FluxnetSite/Autocomplete'
|
||||
});
|
||||
</script>
|
||||
@if (leafInputBackload) { <script src="~/scripts/jquery.autocomplete.min.js"></script> }
|
||||
|
||||
@if (leafInputBackload)
|
||||
{
|
||||
<script src="~/scripts/LeafInputCreate.js"></script>
|
||||
|
||||
<script type="text/javascript">
|
||||
$(function () {
|
||||
initFileUpload("@Session.SessionID");
|
||||
$('input#SiteId').autocomplete({
|
||||
serviceUrl: '/umbraco/surface/FluxnetSite/Autocomplete'
|
||||
});
|
||||
});
|
||||
</script>
|
||||
}
|
||||
}
|
||||
|
||||
@functions {
|
||||
private static bool GetBoolProperty(ICollection<IPublishedProperty> props, string propertyTypeAlias)
|
||||
{
|
||||
var backload =
|
||||
props.FirstOrDefault(p => p.PropertyTypeAlias.Equals(propertyTypeAlias)) != null
|
||||
? (bool)props.FirstOrDefault(p => p.PropertyTypeAlias.Equals(propertyTypeAlias)).Value
|
||||
: false;
|
||||
return backload;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user