File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change @@ -96,6 +96,11 @@ protected function setFileManagerConfig()
9696
9797 $ title = empty ($ this ->title ) ? getenv ('AFM_TITLE ' ) : $ this ->title ;
9898 $ lang = \Yii::$ app ->language ;
99+
100+ // resolve options for JavaScript
101+ $ enableThumbnails = $ this ->enableThumbnails ? 'true ' : 'false ' ;
102+ $ enableIconPreviewView = $ this ->enableIconPreviewView ? 'true ' : 'false ' ;
103+
99104 $ initFilemanagerJs = <<<JS
100105angular.module('FileManagerApp').config(['fileManagerConfigProvider', function (config) {
101106 var defaults = config. \$get();
@@ -151,8 +156,8 @@ protected function setFileManagerConfig()
151156 enablePermissionsRecursive: false,
152157 thumbnailUrlPrefix: ' {$ this ->thumbnailUrlPrefix }',
153158 thumbnailUrlSuffix: ' {$ this ->thumbnailUrlSuffix }',
154- enableThumbnails: {$ this -> enableThumbnails },
155- enableIconPreviewView: {$ this -> enableIconPreviewView },
159+ enableThumbnails: {$ enableThumbnails },
160+ enableIconPreviewView: {$ enableIconPreviewView },
156161
157162 // File patterns
158163 isEditableFilePattern: /\.(!)/i,
You can’t perform that action at this time.
0 commit comments