diff options
author | Ramiro Aparicio <rapariciog@gmail.com> | 2013-10-21 15:31:31 +0200 |
---|---|---|
committer | Ramiro Aparicio <rapariciog@gmail.com> | 2013-10-21 15:31:31 +0200 |
commit | 85edbb08c1768237e005fea3a763deff2c859c29 (patch) | |
tree | 182c7b23558bca8b4a9fc5664657768a76a69604 /core/js | |
parent | dfe38d13e220f1f4ef3c14235147fa9b05713a50 (diff) | |
download | nextcloud-server-85edbb08c1768237e005fea3a763deff2c859c29.tar.gz nextcloud-server-85edbb08c1768237e005fea3a763deff2c859c29.zip |
fix user displayName not being shown after add, added class for improved styling, fix strong for groups when english is not being used
Diffstat (limited to 'core/js')
-rw-r--r-- | core/js/share.js | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/core/js/share.js b/core/js/share.js index 6ec15f01c1e..5494f6ce2e3 100644 --- a/core/js/share.js +++ b/core/js/share.js @@ -293,7 +293,7 @@ OC.Share={ // Default permissions are Edit (CRUD) and Share var permissions = OC.PERMISSION_ALL; OC.Share.share(itemType, itemSource, shareType, shareWith, permissions, function() { - OC.Share.addShareWith(shareType, shareWith, selected.item.value.shareWith, permissions, possiblePermissions); + OC.Share.addShareWith(shareType, shareWith, selected.item.label, permissions, possiblePermissions); $('#shareWith').val(''); OC.Share.updateIcon(itemType, itemSource); }); @@ -302,12 +302,14 @@ OC.Share={ }) // 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>'); + var insert = $( "<a>" ); + var text = (item.value.shareType == 1)? item.label + ' ('+t('core', 'group')+')' : item.label; + insert.text( text ); + if(item.value.shareType == 1) { + insert = insert.wrapInner('<strong></strong>'); } return $( "<li>" ) + .addClass((item.value.shareType == 1)?'group':'user') .append( insert ) .appendTo( ul ); }; |