From 3feca42219851b4904ab07e1b895e00a41bc0a79 Mon Sep 17 00:00:00 2001
From: Matthieu Napoli <matthieu@mnapoli.fr>
Date: Fri, 7 Aug 2015 15:24:31 +0200
Subject: [PATCH] Use standard buttons and alerts instead of and old icons and
 custom CSS

---
 .../CoreHome/javascripts/dataTable_rowactions.js    |  2 +-
 .../templates/getMultiRowEvolutionPopover.twig      |  2 +-
 .../CoreHome/templates/getRowEvolutionPopover.twig  |  6 +++---
 plugins/CoreVisualizations/stylesheets/jqplot.css   | 13 +------------
 .../Morpheus/stylesheets/general/_typography.less   |  4 ----
 tests/UI/specs/RowEvolution_spec.js                 |  4 ++--
 6 files changed, 8 insertions(+), 23 deletions(-)

diff --git a/plugins/CoreHome/javascripts/dataTable_rowactions.js b/plugins/CoreHome/javascripts/dataTable_rowactions.js
index ac8554593e..004e27e3b6 100644
--- a/plugins/CoreHome/javascripts/dataTable_rowactions.js
+++ b/plugins/CoreHome/javascripts/dataTable_rowactions.js
@@ -360,7 +360,7 @@ DataTable_RowActions_RowEvolution.prototype.showRowEvolution = function (apiMeth
 
         if (self.dataTable !== null) {
             // remember label for multi row evolution
-            box.find('a.rowevolution-startmulti').click(function () {
+            box.find('.rowevolution-startmulti').click(function () {
                 Piwik_Popover.onClose(false); // unbind listener that resets multiEvolutionRows
                 Piwik_Popover.close();
                 return false;
diff --git a/plugins/CoreHome/templates/getMultiRowEvolutionPopover.twig b/plugins/CoreHome/templates/getMultiRowEvolutionPopover.twig
index a43d282492..f6851d976d 100644
--- a/plugins/CoreHome/templates/getMultiRowEvolutionPopover.twig
+++ b/plugins/CoreHome/templates/getMultiRowEvolutionPopover.twig
@@ -23,7 +23,7 @@
                 </tr>
             {% endfor %}
         </table>
-        <a href="#" class="rowevolution-startmulti">&raquo; {{ 'RowEvolution_PickAnotherRow'|translate }}</a>
+        <button type="button" class="rowevolution-startmulti">{{ 'RowEvolution_PickAnotherRow'|translate }}</button>
     </div>
     {% if availableMetrics|length > 1 %}
         <div class="metric-selectbox">
diff --git a/plugins/CoreHome/templates/getRowEvolutionPopover.twig b/plugins/CoreHome/templates/getRowEvolutionPopover.twig
index 5a86f7a101..84f7111020 100644
--- a/plugins/CoreHome/templates/getRowEvolutionPopover.twig
+++ b/plugins/CoreHome/templates/getRowEvolutionPopover.twig
@@ -7,7 +7,7 @@
     <div class="metrics-container">
         <h2>{{ availableMetricsText|raw }}</h2>
 
-        <div class="rowevolution-documentation">
+        <div class="alert alert-info">
             {{ 'RowEvolution_Documentation'|translate }}
         </div>
         <table class="metrics" border="0" cellpadding="0" cellspacing="0" data-thing="{{ seriesColorCount }}">
@@ -31,9 +31,9 @@
     <div class="compare-container">
         <h2>{{ 'RowEvolution_CompareRows'|translate }}</h2>
 
-        <div class="rowevolution-documentation">
+        <div class="alert alert-info">
             {{ 'RowEvolution_CompareDocumentation'|translate|raw }}
         </div>
-        <a href="#" class="rowevolution-startmulti">&raquo; {{ 'RowEvolution_PickARow'|translate }}</a>
+        <button type="button" class="rowevolution-startmulti">{{ 'RowEvolution_PickARow'|translate }}</button>
     </div>
 </div>
diff --git a/plugins/CoreVisualizations/stylesheets/jqplot.css b/plugins/CoreVisualizations/stylesheets/jqplot.css
index 25b6535f5c..8c5610c7a8 100644
--- a/plugins/CoreVisualizations/stylesheets/jqplot.css
+++ b/plugins/CoreVisualizations/stylesheets/jqplot.css
@@ -185,17 +185,6 @@
     padding: 0;
 }
 
-a.rowevolution-startmulti {
-    font-size: 12px;
-    color: #7E7363;
-    font-weight: bold;
-    text-decoration: none;
-}
-
-a.rowevolution-startmulti:hover {
-    color: #444;
-}
-
 /**
  * SERIES PICKER FOR CHARTS
  */
@@ -258,4 +247,4 @@ a.rowevolution-startmulti:hover {
 .jqplot-seriespicker-popover p.pickColumn,
 .jqplot-seriespicker-popover p.pickRow {
     cursor: pointer;
-}
\ No newline at end of file
+}
diff --git a/plugins/Morpheus/stylesheets/general/_typography.less b/plugins/Morpheus/stylesheets/general/_typography.less
index 03a6814950..7c15478723 100644
--- a/plugins/Morpheus/stylesheets/general/_typography.less
+++ b/plugins/Morpheus/stylesheets/general/_typography.less
@@ -85,10 +85,6 @@ a {
     color: @theme-color-link;
 }
 
-a.rowevolution-startmulti {
-    color: @theme-color-link !important;
-}
-
 .Piwik_Popover_Loading_Subject {
     color: @theme-color-link !important;
 }
diff --git a/tests/UI/specs/RowEvolution_spec.js b/tests/UI/specs/RowEvolution_spec.js
index 9214ee69b6..c6942fd714 100644
--- a/tests/UI/specs/RowEvolution_spec.js
+++ b/tests/UI/specs/RowEvolution_spec.js
@@ -39,7 +39,7 @@ describe("RowEvolution", function () {
 
     it('should load multi-row evolution correctly', function (done) {
         expect.screenshot('multirow_evolution').to.be.captureSelector('.ui-dialog', function (page) {
-            page.click('a.rowevolution-startmulti');
+            page.click('.rowevolution-startmulti');
             page.mouseMove('tbody tr:nth-child(2)');
             page.mouseMove('a.actionRowEvolution:visible');
             page.click('a.actionRowEvolution:visible');
@@ -62,4 +62,4 @@ describe("RowEvolution", function () {
             page.click('a.actionRowEvolution:visible');
         }, done);
     });
-});
\ No newline at end of file
+});
-- 
GitLab