diff options
-rw-r--r-- | core/js/share.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js index 8e767663f12..36b5f6bdd7a 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -235,7 +235,19 @@ OC.Share={ }); return false; } - }); + }) + // customize internal _renderItem function to display groups and users differently + .data("ui-autocomplete")._renderItem = function( ul, item ) { + var insert = ''; + if(item.label.length > 8 && item.label.substr(item.label.length-8) === ' (group)') { + // current label is group + insert = ' style="font-weight:bold;"'; + item.label = item.label.substring(0, item.label.length-8) + } + return $( "<li>" ) + .append( $( "<a" + insert + ">" ).text( item.label ) ) + .appendTo( ul ); + }; } else { html += '<input id="shareWith" type="text" placeholder="'+t('core', 'Resharing is not allowed')+'" style="width:90%;" disabled="disabled"/>'; html += '</div>'; |