Project

General

Profile

Patch #7204 » redmine.patch

Massimo Zaniboni, 2011-01-10 00:30

View differences:

app/controllers/application_controller.rb
before_filter :user_setup, :check_if_login_required, :set_localization
filter_parameter_logging :password
protect_from_forgery
rescue_from ActionController::InvalidAuthenticityToken, :with => :invalid_authenticity_token
after_filter :before_sending_response_hook
def before_sending_response_hook
call_hook(:application_controller_before_sending_response, { :user => User.current, :request => request, :headers => headers, :response => response, :logger => logger })
end
include Redmine::Search::Controller
include Redmine::MenuManager::MenuController
app/views/issues/index.rhtml
<%= link_to_remote l(:button_apply),
{ :url => { :set_filter => 1 },
:method => :get,
:before => 'selectAllOptions("selected_columns");',
:update => "content",
:complete => "apply_filters_observer()",
:with => "Form.serialize('query_form')"
:with => "RedMineForm_serializeExceptAuthenticityToken('query_form')",
}, :class => 'icon icon-checked' %>
<%= link_to_remote l(:button_clear),
public/javascripts/application.js
}
Event.observe(window, 'load', hideOnLoad);
function RedMineForm_serializeExceptAuthenticityToken(form, options) {
return Form.serializeElements(RedMineForm_getElementsExceptAuthenticityCode(form), options);
}
function RedMineForm_getElementsExceptAuthenticityCode(form) {
return $A($(form).getElementsByTagName('*')).inject([],
function(elements, child) {
var e = child.readAttribute('name');
if (e == null || e.toLowerCase() != 'authenticity_token') {
if (Form.Element.Serializers[child.tagName.toLowerCase()])
elements.push(Element.extend(child));
}
return elements;
}
);
}
(2-2/2)