Commit 510186b6 authored by frank.paczynski's avatar frank.paczynski Committed by viktor.pracht
Browse files

Fixed: OXUIB-799 - Upsell default icon not used for action Save in Drive

(cherry picked from commit 8f448c30)
parent 4c9adb9c
Pipeline #157936 passed with stages
in 41 minutes and 33 seconds
......@@ -16,8 +16,9 @@ define('io.ox/backbone/views/actions/util', [
'io.ox/core/upsell',
'io.ox/core/folder/api',
'io.ox/core/collection',
'io.ox/core/capabilities'
], function (ext, upsell, api, Collection, capabilities) {
'io.ox/core/capabilities',
'settings!io.ox/core'
], function (ext, upsell, api, Collection, capabilities, settings) {
'use strict';
......@@ -167,7 +168,7 @@ define('io.ox/backbone/views/actions/util', [
renderListItem: function ($li, baton, item) {
function checkUpsell(item) {
function isUpsell(item) {
if (!item.actions[0]) return false;
var requires = item.actions[0].capabilities;
return !upsell.has(requires) && upsell.enabled(requires);
......@@ -187,8 +188,11 @@ define('io.ox/backbone/views/actions/util', [
.attr({ 'data-action': item.link.ref });
applyIconTitleTooltip($a, item.link, baton, item.enabled);
if (!item.enabled) $a.addClass('disabled').attr('aria-disabled', true);
if (checkUpsell(item)) $a.addClass('upsell').append($('<i class="fa fa-star">'));
return $a;
if (!isUpsell(item)) return $a;
// add upsell icon
return $a.addClass('upsell').append(
$('<i class="upsell-icon fa">').addClass(settings.get('upsell/defaultIcon', 'fa-star'))
);
});
},
......
......@@ -48,14 +48,13 @@
color: #333333;
white-space: nowrap;
}
& > li a.upsell i.fa.fa-star {
& > li i.upsell-icon {
color: @upsell-icon-color;
margin-left: 4px;
color: #ffc107;
font-size: 14px;
}
}
.dropdown-menu-right > li > li.io-ox-upsell-link > a {
padding: 3px 20px;
white-space: nowrap;
......
......@@ -238,12 +238,12 @@ html:not(.smartphone) #io-ox-appcontrol #io-ox-toprightbar #io-ox-launcher .laun
}
.upsell i {
color: @upsell-icon-color;
visibility: visible;
position: absolute;
z-index: 1;
top: 32px;
left: 30px;
color: #ffc107;
font-size: 14px;
}
}
......@@ -516,8 +516,8 @@ html:not(.smartphone) #io-ox-appcontrol #io-ox-toprightbar #io-ox-launcher .laun
}
.flex-center(row);
&.upsell i {
color: @upsell-icon-color;
margin-left: 4px;
color: #ffc107;
font-size: 14px;
top: 0;
}
......
......@@ -233,9 +233,9 @@
float: left; // to support pull-right while keeping items in-order (a11y)
height: 100%;
& >a.upsell i.fa.fa-star {
& > a.upsell i.upsell-icon {
color: @upsell-icon-color;
margin-left: 4px;
color: #ffc107;
font-size: 14px;
}
......@@ -305,9 +305,9 @@
outline: 0;
text-decoration: none;
}
&.upsell i.fa.fa-star {
&.upsell i.upsell-icon {
color: @upsell-icon-color;
margin-left: 4px;
color: #ffc107;
font-size: 14px;
}
}
......
......@@ -130,6 +130,9 @@
@trash-icon-hover-background: @red;
@trash-icon-hover-color: @white;
// only used for some upsell items as default yet (therefore not documented)
@upsell-icon-color: #ffc107;
/*
* 1.8 Images
*/
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment