Merged r11915 from trunk (#14186).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/branches/2.3-stable@11998 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang 2013-07-11 18:33:54 +00:00
parent 3d9f274140
commit 01887f1e67
2 changed files with 11 additions and 1 deletions

View File

@ -3,7 +3,7 @@ var operatorLabels = <%= raw_json Query.operators_labels %>;
var operatorByType = <%= raw_json Query.operators_by_filter_type %>; var operatorByType = <%= raw_json Query.operators_by_filter_type %>;
var availableFilters = <%= raw_json query.available_filters_as_json %>; var availableFilters = <%= raw_json query.available_filters_as_json %>;
var labelDayPlural = <%= raw_json l(:label_day_plural) %>; var labelDayPlural = <%= raw_json l(:label_day_plural) %>;
var allProjects = <%= raw query.all_projects_values.to_json %>; var allProjects = <%= raw_json query.all_projects_values %>;
$(document).ready(function(){ $(document).ready(function(){
initFilters(); initFilters();
<% query.filters.each do |field, options| %> <% query.filters.each do |field, options| %>

View File

@ -1210,4 +1210,14 @@ RAW
def test_javascript_include_tag_for_plugin_should_pick_the_plugin_javascript def test_javascript_include_tag_for_plugin_should_pick_the_plugin_javascript
assert_match 'src="/plugin_assets/foo/javascripts/scripts.js"', javascript_include_tag("scripts", :plugin => :foo) assert_match 'src="/plugin_assets/foo/javascripts/scripts.js"', javascript_include_tag("scripts", :plugin => :foo)
end end
def test_raw_json_should_escape_closing_tags
s = raw_json(["<foo>bar</foo>"])
assert_equal '["<foo>bar<\/foo>"]', s
end
def test_raw_json_should_be_html_safe
s = raw_json(["foo"])
assert s.html_safe?
end
end end