Clean up File upload on Leaf Input

This commit is contained in:
2016-02-04 11:52:32 -05:00
parent 10f7a23d31
commit 38247eb43f
+8 -26
View File
@@ -12,7 +12,7 @@
@Html.Partial("_StatusMessage")
<div class="row">
<div class="col-md-6 well">
<div class="col-md-7 well">
@using (Html.BeginForm("Index", "LeafInput", FormMethod.Post))
{
@Html.Partial("_ValidationSummary")
@@ -25,24 +25,17 @@
}
<!-- The file upload form used as target for the file upload widget -->
<form id="fileupload" action="/Backload/FileHandler" method="POST" enctype="multipart/form-data">
<label class="control-label">Files</label>
<!-- The fileupload-buttonbar contains buttons to add/delete files and start/cancel the upload -->
<div class="row fileupload-buttonbar">
<div class="col-lg-5">
<div class="col-lg-6">
<!-- The fileinput-button span is used to style the file input field as button -->
<span class="btn btn-default btn-sm fileinput-button">
<span class="btn btn-default fileinput-button">
<i class="glyphicon glyphicon-plus"></i>
<span>Add files...</span>
<input type="file" name="files[]" multiple>
</span>
@*<button type="submit" class="btn btn-primary start">
<i class="glyphicon glyphicon-upload"></i>
<span>Start upload</span>
</button>*@
@*<button type="reset" class="btn btn-default cancel">
<i class="glyphicon glyphicon-ban-circle"></i>
<span>Cancel upload</span>
</button>*@
<button type="button" class="btn btn-default btn-sm delete">
<button type="button" class="btn btn-default delete">
<i class="glyphicon glyphicon-trash"></i>
<span>Delete</span>
</button>
@@ -51,7 +44,7 @@
<span class="fileupload-process"></span>
</div>
<!-- The global progress state -->
<div class="col-lg-7 fileupload-progress fade">
<div class="col-lg-6 fileupload-progress fade">
<!-- The global progress bar -->
<div class="progress progress-striped active" role="progressbar" aria-valuemin="0" aria-valuemax="100">
<div class="progress-bar progress-bar-success" style="width: 0%;"></div>
@@ -71,9 +64,6 @@
<script id="template-upload" type="text/x-tmpl">
{% for (var i=0, file; file=o.files[i]; i++) { %}
<tr class="template-upload fade">
@*<td>
<span class="preview"></span>
</td>*@
<td>
<p class="name">{%=file.name%}</p>
<strong class="error text-danger"></strong>
@@ -98,19 +88,13 @@
</td>
</tr>
{% } %}
</script>
<!-- The template to display files available for download -->
<script id="template-download" type="text/x-tmpl">
{% for (var i=0, file; file=o.files[i]; i++) { %}
<tr class="template-download fade">
@*<td>
<span class="preview">
{% if (file.thumbnailUrl) { %}
<a href="{%=file.url%}" title="{%=file.name%}" download="{%=file.name%}" data-gallery><img src="{%=file.thumbnailUrl%}"></a>
{% } %}
</span>
</td>*@
<td>
<p class="name">
{% if (file.url) { %}
@@ -142,6 +126,7 @@
</td>
</tr>
{% } %}
</script>
@section Scripts
@@ -156,9 +141,6 @@
initFileUpload("@Session.SessionID");
$('input#SiteId').autocomplete({
serviceUrl: '/FluxnetSite/Autocomplete'
//onSelect: function (suggestion) {
// alert('You selected: ' + suggestion + ', ' + suggestion);
//}
});
</script>
}