Commit b7971188 by Julian Arni

review fixes

parent e0ab75fb
...@@ -64,10 +64,8 @@ function showUploadModal(e) { ...@@ -64,10 +64,8 @@ function showUploadModal(e) {
showUploadFeedback(e, percentComplete); showUploadFeedback(e, percentComplete);
}, },
maxFileSize: 10 * 1000 * 1000, // 100 MB maxFileSize: 10 * 1000 * 1000, // 100 MB
maxNumberofFiles: 30, maxNumberofFiles: 100,
add: function(e, data) { add: function(e, data) {
// Uncomment this line to get html template on load
// var html = assetUploadTemplate(data.files);
data.process().done(function () { data.process().done(function () {
data.submit(); data.submit();
}); });
...@@ -81,18 +79,6 @@ function showUploadModal(e) { ...@@ -81,18 +79,6 @@ function showUploadModal(e) {
$modalCover.show(); $modalCover.show();
} }
function assetUploadTemplate(files) {
var compiled = _.template('<tr class="modal-asset>' +
'<td><span class="modal-asset new"></span></td>' +
'<td><p class="modal-asset name"> <%= file.name %></td>' +
'</tr>');
var html = '';
for (var i=0; i < files.length; i++) {
html += compiled({ file: files[i]});
}
return html;
}
function showFileSelectionMenu(e) { function showFileSelectionMenu(e) {
e.preventDefault(); e.preventDefault();
$('.file-input').click(); $('.file-input').click();
......
...@@ -42,12 +42,12 @@ ...@@ -42,12 +42,12 @@
<div class="wrapper-mast wrapper"> <div class="wrapper-mast wrapper">
<header class="mast has-actions has-subtitle"> <header class="mast has-actions has-subtitle">
<h1 class="page-header"> <h1 class="page-header">
<small class="subtitle">Content</small> <small class="subtitle">${_("Content")}</small>
<span class="sr">&gt; </span>Files &amp; Uploads <span class="sr">&gt; </span>${_("Files &amp; Uploads")}
</h1> </h1>
<nav class="nav-actions"> <nav class="nav-actions">
<h3 class="sr">Page Actions</h3> <h3 class="sr">${_("Page Actions")}</h3>
<ul> <ul>
<li class="nav-item"> <li class="nav-item">
<a href="#" class="button upload-button new-button"><i class="icon-plus"></i> ${_("Upload New File")}</a> <a href="#" class="button upload-button new-button"><i class="icon-plus"></i> ${_("Upload New File")}</a>
...@@ -117,22 +117,22 @@ ...@@ -117,22 +117,22 @@
<div class="upload-modal modal"> <div class="upload-modal modal">
<a href="#" class="close-button"><span class="close-icon"></span></a> <a href="#" class="close-button"><span class="close-icon"></span></a>
<div class="modal-body"> <div class="modal-body">
<h1>Upload New File</h1> <h1>S{_("Upload New File")}</h1>
<p class="file-name"></a> <p class="file-name"></a>
<div class="progress-bar"> <div class="progress-bar">
<div class="progress-fill"></div> <div class="progress-fill"></div>
</div> </div>
<div class="embeddable"> <div class="embeddable">
<label>URL:</label> <label>URL:</label>
<input type="text" class="embeddable-xml-input" value='' readonly> <input type="text" class="embeddable-xml-input" value='' readonly>
</div> </div>
<form class="file-chooser" action="${upload_asset_callback_url}" <form class="file-chooser" action="${upload_asset_callback_url}"
method="post" enctype="multipart/form-data"> method="post" enctype="multipart/form-data">
<a href="#" class="choose-file-button">Choose File</a> <a href="#" class="choose-file-button">Choose File</a>
<input type="file" class="file-input" name="files[]" multiple> <input type="file" class="file-input" name="files[]" multiple>
</form> </form>
</div> </div>
</div> </div>
<div class="modal-cover"></div> <div class="modal-cover"></div>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment