https://github.com/matomo-org/matomo/commit/81e5f36429db254dfeb5bc3ccc545b0dde1b18da - Mouve

Site d'origine

Permalink
Browse files

Fix icon align of outlinks in datatables (#16492)

* Fix icon align of outlinks in datatables

* improve styling

* Move datatable icons to matomo font

* replace icon in multisites report

* improve css

* improve css so it looks good on all os/browser

* small adjustments

* Adjust multisites data table

* updates expected screenshots

* move plus/minus icon one pixel down

* move outlink icon one pixel down

* updates expected screenshots

* improve icon css

* increase size of plus/minus icon

* updates expected screenshots

* updates submodules

* fix ui test
  • Loading branch information
sgiehl committed Oct 15, 2020
1 parent d58aee2 commit 81e5f36429db254dfeb5bc3ccc545b0dde1b18da
Showing with 439 additions and 567 deletions.
  1. +4 −0 LEGALNOTICE
  2. +9 −37 plugins/Actions/javascripts/actionsDataTable.js
  3. +2 −2 plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_auto_expand.png
  4. +2 −2 plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_column_sorted.png
  5. +2 −2 plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_exclude_low_population.png
  6. +2 −2 plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_flattened.png
  7. +2 −2 plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_initial.png
  8. +2 −2 plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_pageview_percentages.png
  9. +2 −2 plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search.png
  10. +2 −2 plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_closed.png
  11. +2 −2 plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_search_visible.png
  12. +2 −2 plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_segmented_visitor_log_hover.png
  13. +2 −2 plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_subtables_loaded.png
  14. +2 −2 plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unflattened.png
  15. +2 −2 plugins/Actions/tests/UI/expected-screenshots/ActionsDataTable_unique_pageview_percentages.png
  16. +1 −1 plugins/Bandwidth
  17. +2 −4 plugins/CoreHome/stylesheets/dataTable/_comparisonsTable.less
  18. +11 −23 plugins/CoreHome/stylesheets/dataTable/_dataTable.less
  19. +1 −1 plugins/CoreHome/stylesheets/dataTable/_rowActions.less
  20. +2 −5 plugins/CoreHome/stylesheets/zen-mode.less
  21. +1 −2 plugins/CoreHome/templates/_dataTableCell.twig
  22. +2 −2 plugins/CorePluginsAdmin/tests/UI/expected-screenshots/TagManagerTeaser_admin_page_disable.png
  23. BIN plugins/CustomDimensions/tests/UI/expected-ui-screenshots/CustomDimensions_report_action.png
  24. BIN ...ins/CustomDimensions/tests/UI/expected-ui-screenshots/CustomDimensions_report_action_insights.png
  25. BIN ...ins/CustomDimensions/tests/UI/expected-ui-screenshots/CustomDimensions_report_action_subtable.png
  26. BIN .../CustomDimensions/tests/UI/expected-ui-screenshots/CustomDimensions_report_actions_rowactions.png
  27. +2 −2 plugins/DBStats/tests/UI/expected-screenshots/DBStats_admin_page.png
  28. +2 −2 plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_create_new.png
  29. +2 −2 plugins/Dashboard/tests/UI/expected-screenshots/DashboardManager_removed.png
  30. +2 −2 plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_removed.png
  31. +2 −2 plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_reset.png
  32. +2 −2 plugins/Dashboard/tests/UI/expected-screenshots/Dashboard_widget_add_widget.png
  33. +2 −2 plugins/Insights/tests/UI/expected-screenshots/Insights_initial.png
  34. +1 −1 plugins/MarketingCampaignsReporting
  35. +17 −14 plugins/Morpheus/fonts/matomo.svg
  36. BIN plugins/Morpheus/fonts/matomo.ttf
  37. BIN plugins/Morpheus/fonts/matomo.woff
  38. BIN plugins/Morpheus/fonts/matomo.woff2
  39. +1 −1 plugins/Morpheus/fonts/selection.json
  40. +154 −265 plugins/Morpheus/stylesheets/base/icons.css
  41. +34 −14 plugins/Morpheus/stylesheets/main.less
  42. +2 −0 plugins/MultiSites/angularjs/dashboard/dashboard.directive.less
  43. +8 −8 plugins/MultiSites/angularjs/site/site.directive.html
  44. +2 −2 plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites.png
  45. +2 −2 plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_changed_sort_order.png
  46. +2 −2 plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_page_1.png
  47. +2 −2 plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_range.png
  48. +2 −2 plugins/MultiSites/tests/UI/expected-screenshots/MultiSitesTest_all_websites_search.png
  49. +2 −2 plugins/PagePerformance/tests/UI/expected-screenshots/PagePerformance_performance_visualization.png
  50. +2 −2 plugins/PagePerformance/tests/UI/expected-screenshots/PagePerformance_rowactions.png
  51. +2 −2 plugins/PagePerformance/tests/UI/expected-screenshots/PagePerformance_rowactions_subtable.png
  52. +2 −2 plugins/PagePerformance/tests/UI/expected-screenshots/PagePerformance_visualizations.png
  53. +2 −2 plugins/SegmentEditor/tests/UI/expected-screenshots/SegmentSelectorEditorTest_complex_segment.png
  54. +2 −2 plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_logme_verified.png
  55. +2 −2 plugins/TwoFactorAuth/tests/UI/expected-screenshots/TwoFactorAuth_twofa_forced_step4.png
  56. +1 −1 plugins/UsersManager/tests/UI/UsersManager_spec.js
  57. +2 −2 tests/UI/expected-screenshots/Comparison_goals_table.png
  58. +2 −2 tests/UI/expected-screenshots/Comparison_normal_table.png
  59. +2 −2 tests/UI/expected-screenshots/Comparison_normal_table_no_periods.png
  60. +2 −2 tests/UI/expected-screenshots/Comparison_normal_table_no_segments.png
  61. +2 −2 tests/UI/expected-screenshots/Comparison_subtables_loaded.png
  62. +2 −2 tests/UI/expected-screenshots/Comparison_subtables_paginate.png
  63. +2 −2 tests/UI/expected-screenshots/GoalsTable_goals_table_abandoned_carts.png
  64. +2 −2 tests/UI/expected-screenshots/GoalsTable_goals_table_ecommerce.png
  65. +2 −2 tests/UI/expected-screenshots/GoalsTable_goals_table_ecommerce_view.png
  66. +2 −2 tests/UI/expected-screenshots/GoalsTable_goals_table_full.png
  67. +2 −2 tests/UI/expected-screenshots/GoalsTable_goals_table_single.png
  68. +2 −2 tests/UI/expected-screenshots/GoalsTable_initial.png
  69. +2 −2 tests/UI/expected-screenshots/Theme_home.png
  70. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_actions_content_name_piece.png
  71. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_actions_content_piece.png
  72. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_actions_content_piece_name.png
  73. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_actions_contents.png
  74. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_actions_downloads.png
  75. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_actions_entry_pages.png
  76. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_actions_exit_pages.png
  77. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_actions_outlinks.png
  78. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_actions_pages.png
  79. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_actions_pages_tooltip_help.png
  80. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_actions_site_search.png
  81. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins.png
  82. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_admin_plugins_no_internet.png
  83. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_dashboard1.png
  84. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_dashboard2.png
  85. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_dashboard3.png
  86. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_dashboard4.png
  87. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_events_overview.png
  88. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_referrers_allreferrers.png
  89. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_referrers_campaigns.png
  90. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_referrers_search_engines_keywords.png
  91. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_referrers_websites.png
  92. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_visitors_custom_vars.png
  93. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_visitors_devices.png
  94. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_visitors_locations_provider.png
  95. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_visitors_realtime_visits.png
  96. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_visitors_software.png
  97. +2 −2 tests/UI/expected-screenshots/UIIntegrationTest_widgetize_allwebsites.png
  98. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_0_initial.png
  99. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_10_change_limit.png
  100. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_11_flattened.png
  101. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_12_aggregate_shown.png
  102. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_13_make_hierarchical.png
  103. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_14_visits_percent.png
  104. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_15_search.png
  105. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_1_all_columns.png
  106. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_2_column_sorted_desc.png
  107. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_3_column_sorted_asc.png
  108. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_5_goals.png
  109. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_9_normal_table.png
  110. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_dimension_columns.png
  111. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_dimension_search.png
  112. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_exclude_low_population.png
  113. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_flatten_search.png
  114. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_limit_selector_open.png
  115. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_related_report_click.png
  116. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_subtables_loaded.png
  117. +2 −2 tests/UI/expected-screenshots/ViewDataTableTest_totals_row.png
  118. +2 −2 tests/UI/expected-screenshots/enable_framed_pages_embed_whole_app.png
@@ -287,6 +287,10 @@ THIRD-PARTY CONTENT
Link: https://icomoon.io/#icons-icomoon
License: GPL

Name: FontAwesome icons ("icon-minus-square", "icon-plus-square", "icon-arrowup", "icon-arrowdown", "icon-outlink") in plugins/Morpheus/fonts
Link: https://fontawesome.com/
License: CC BY 4.0

Notes:
- the "New BSD" license refers to either the "Modified BSD" and "Simplified BSD"
licenses (2- or 3-clause), which are GPL compatible.
@@ -24,16 +24,6 @@
return currentLevel;
}

