diff options
author | Stefan Giehl <stefan@matomo.org> | 2022-05-30 16:48:26 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-05-30 16:48:26 +0300 |
commit | 3fcb8b915aba348e64cb8633222d5b62f4e2c29f (patch) | |
tree | b1a3a12bcbfc0aed82b941367e09993a62304450 /plugins/CoreHome | |
parent | 59c2e64086d4180a7900bb252faa5f5f3e23568a (diff) |
Ensure refresh button is only shown where needed (#19292)
* Ensure refresh button is only shown where needed
* fix some deprecated method calls
* improve css
* updates expected UI files
* fix css
* updates expected UI files
Diffstat (limited to 'plugins/CoreHome')
-rw-r--r-- | plugins/CoreHome/javascripts/refresh-button.js | 2 | ||||
-rw-r--r-- | plugins/CoreHome/stylesheets/layout.less | 17 | ||||
-rw-r--r-- | plugins/CoreHome/templates/_headerMessage.twig | 13 |
3 files changed, 14 insertions, 18 deletions
diff --git a/plugins/CoreHome/javascripts/refresh-button.js b/plugins/CoreHome/javascripts/refresh-button.js index 96f7176d93..de364d2a3e 100644 --- a/plugins/CoreHome/javascripts/refresh-button.js +++ b/plugins/CoreHome/javascripts/refresh-button.js @@ -20,7 +20,7 @@ $(function () { } if (isCoreHomeModuleActive()) { - iconRefresh.show(); + iconRefresh.removeClass('hidden'); iconRefresh.on('click', function (e) { e.preventDefault(); diff --git a/plugins/CoreHome/stylesheets/layout.less b/plugins/CoreHome/stylesheets/layout.less index 90a9f68304..6c5ffb517e 100644 --- a/plugins/CoreHome/stylesheets/layout.less +++ b/plugins/CoreHome/stylesheets/layout.less @@ -123,8 +123,8 @@ nav { } &>.top_controls { - .icon-arrowup:before, .icon-arrowdown:before { - padding: 17px 0 0 0px; + &> .icon-arrowup:before, &> .icon-arrowdown:before, &> .icon-reload:before { + padding: 17px 0 0 0; display: inline-block; cursor: pointer; @@ -132,17 +132,10 @@ nav { display: none; } } - .icon-reload { - cursor: pointer; - - &:before { - padding-right: 10px; - font-weight: lighter; - @media screen and (max-width: 600px) { - display: none; - } - } + &> .icon-reload:before { + padding-right: 10px; + font-weight: lighter; } } diff --git a/plugins/CoreHome/templates/_headerMessage.twig b/plugins/CoreHome/templates/_headerMessage.twig index b1575c3321..efa5a9de5d 100644 --- a/plugins/CoreHome/templates/_headerMessage.twig +++ b/plugins/CoreHome/templates/_headerMessage.twig @@ -10,7 +10,9 @@ </span> {% endset %} -{% if (latest_version_available and not isPiwikDemo and hasSomeViewAccess and not isUserIsAnonymous and showUpdateNotificationToUser) or (isSuperUser and isAdminArea is defined and isAdminArea) %} +{% set showVersionInfo = (latest_version_available and not isPiwikDemo and hasSomeViewAccess and not isUserIsAnonymous and showUpdateNotificationToUser) or (isSuperUser and isAdminArea is defined and isAdminArea) %} + +{% if showVersionInfo %} <div piwik-expand-on-hover id="header_message" class="piwikSelector borderedControl {% if not latest_version_available %}header_info{% else %}{% endif %} piwikTopControl {% if latest_version_available %}update_available{% endif %}" @@ -58,10 +60,11 @@ </div> </div> -<span class="icon icon-reload" title="{{ 'CoreHome_Refresh'|translate }}"></span> +{% endif %} + +<span class="icon icon-reload hidden" title="{{ 'CoreHome_Refresh'|translate }}"></span> <span class="icon icon-arrowup"></span> + +{% if showVersionInfo %} <div style="clear:right"></div> -{% else %} -<span class="icon icon-reload" title="{{ 'CoreHome_Refresh'|translate }}"></span> -<span class="icon icon-arrowup"></span> {% endif %} |