#notification { z-index:101; background-color:#fc4; border:0; padding:0 .7em .3em; display:none; position: relative; top:0; -moz-border-radius-bottomleft:1em; -webkit-border-bottom-left-radius:1em; border-bottom-left-radius:1em; -moz-border-radius-bottomright:1em; -webkit-border-bottom-right-radius:1em; border-bottom-right-radius:1em; }
#notification span { cursor:pointer; font-weight:bold; margin-left:1em; }
-tr .action, .selectedActions a { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; }
-tr:hover .action, .selectedActions a { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; filter:alpha(opacity=50); opacity:.5; }
+tr .action:not(.permanent), .selectedActions a { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)"; filter:alpha(opacity=0); opacity:0; }
+tr:hover .action, tr .action.permanent, .selectedActions a { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=50)"; filter:alpha(opacity=50); opacity:.5; }
tr .action { width:16px; height:16px; }
.header-action { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=80)"; filter:alpha(opacity=80); opacity:.8; }
tr:hover .action:hover, .selectedActions a:hover, .header-action:hover { -ms-filter:"progid:DXImageTransform.Microsoft.Alpha(Opacity=100)"; filter:alpha(opacity=100); opacity:1; }
} else {
var file = $('tr').filterAttr('data-file', OC.basename(item));
if (file.length > 0) {
- $(file).find('.fileactions .action').filterAttr('data-action', 'Share').find('img').attr('src', image);
+ var action = $(file).find('.fileactions .action').filterAttr('data-action', 'Share');
+ action.find('img').attr('src', image);
+ action.addClass('permanent');
}
var dir = $('#dir').val();
if (dir.length > 1) {
// Search for possible parent folders that are shared
while (path != last) {
if (path == item) {
- var img = $('.fileactions .action').filterAttr('data-action', 'Share').find('img');
+ var action = $('.fileactions .action').filterAttr('data-action', 'Share');
+ var img = action.find('img');
if (img.attr('src') != OC.imagePath('core', 'actions/public')) {
img.attr('src', image);
+ action.addClass('permanent');
}
}
last = path;
},
updateIcon:function(itemType, itemSource) {
if (itemType == 'file' || itemType == 'folder') {
- var filename = $('tr').filterAttr('data-id', String(itemSource)).data('file');
+ var file = $('tr').filterAttr('data-id', String(itemSource));
+ var filename = file.data('file');
if ($('#dir').val() == '/') {
itemSource = $('#dir').val() + filename;
} else {
});
if (itemType != 'file' && itemType != 'folder') {
$('a.share[data-item="'+itemSource+'"]').css('background', 'url('+image+') no-repeat center');
+ } else {
+ var action = $(file).find('.fileactions .action').filterAttr('data-action', 'Share');
+ action.find('img').attr('src', image);
+ if (shares) {
+ action.addClass('permanent');
+ } else {
+ action.removeClass('permanent');
+ }
}
if (shares) {
OC.Share.statuses[itemSource] = link;