Skip to content
Snippets Groups Projects
Commit a8e6be60 authored by Michael Gapczynski's avatar Michael Gapczynski
Browse files

Change the share file action icon if the file is already shared with someone

parent d78b75a0
No related branches found
No related tags found
No related merge requests found
......@@ -4,5 +4,5 @@
-moz-border-radius-bottomright:1em; -webkit-border-bottom-right-radius:1em; border-bottom-right-radius:1em; }
#shared_list { padding:0.5em; list-style-type: none; }
#public { border-top:1px solid #ddd; padding-top:0.5em; }
a.unshare { float:right; display:inline; margin:0 .5em; padding:.3em .3em 0 .3em !important; }
a.unshare:hover { background:#fff; -moz-box-shadow:0 0 10px #fff; -webkit-box-shadow:0 0 10px #fff; box-shadow:0 0 10px #fff; -moz-border-radius:10px; -webkit-border-radius:10px; border-radius:10px; }
\ No newline at end of file
a.unshare { float:right; display:inline; margin:0 .5em; padding:.3em .3em 0 .3em !important; opacity:.5; }
a.unshare:hover { opacity:1; }
\ No newline at end of file
$(document).ready(function() {
if (typeof FileActions !== 'undefined') {
FileActions.register('all', 'Share', OC.imagePath('core', 'actions/share'), function(filename) {
if (($('#dropdown').length)) {
FileActions.register('all', 'Share', function(filename) {
var icon;
var file = $('#dir').val()+'/'+filename;
$.ajax({
type: 'GET',
url: OC.linkTo('files_sharing', 'ajax/getitem.php'),
dataType: 'json',
data: 'source='+file,
async: false,
success: function(users) {
if (users.length > 0) {
icon = OC.imagePath('core', 'actions/shared');
} else {
icon = OC.imagePath('core', 'actions/share');
}
}
});
return icon;
}, function(filename) {
if (($('#dropdown').length > 0)) {
$('#dropdown').hide('blind', function() {
var dropdownFile = $('#dropdown').data('file')
var file = $('#dir').val()+'/'+filename;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment