diff --git a/apps/files_sharing/css/sharing.css b/apps/files_sharing/css/sharing.css index 152f43577acd157f918831b771bb45c1c8c2cac1..0759af2c274425098ff35503bff4a914257d0bca 100644 --- a/apps/files_sharing/css/sharing.css +++ b/apps/files_sharing/css/sharing.css @@ -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 diff --git a/apps/files_sharing/js/share.js b/apps/files_sharing/js/share.js index 83a7a68cb3a39ba2c099dcce4f0b71a6ed933e7d..2e284b868e57844c9996adf87f64da7e5e1fed6b 100644 --- a/apps/files_sharing/js/share.js +++ b/apps/files_sharing/js/share.js @@ -1,7 +1,25 @@ $(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;