Project

General

Profile

Patch #2285 » issue_refinement-enter-result_apply-r2088.diff

Patch against r2088 - Mischa The Evil, 2008-12-06 00:19

View differences:

app/views/queries/_filters.rhtml (working copy)
53 53
        select.multiple = true;
54 54
    }
55 55
}
56

  
57
function textField_onKeyPress(evt, form) {
58
    var keyCode = null;
59

  
60
    if( typeof evt.which != undefined ) {
61
        keyCode = evt.which;
62
    } else if( evt.keyCode ) {
63
        keyCode = evt.keyCode;
64
    }
65
    if( 13 == keyCode && $('query_form') && $('content')) {
66
	<%= remote_function(:url => { :set_filter => 1}, :update => "content", :with => "Form.serialize('query_form')") %>
67
	return false;
68
    }
69
    return true;							    
70
}
56 71
//]]>
57 72
</script>
58 73

  
......
80 95
        </select>
81 96
        <%= link_to_function image_tag('bullet_toggle_plus.png'), "toggle_multi_select('#{field}');", :style => "vertical-align: bottom;" %>
82 97
    <% when :date, :date_past %>
83
        <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 3, :class => "select-small" %> <%= l(:label_day_plural) %>
98
        <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 3, :class => "select-small", :onkeypress => "return textField_onKeyPress(event, this.form);"  %> <%= l(:label_day_plural) %>
84 99
    <% when :string, :text %>
85
        <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 30, :class => "select-small" %>
100
        <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 30, :class => "select-small", :onkeypress => "return textField_onKeyPress(event, this.form);"  %>
86 101
    <% when :integer %>
87
        <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 3, :class => "select-small" %>
102
        <%= text_field_tag "values[#{field}][]", query.values_for(field), :id => "values_#{field}", :size => 3, :class => "select-small", :onkeypress => "return textField_onKeyPress(event, this.form);" %>
88 103
    <% end %>
89 104
    </div>
90 105
    <script type="text/javascript">toggle_filter('<%= field %>');</script>
(1-1/2)