summaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorMorris Jobke <morris.jobke@gmail.com>2013-03-22 09:59:19 +0100
committerMorris Jobke <morris.jobke@gmail.com>2013-03-22 10:00:43 +0100
commit79d99b9c967b4f8880b1ad76b2b5d72805fea907 (patch)
treeeb35e6d68fb7adf08a38f0e09c0bd348126ceee8 /core
parent8871629db577395e1f9d018ba1b62b5be8114620 (diff)
downloadnextcloud-server-79d99b9c967b4f8880b1ad76b2b5d72805fea907.tar.gz
nextcloud-server-79d99b9c967b4f8880b1ad76b2b5d72805fea907.zip
use simple markup to highlight groups in share autocomplete
Diffstat (limited to 'core')
-rw-r--r--core/css/share.css4
-rw-r--r--core/js/share.js10
2 files changed, 4 insertions, 10 deletions
diff --git a/core/css/share.css b/core/css/share.css
index c97f27c2816..2d6849b4bb1 100644
--- a/core/css/share.css
+++ b/core/css/share.css
@@ -97,7 +97,3 @@
overflow-y:auto;
overflow-x:hidden;
}
-
-.ui-menu-item a.ocGroup {
- font-weight: bold;
-}
diff --git a/core/js/share.js b/core/js/share.js
index ca9c8f04eae..73eb686abb0 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -238,15 +238,13 @@ OC.Share={
})
// customize internal _renderItem function to display groups and users differently
.data("ui-autocomplete")._renderItem = function( ul, item ) {
- var insert = '';
+ var insert = $( "<a>" ).text( item.label );
if(item.label.length > 8 && item.label.substr(item.label.length-8) === ' (group)') {
- // current label is group
- insert = ' class="ocGroup"'; // attribute to insert
- // remove "(group)"
- item.label = item.label.substring(0, item.label.length-8)
+ // current label is group - wrap "strong" element
+ insert = insert.wrapInner('<strong>');
}
return $( "<li>" )
- .append( $( "<a" + insert + ">" ).text( item.label ) )
+ .append( insert )
.appendTo( ul );
};
} else {