Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorThomas Müller <thomas.mueller@tmit.eu>2016-02-26 12:47:20 +0300
committerThomas Müller <thomas.mueller@tmit.eu>2016-02-26 12:47:20 +0300
commit96f15a12a91b89735ad0d5aa6fd127bdcf81b83e (patch)
tree794425cef337235634e5bc3df0e167336ee18b1f /core
parentcbde4bb92fd8cbad48f81c36a83b5bc83b5c378d (diff)
parent867a8aca1294f5dc0778148460a91bbbe28ba433 (diff)
Merge pull request #22461 from owncloud/fix_6773
Allow theming of actions
Diffstat (limited to 'core')
-rw-r--r--core/css/apps.css2
-rw-r--r--core/js/share.js25
-rw-r--r--core/js/sharedialogshareelistview.js3
3 files changed, 16 insertions, 14 deletions
diff --git a/core/css/apps.css b/core/css/apps.css
index 9afd7044345..c4e2d11b6fc 100644
--- a/core/css/apps.css
+++ b/core/css/apps.css
@@ -642,6 +642,7 @@ em {
.popovermenu .menuitem,
.popovermenu .menuitem>span {
cursor: pointer;
+ vertical-align: middle;
}
.popovermenu .menuitem {
@@ -694,6 +695,7 @@ em {
width: 16px;
height: 16px;
margin-right: 10px;
+ vertical-align: middle;
}
.popovermenu .menuitem {
diff --git a/core/js/share.js b/core/js/share.js
index 9539e92e09b..61483f4cf4d 100644
--- a/core/js/share.js
+++ b/core/js/share.js
@@ -106,15 +106,15 @@ OC.Share = _.extend(OC.Share || {}, {
}
// TODO: iterating over the files might be more efficient
for (item in OC.Share.statuses){
- var image = OC.imagePath('core', 'actions/share');
+ var iconClass = 'icon-share';
var data = OC.Share.statuses[item];
var hasLink = data.link;
// Links override shared in terms of icon display
if (hasLink) {
- image = OC.imagePath('core', 'actions/public');
+ iconClass = 'icon-public';
}
if (itemType !== 'file' && itemType !== 'folder') {
- $('a.share[data-item="'+item+'"]').css('background', 'url('+image+') no-repeat center');
+ $('a.share[data-item="'+item+'"] .icon').removeClass('icon-share icon-public').addClass(iconClass);
} else {
// TODO: ultimately this part should be moved to files_sharing app
var file = $fileList.find('tr[data-id="'+item+'"]');
@@ -160,23 +160,24 @@ OC.Share = _.extend(OC.Share || {}, {
var shares = false;
var link = false;
var image = OC.imagePath('core', 'actions/share');
+ var iconClass = '';
$.each(OC.Share.itemShares, function(index) {
if (OC.Share.itemShares[index]) {
if (index == OC.Share.SHARE_TYPE_LINK) {
if (OC.Share.itemShares[index] == true) {
shares = true;
- image = OC.imagePath('core', 'actions/public');
+ iconClass = 'icon-public';
link = true;
return;
}
} else if (OC.Share.itemShares[index].length > 0) {
shares = true;
- image = OC.imagePath('core', 'actions/share');
+ iconClass = 'icon-share';
}
}
});
if (itemType != 'file' && itemType != 'folder') {
- $('a.share[data-item="'+itemSource+'"]').css('background', 'url('+image+') no-repeat center');
+ $('a.share[data-item="'+itemSource+'"] .icon').removeClass('icon-share icon-public').addClass(iconClass);
} else {
var $tr = $('tr').filterAttr('data-id', String(itemSource));
if ($tr.length > 0) {
@@ -255,12 +256,12 @@ OC.Share = _.extend(OC.Share || {}, {
markFileAsShared: function($tr, hasShares, hasLink) {
var action = $tr.find('.fileactions .action[data-action="Share"]');
var type = $tr.data('type');
- var img = action.find('img');
+ var icon = action.find('.icon');
var message;
var recipients;
var owner = $tr.attr('data-share-owner');
var shareFolderIcon;
- var image = OC.imagePath('core', 'actions/share');
+ var iconClass = 'icon-share';
action.removeClass('shared-style');
// update folder icon
if (type === 'dir' && (hasShares || hasLink || owner)) {
@@ -299,18 +300,18 @@ OC.Share = _.extend(OC.Share || {}, {
else if (recipients) {
message = t('core', 'Shared with {recipients}', {recipients: this._formatShareList(recipients.split(", ")).join(", ")}, 0, {escape: false});
}
- action.html('<span> ' + message + '</span>').prepend(img);
+ action.html('<span> ' + message + '</span>').prepend(icon);
if (owner || recipients) {
action.find('.remoteAddress').tipsy({gravity: 's'});
}
}
else {
- action.html('<span></span>').prepend(img);
+ action.html('<span></span>').prepend(icon);
}
if (hasLink) {
- image = OC.imagePath('core', 'actions/public');
+ iconClass = 'icon-public';
}
- img.attr('src', image);
+ icon.removeClass('icon-share icon-public').addClass(iconClass);
},
/**
*
diff --git a/core/js/sharedialogshareelistview.js b/core/js/sharedialogshareelistview.js
index e8976bb26e6..49580cc888b 100644
--- a/core/js/sharedialogshareelistview.js
+++ b/core/js/sharedialogshareelistview.js
@@ -17,7 +17,7 @@
'<ul id="shareWithList" class="shareWithList">' +
'{{#each sharees}}' +
' <li data-share-id="{{shareId}}" data-share-type="{{shareType}}" data-share-with="{{shareWith}}">' +
- ' <a href="#" class="unshare"><span class="icon-loading-small hidden"></span><img class="svg" alt="{{unshareLabel}}" title="{{unshareLabel}}" src="{{unshareImage}}" /></a>' +
+ ' <a href="#" class="unshare"><span class="icon-loading-small hidden"></span><span class="icon icon-delete"></span><span class="hidden-visually">{{unshareLabel}}</span></a>' +
' {{#if avatarEnabled}}' +
' <div class="avatar {{#if modSeed}}imageplaceholderseed{{/if}}" data-username="{{shareWith}}" {{#if modSeed}}data-seed="{{shareWith}} {{shareType}}"{{/if}}></div>' +
' {{/if}}' +
@@ -140,7 +140,6 @@
mailNotificationEnabled: this.configModel.isMailNotificationEnabled(),
notifyByMailLabel: t('core', 'notify by email'),
unshareLabel: t('core', 'Unshare'),
- unshareImage: OC.imagePath('core', 'actions/delete'),
canShareLabel: t('core', 'can share'),
canEditLabel: t('core', 'can edit'),
createPermissionLabel: t('core', 'create'),