Made check for element name IE and Opera compatible.

pull/6827/head
Markus Kahl 14 years ago
parent f97b49474c
commit dc2f060171
  1. 4
      assets/javascripts/reporting/filters.js

@ -26,13 +26,13 @@ Reporting.Filters = {
callback_func(); callback_func();
} }
// select first option by default // select first option by default
if (select.localName === "div") { if (select.tagName.toLowerCase() === "div") {
// check if we might have a radio-box // check if we might have a radio-box
radio_options = $$('.' + filter_name + '_radio_option input'); radio_options = $$('.' + filter_name + '_radio_option input');
if (radio_options && radio_options.size() !== 0) { if (radio_options && radio_options.size() !== 0) {
radio_options.first().checked = true; radio_options.first().checked = true;
} }
} else if (select.localName === "select") { } else if (select.tagName.toLowerCase() === "select") {
select.selectedIndex = 0; select.selectedIndex = 0;
} }
}, },

Loading…
Cancel
Save