summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBernhard Posselt <nukeawhale@gmail.com>2013-03-29 07:28:09 -0700
committerBernhard Posselt <nukeawhale@gmail.com>2013-03-29 07:28:09 -0700
commit86ac30c596868b581d0d1f103807ab48cac0041a (patch)
treeb7a915fb35d87589c1216fa94f5dd66f0d4a6bc7
parent66d7cc4c740a1f51a6871ac5129d26d62c313720 (diff)
parent79d99b9c967b4f8880b1ad76b2b5d72805fea907 (diff)
downloadnextcloud-server-86ac30c596868b581d0d1f103807ab48cac0041a.tar.gz
nextcloud-server-86ac30c596868b581d0d1f103807ab48cac0041a.zip
Merge pull request #2516 from kabum/master
share autocomplete - improve group appearance - issue #173
-rw-r--r--core/js/share.js13
1 files changed, 12 insertions, 1 deletions
diff --git a/core/js/share.js b/core/js/share.js
index 8ef76e2d082..7f6ee0ec417 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -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>';