// helper function for ActionDataTable
function setImageMinus(domElem) {
$('img.plusMinus', domElem).attr('src', 'plugins/Morpheus/images/minus.png');
}

// helper function for ActionDataTable
function setImagePlus(domElem) {
$('img.plusMinus', domElem).attr('src', 'plugins/Morpheus/images/plus.png');
}

/**
* UI control that handles extra functionality for Actions datatables.
*
@@ -133,17 +123,10 @@
rowsWithSubtables.css('font-weight', 'bold');

$("th:first-child", domElem).addClass('label');
var imagePlusMinusWidth = 12;
var imagePlusMinusHeight = 12;
$('td:first-child', rowsWithSubtables)
$(rowsWithSubtables)
.each(function () {
$('<img width="' + imagePlusMinusWidth + '" height="' + imagePlusMinusHeight + '" class="plusMinus" src="" />').insertBefore($(this).children('.label'));

if (self.param.filter_pattern_recursive) {
setImageMinus(this);
}
else {
setImagePlus(this);
$(this).addClass('expanded');
}
});

@@ -243,26 +226,26 @@
}
// else we toggle all these rows
else {
var plusDetected = $('td img.plusMinus', domElem).attr('src').indexOf('plus') >= 0;
var isExpanded = $(domElem).hasClass('subDataTable') && $(domElem).hasClass('expanded');

$(domElem).siblings().each(function () {
var parents = $(this).prop('parent').split(' ');
if (parents) {
if (parents.indexOf(idSubTable) >= 0
|| parents.indexOf('subDataTable_' + idSubTable) >= 0) {
if (plusDetected) {
if (!isExpanded) {
$(this).css('display', '').removeClass('hidden');

//unroll everything and display '-' sign
//if the row is already opened
// unroll everything if the row is already opened
var NextStyle = $(this).next().attr('class');
var CurrentStyle = $(this).attr('class');

var currentRowLevel = getLevelFromClass(CurrentStyle);
var nextRowLevel = getLevelFromClass(NextStyle);

if (currentRowLevel < nextRowLevel)
setImageMinus(this);
if (currentRowLevel < nextRowLevel) {
$(this).addClass('expanded');
}
}
else {
$(this).css('display', 'none').addClass('hidden');
@@ -272,22 +255,11 @@
}
});

var table = $(domElem);
if (!table.hasClass('dataTable')) {
table = table.closest('.dataTable');
}

self.$element.trigger('piwik:actionsSubTableToggled');
}

// toggle the +/- image
var plusDetected = $('td img.plusMinus', domElem).attr('src').indexOf('plus') >= 0;
if (plusDetected) {
setImageMinus(domElem);
}
else {
setImagePlus(domElem);
}
$(domElem).toggleClass('expanded');
},

//called when the full table actions is loaded
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
@@ -29,6 +29,8 @@
td.label .prefix-numeral {
display: inline-block;
width: 20px;
.font-default(13px, 18px);
vertical-align: text-bottom;
}

.totalsRow,.summaryRow {
@@ -57,10 +59,6 @@ tr.comparePeriod, tr.comparisonRow {
}

tr.parentComparisonRow {
td.label img.plusMinus {
margin-right: 8px;
}

&.level1 td.label {
padding-left: 44px !important;
}
@@ -18,6 +18,8 @@
text-align: right;
margin-right: 4px;
font-weight: normal;
.font-default(13px, 18px);
vertical-align: text-bottom;
}

td.highlight > .ratio {
@@ -40,7 +42,7 @@ table.subDataTable td.label {

table.dataTable img,
table.subDataTable img {
vertical-align: middle;
vertical-align: text-bottom;
}

table.dataTable img {
@@ -49,13 +51,13 @@ table.dataTable img {
margin-left: 0.5em;
}

table.dataTable tr:not(.parentComparisonRow) img.link {
position: relative;
top: 5px;
}

table.subDataTable img.link {
transform: translateY(-50%);
table.dataTable tr td .icon-outlink {
color: #aaa;
margin-right: 0.5em;
vertical-align: bottom;
.font-default(13px, 18px);
padding-left: 1px;
display: inline-block;
}

table.dataTable tr.subDataTable {
@@ -123,7 +125,7 @@ table.dataTable th.columnSorted {
}

table.dataTable td {
padding: 5px 0px 5px 12px;
padding: 5px 0 5px 12px;
background: @theme-color-background-base;
z-index: 99;
}
@@ -510,24 +512,10 @@ tr.level12 td.label {
padding-left: 9em !important;
}

/* less right margins for the link image in the Pa*/
.dataTableActions table.dataTable img.link {
margin-right: 0.5em;
margin-left: 1px;
margin-bottom: 4px;
vertical-align: text-bottom;
}

