Skip to content

Commit

Permalink
ccc
Browse files Browse the repository at this point in the history
  • Loading branch information
emnabs committed Nov 9, 2017
1 parent f485af5 commit 04d6342
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
24 changes: 11 additions & 13 deletions Plupload.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,16 +42,7 @@ class Plupload extends InputWidget {
public $previewOptions = ['class' => 'plupload_preview'];
public $containerOptions = ['class' => 'plupload_container'];
//
public $options = [
'filters' => [
'mime_types' => [
[
'title' => "Image files",
'extensions' => "jpg,gif,png"
],
]
],
];
public $options = [];
public $autoUpload = true;
public $showUploadProgress = true;
public $chunk_size = 0;
Expand Down Expand Up @@ -230,11 +221,18 @@ public function registerAssets() {
'list' => true,
'thumbs' => true,
'active' => 'thumbs'
]
],
'filters' => [
'mime_types' => [
[
'title' => "Image files",
'extensions' => "jpg,gif,png"
],
]
],
];

$options = ArrayHelper::merge($defaultOptions, $this->options);
$options = Json::encode($options);
$options = Json::encode(ArrayHelper::merge($defaultOptions, $this->options));

$scripts = implode("\n", [
"var {$this->id} = new plupload.Uploader({$options});",
Expand Down
1 change: 0 additions & 1 deletion PluploadAsset.php
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ class PluploadAsset extends AssetBundle {
*/
public $depends = [
'yii\web\JqueryAsset',
'yii\bootstrap\BootstrapAsset',
];

/**
Expand Down

0 comments on commit 04d6342

Please sign in to comment.