Skip to content

Commit

Permalink
fixes #23
Browse files Browse the repository at this point in the history
  • Loading branch information
Eugene Terentev committed Apr 7, 2015
1 parent 8c27a48 commit b4fa813
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 10 deletions.
9 changes: 5 additions & 4 deletions src/widget/Upload.php
Expand Up @@ -84,10 +84,11 @@ public function init()
$this->clientOptions,
[
'url' => Url::to($this->url),
'multiple'=>$this->multiple,
'sortable'=>$this->sortable,
'maxNumberOfFiles'=>$this->maxNumberOfFiles,
'maxFileSize'=>$this->maxFileSize,
'multiple' => $this->multiple,
'sortable' => $this->sortable,
'maxNumberOfFiles' => $this->maxNumberOfFiles,
'maxFileSize' => $this->maxFileSize,
'acceptFileTypes' => $this->acceptFileTypes,
'files' => $this->files
]
);
Expand Down
14 changes: 8 additions & 6 deletions src/widget/assets/js/upload-kit.js
Expand Up @@ -35,10 +35,10 @@
.after($('<span class="glyphicon glyphicon-circle-arrow-down drag"></span>'))
.after($('<span/>', {"data-toggle":"popover", "class":"glyphicon glyphicon-exclamation-sign error-popover"}))
.after(
'<div class="progress">'+
'<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>'+
'</li>'
);
'<div class="progress">'+
'<div class="progress-bar" role="progressbar" aria-valuenow="0" aria-valuemin="0" aria-valuemax="100"></div>'+
'</li>'
);
$files.on('click', '.upload-kit-item .remove', methods.removeItem);
methods.checkInputVisibility();
methods.fileuploadInit();
Expand All @@ -55,7 +55,9 @@
multiple: options.multiple,
maxNumberOfFiles: options.maxNumberOfFiles,
maxFileSize: options.maxFileSize, // 5 MB
acceptFileTypes: options.acceptFileTypes,
acceptFileTypes: options.acceptFileTypes
? new RegExp(options.acceptFileTypes)
: null,
process: true,
getNumberOfFiles: methods.getNumberOfFiles,
start: function (e, data) {
Expand All @@ -65,7 +67,7 @@
},
processfail: function(e, data) {
if (data.files.error) {
methods.showError(data.files[0].file.error);
methods.showError(data.files[0].error);
}
},
progressall: function (e, data) {
Expand Down

0 comments on commit b4fa813

Please sign in to comment.