Permanently display shared status icons
This commit is contained in:
parent
c9e25d3fab
commit
31ebea0f6a
|
@ -195,8 +195,8 @@ fieldset.warning legend { color:#b94a48 !important; }
|
|||
#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; }
|
||||
|
|
|
@ -23,7 +23,9 @@ OC.Share={
|
|||
} 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) {
|
||||
|
@ -32,9 +34,11 @@ OC.Share={
|
|||
// 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;
|
||||
|
@ -48,7 +52,8 @@ OC.Share={
|
|||
},
|
||||
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 {
|
||||
|
@ -75,6 +80,14 @@ OC.Share={
|
|||
});
|
||||
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;
|
||||
|
|
Loading…
Reference in New Issue