|
|
|
@ -40,25 +40,32 @@ Reporting.GroupBys = { |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
create_remove_button: function(group_by) { |
|
|
|
|
var button = new Element('a', { |
|
|
|
|
var remove_link, remove_icon; |
|
|
|
|
remove_link = new Element('a', { |
|
|
|
|
'class': 'group_by_remove in_row', |
|
|
|
|
'id': group_by.identify() + '_remove', |
|
|
|
|
'href': 'javascript:' |
|
|
|
|
}); |
|
|
|
|
remove_icon = $('hidden_remove_img').clone(); |
|
|
|
|
remove_icon.removeAttribute('id'); |
|
|
|
|
remove_icon.removeAttribute('style'); |
|
|
|
|
|
|
|
|
|
if (Reporting._LA != undefined) { |
|
|
|
|
button.setAttribute('title', Reporting._LA["REMOVE"] + ' ' + group_by.down('label').innerHTML); |
|
|
|
|
remove_link.setAttribute('title', Reporting._LA["REMOVE"] + ' ' + group_by.down('label').innerHTML); |
|
|
|
|
remove_icon.setAttribute('alt', Reporting._LA["REMOVE"] + ' ' + group_by.down('label').innerHTML); |
|
|
|
|
} |
|
|
|
|
button.observe('click', function(e) { |
|
|
|
|
Reporting.GroupBys.remove_element_event_action(e, group_by, button) |
|
|
|
|
remove_link.observe('click', function(e) { |
|
|
|
|
Reporting.GroupBys.remove_element_event_action(e, group_by, remove_link) |
|
|
|
|
}); |
|
|
|
|
button.observe('keypress', function(e) { |
|
|
|
|
remove_link.observe('keypress', function(e) { |
|
|
|
|
/* keyCode 32: Space */ |
|
|
|
|
if (e.keyCode == 32) { |
|
|
|
|
e.preventDefault(); |
|
|
|
|
Reporting.GroupBys.remove_element_event_action(e, group_by, button) |
|
|
|
|
Reporting.GroupBys.remove_element_event_action(e, group_by, remove_link) |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
return button; |
|
|
|
|
remove_link.appendChild(remove_icon); |
|
|
|
|
return remove_link; |
|
|
|
|
}, |
|
|
|
|
|
|
|
|
|
remove_element_event_action: function(event, group_by, button) { |
|
|
|
|