Merge pull request #1905 from owncloud/fix-share-icons

Fix adding share icons to share action
This commit is contained in:
Thomas Müller 2013-02-27 02:31:52 -08:00
commit 58b06c5c9a
2 changed files with 6 additions and 12 deletions

View File

@ -124,22 +124,16 @@ a.action>img { max-height:16px; max-width:16px; vertical-align:text-bottom; }
.selectedActions a img { position:relative; top:.3em; } .selectedActions a img { position:relative; top:.3em; }
#fileList a.action { #fileList a.action {
display:none;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=0)";
filter: alpha(opacity=0); filter: alpha(opacity=0);
opacity: 0;
} }
#fileList tr:hover a.action { #fileList tr:hover a.action {
display:inline;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=.5)"; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=.5)";
filter: alpha(opacity=.5); filter: alpha(opacity=.5);
opacity: .5;
} }
#fileList tr:hover a.action:hover { #fileList tr:hover a.action:hover {
display:inline;
-ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=1)"; -ms-filter: "progid:DXImageTransform.Microsoft.Alpha(Opacity=1)";
filter: alpha(opacity=1); filter: alpha(opacity=1);
opacity: 1;
} }
#scanning-message{ top:40%; left:40%; position:absolute; display:none; } #scanning-message{ top:40%; left:40%; position:absolute; display:none; }

View File

@ -24,9 +24,9 @@ OC.Share={
var file = $('tr').filterAttr('data-file', OC.basename(item)); var file = $('tr').filterAttr('data-file', OC.basename(item));
if (file.length > 0) { if (file.length > 0) {
var action = $(file).find('.fileactions .action').filterAttr('data-action', 'Share'); var action = $(file).find('.fileactions .action').filterAttr('data-action', 'Share');
action.find('img').attr('src', image); var img = action.find('img').attr('src', image);
action.addClass('permanent'); action.addClass('permanent');
action.html(t('core', 'Shared')); action.html(' '+t('core', 'Shared')).prepend(img);
} }
var dir = $('#dir').val(); var dir = $('#dir').val();
if (dir.length > 1) { if (dir.length > 1) {
@ -40,7 +40,7 @@ OC.Share={
if (img.attr('src') != OC.imagePath('core', 'actions/public')) { if (img.attr('src') != OC.imagePath('core', 'actions/public')) {
img.attr('src', image); img.attr('src', image);
action.addClass('permanent'); action.addClass('permanent');
action.html(t('core', 'Shared')); action.html(' '+t('core', 'Shared')).prepend(img);
} }
} }
last = path; last = path;
@ -84,13 +84,13 @@ OC.Share={
$('a.share[data-item="'+itemSource+'"]').css('background', 'url('+image+') no-repeat center'); $('a.share[data-item="'+itemSource+'"]').css('background', 'url('+image+') no-repeat center');
} else { } else {
var action = $(file).find('.fileactions .action').filterAttr('data-action', 'Share'); var action = $(file).find('.fileactions .action').filterAttr('data-action', 'Share');
action.find('img').attr('src', image); var img = action.find('img').attr('src', image);
if (shares) { if (shares) {
action.addClass('permanent'); action.addClass('permanent');
action.html(t('core', 'Shared')); action.html(' '+t('core', 'Shared')).prepend(img);
} else { } else {
action.removeClass('permanent'); action.removeClass('permanent');
action.html(t('core', 'Share')); action.html(' '+t('core', 'Share')).prepend(img);
} }
} }
if (shares) { if (shares) {