diff --git a/assets/javascripts/reporting/group_bys.js b/assets/javascripts/reporting/group_bys.js index 6d7da4ab68..7812d9b006 100644 --- a/assets/javascripts/reporting/group_bys.js +++ b/assets/javascripts/reporting/group_bys.js @@ -102,12 +102,24 @@ Reporting.GroupBys = { }); }, + arrow_removal_hover: function(arrow, status) { + if (status) { + $(arrow).addClassName('arrow_removal_hover'); + } + else { + $(arrow).removeClassName('arrow_removal_hover'); + } + }, + init_arrow: function(group_by) { var arrow = new Element('img', { 'class': 'arrow in_row arrow_left', 'id': group_by.identify() + '_arrow' }); //init_arrow_hover_effects(arrow); + arrow.observe('mouseover', function() { Reporting.GroupBys.arrow_removal_hover(arrow, true) }); + arrow.observe('mouseout', function() { Reporting.GroupBys.arrow_removal_hover(arrow, false) }); + arrow.observe('mousedown', function() { Reporting.GroupBys.remove_group_by(arrow) }); return arrow; }, diff --git a/assets/stylesheets/reporting.css b/assets/stylesheets/reporting.css index a704905ebf..4eb92ee91e 100644 --- a/assets/stylesheets/reporting.css +++ b/assets/stylesheets/reporting.css @@ -304,7 +304,7 @@ fieldset#filter-settings table td > label { background-image: url(../images/group_by_arrow_both_hover_left.png); } -.arrow_both_remove { +.arrow_both.arrow_removal_hover { background-image: url(../images/group_by_arrow_both_remove.png); } @@ -316,7 +316,7 @@ fieldset#filter-settings table td > label { background-image: url(../images/group_by_arrow_left.png); } -.arrow_left_remove { +.arrow_left.arrow_removal_hover { background-image: url(../images/group_by_arrow_left_remove.png); }