table.dataTable td.label img {
max-height: 16px;
}

tr td.label img.plusMinus {
margin-left: -3px;
margin-right: 6px;
margin-top: 0;
}

.pk-emptyDataTable {
padding-top: 20px;
padding-bottom: 10px;
@@ -3,7 +3,7 @@ table.dataTable .dataTableRowActions {
position: absolute;
display: none;
overflow: hidden;
margin-top: -5px;
margin-top: -6px;
background-color: inherit !important;
z-index: 1000; /* Work around FF bug to make sure it displays over ellipsis */
}
@@ -27,12 +27,9 @@
tr.subDataTable {
font-weight: normal !important;
}
tr.subDataTable td.label .plusMinus + .label .value {
font-weight: bold !important;
}
tr td {
padding-top: 11px;
padding-bottom: 11px;
padding-top: 10px;
padding-bottom: 9px;
}
}

@@ -6,8 +6,7 @@
target="_blank"
href='{% if row.getMetadata('url')|slice(0,4) not in ['http','ftp:'] %}http://{% endif %}{{ row.getMetadata('url')|rawSafeDecoded }}'>
{% if not row.getMetadata('logo') %}
<img class="link" width="10" height="9"
src="plugins/Morpheus/images/link.png"/>
<span class="icon-outlink"></span>
{% endif %}
{% endif %}

Git LFS file not shown
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown
Git LFS file not shown

0 comments on commit 81e5f36

Please sign in to comment.

Raccourcis

Commandes

Fermer