Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Finish up file upload directive, fix #374
- Loading branch information
Showing
4 changed files
with
119 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,41 @@ | ||
<div class="file-upload"> | ||
<ul> | ||
<li ng-repeat="file in files">{{file.fileName}}<span class="clickable red"><i class="icon-remove" title="Delete {{file.filename}}" ng-click="delete(file.fileName)"></i></span></li> | ||
</ul> | ||
<form name="file-upload" action="upload" method="post" enctype="multipart/form-data"> | ||
<fieldset> | ||
<input type="hidden" name="parent" value="{{target}}"> | ||
<input type="file" name="file"> | ||
</fieldset> | ||
</form> | ||
|
||
<div ng-show="showFiles" class="row-fluid"> | ||
<table class="table table-striped"> | ||
<thead> | ||
<tr> | ||
<th>Name</th> | ||
<th>Size</th> | ||
<th></th> | ||
</tr> | ||
</thead> | ||
<tbody> | ||
<tr ng-repeat="file in files"> | ||
<td>{{file.fileName}}</td> | ||
<td>{{file.length}}</td> | ||
<td><span class="clickable red"><i class="icon-remove" title="Delete {{file.filename}}" ng-click="delete(file.fileName)"></i></span></td> | ||
</tr> | ||
<tr> | ||
<td colspan="3" style="background: inherit;"> | ||
</td> | ||
</tr> | ||
</tbody> | ||
</table> | ||
</div> | ||
|
||
<div class="row-fluid"> | ||
<form class="no-bottom-margin" name="file-upload" action="upload" method="post" enctype="multipart/form-data"> | ||
<fieldset> | ||
<input type="hidden" name="parent" value="{{target}}"> | ||
<input type="file" style="display: none;" name="files[]" multiple> | ||
<div class="input-prepend"> | ||
<input type="button" class="btn" value="Add"> | ||
<div class="span2 progress progress-striped"> | ||
<div class="bar" style="width: {{percentComplete}}%;"></div> | ||
</div> | ||
</div> | ||
</fieldset> | ||
</form> | ||
</div> | ||
|
||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters