mirror of
https://github.com/nextcloud/server.git
synced 2024-08-10 14:11:53 +02:00
Merge pull request #2516 from kabum/master
share autocomplete - improve group appearance - issue #173
This commit is contained in:
commit
86ac30c596
@ -235,7 +235,18 @@ OC.Share={
|
||||
});
|
||||
return false;
|
||||
}
|
||||
});
|
||||
})
|
||||
// customize internal _renderItem function to display groups and users differently
|
||||
.data("ui-autocomplete")._renderItem = function( ul, item ) {
|
||||
var insert = $( "<a>" ).text( item.label );
|
||||
if(item.label.length > 8 && item.label.substr(item.label.length-8) === ' (group)') {
|
||||
// current label is group - wrap "strong" element
|
||||
insert = insert.wrapInner('<strong>');
|
||||
}
|
||||
return $( "<li>" )
|
||||
.append( insert )
|
||||
.appendTo( ul );
|
||||
};
|
||||
} else {
|
||||
html += '<input id="shareWith" type="text" placeholder="'+t('core', 'Resharing is not allowed')+'" style="width:90%;" disabled="disabled"/>';
|
||||
html += '</div>';
|
||||
|
Loading…
Reference in New Issue
Block a user