File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 186186 this . _previewManager . loadPreview ( this . model , $iconDiv , $container ) ;
187187 } else {
188188 var iconUrl = this . model . get ( 'icon' ) || OC . MimeType . getIconUrl ( 'dir' ) ;
189+ if ( typeof this . model . get ( 'mountType' ) !== 'undefined' ) {
190+ iconUrl = OC . MimeType . getIconUrl ( 'dir-' + this . model . get ( 'mountType' ) )
191+ }
189192 $iconDiv . css ( 'background-image' , 'url("' + iconUrl + '")' ) ;
190193 }
191194 this . $el . find ( '[title]' ) . tooltip ( { placement : 'bottom' } ) ;
Original file line number Diff line number Diff line change @@ -269,22 +269,23 @@ OC.Share = _.extend(OC.Share || {}, {
269269 var message , recipients , avatars ;
270270 var ownerId = $tr . attr ( 'data-share-owner-id' ) ;
271271 var owner = $tr . attr ( 'data-share-owner' ) ;
272+ var mountType = $tr . attr ( 'data-mounttype' ) ;
272273 var shareFolderIcon ;
273274 var iconClass = 'icon-shared' ;
274275 action . removeClass ( 'shared-style' ) ;
275276 // update folder icon
276277 if ( type === 'dir' && ( hasShares || hasLink || ownerId ) ) {
277- if ( hasLink ) {
278+ if ( typeof mountType !== 'undefined' && mountType !== 'shared-root' && mountType !== 'shared' ) {
279+ shareFolderIcon = OC . MimeType . getIconUrl ( 'dir-' + mountType ) ;
280+ } else if ( hasLink ) {
278281 shareFolderIcon = OC . MimeType . getIconUrl ( 'dir-public' ) ;
279- }
280- else {
282+ } else {
281283 shareFolderIcon = OC . MimeType . getIconUrl ( 'dir-shared' ) ;
282284 }
283285 $tr . find ( '.filename .thumbnail' ) . css ( 'background-image' , 'url(' + shareFolderIcon + ')' ) ;
284286 $tr . attr ( 'data-icon' , shareFolderIcon ) ;
285287 } else if ( type === 'dir' ) {
286288 var isEncrypted = $tr . attr ( 'data-e2eencrypted' ) ;
287- var mountType = $tr . attr ( 'data-mounttype' ) ;
288289 // FIXME: duplicate of FileList._createRow logic for external folder,
289290 // need to refactor the icon logic into a single code path eventually
290291 if ( isEncrypted === 'true' ) {
You can’t perform that action at this time.
0 commit comments