Feature #29482 » 0001-Fix-display-type-in-query-form-view.patch
| app/helpers/queries_helper.rb | ||
|---|---|---|
|
tags = ''.html_safe
|
||
|
query.available_display_types.each do |t|
|
||
|
tags << radio_button_tag('display_type', t, @query.display_type == t, :id => "display_type_#{t}") +
|
||
|
content_tag('label', l(:"label_display_type_#{t}"), :for => "display_type_#{t}")
|
||
|
content_tag('label', l(:"label_display_type_#{t}"), :for => "display_type_#{t}", :class => "inline")
|
||
|
end
|
||
|
tags
|
||
|
end
|
||
| app/views/queries/_form.html.erb | ||
|---|---|---|
|
});
|
||
|
$(function ($) {
|
||
|
$('#display_type').change(function (e) {
|
||
|
var option = $(e.target).val()
|
||
|
$('input[name=display_type]').change(function () {
|
||
|
var option = $('input[name=display_type]:checked').val();
|
||
|
if (option == 'board') {
|
||
|
$('fieldset#columns, fieldset#sort, p#default_columns, p#group_by').hide();
|
||
|
} else {
|
||
|
$('fieldset#columns, fieldset#sort, p#default_columns, p#group_by').show();
|
||
|
}
|
||
|
}).change()
|
||
|
}).change();
|
||
|
});
|
||
|
<% end %>
|
||