Commit 5a53310b authored by marutosijp's avatar marutosijp

Backport r13313 from rails-4.1 to trunk.

Upgrade to JQuery 1.11.1

git-svn-id: https://svn.redmine.org/redmine/trunk@13408 e93f8b46-1217-0410-a6f0-8f06a7374b81
parent 0af86dd6
source 'https://rubygems.org'
gem "rails", "3.2.19"
gem "jquery-rails", "~> 2.0.2"
gem "jquery-rails", "~> 3.1.1"
gem "coderay", "~> 1.1.0"
gem "fastercsv", "~> 1.5.0", :platforms => [:mri_18, :mingw_18, :jruby]
gem "builder", ">= 3.0.4"
......
......@@ -1295,7 +1295,7 @@ module ApplicationHelper
# Returns the javascript tags that are included in the html layout head
def javascript_heads
tags = javascript_include_tag('jquery-1.8.3-ui-1.9.2-ujs-2.0.3', 'application')
tags = javascript_include_tag('jquery-1.11.1-ui-1.11.0-ujs-3.1.1', 'application')
unless User.current.pref.warn_on_leaving_unsaved == '0'
tags << "\n".html_safe + javascript_tag("$(window).load(function(){ warnLeavingUnsaved('#{escape_javascript l(:text_warn_on_leaving_unsaved)}'); });")
end
......
......@@ -185,7 +185,7 @@
<%= javascript_tag do %>
$(window).load(function(){
$(document).on('change', 'input[data-disables]', function(){
if ($(this).attr('checked')){
if ($(this).prop('checked')){
$($(this).data('disables')).attr('disabled', true).val('');
} else {
$($(this).data('disables')).attr('disabled', false);
......
......@@ -3,7 +3,7 @@ $('#issue_notes').val("<%= raw escape_javascript(@content) %>");
# when quoting a private journal, check the private checkbox
if @journal && @journal.private_notes?
%>
$('#issue_private_notes').attr('checked', true);
$('#issue_private_notes').prop('checked', true);
<% end %>
showAndScrollTo("update", "notes");
......
......@@ -7,7 +7,7 @@
<meta name="keywords" content="issue,bug,tracker" />
<%= csrf_meta_tag %>
<%= favicon %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.9.2', 'application', :media => 'all' %>
<%= stylesheet_link_tag 'jquery/jquery-ui-1.11.0', 'application', :media => 'all' %>
<%= stylesheet_link_tag 'rtl', :media => 'all' if l(:direction) == 'rtl' %>
<%= javascript_heads %>
<%= heads_for_theme %>
......
......@@ -92,7 +92,7 @@
<%= javascript_tag do %>
$(document).ready(function() {
$('#project_enabled_module_names_issue_tracking').on('change', function(){
if ($(this).attr('checked')){
if ($(this).prop('checked')){
$('#project_trackers, #project_issue_custom_fields').show();
} else {
$('#project_trackers, #project_issue_custom_fields').hide();
......
......@@ -37,8 +37,8 @@ end %>
<%= content_tag(:td, :class => 'id', :style => id_style) do %>
<%= link_to_revision(changeset, @repository) %>
<% end %>
<td class="checkbox"><%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').attr('checked',true);") if show_diff && (line_num < revisions.size) %></td>
<td class="checkbox"><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('#cb-#{line_num}').attr('checked')) {$('#cb-#{line_num-1}').attr('checked',true);}") if show_diff && (line_num > 1) %></td>
<td class="checkbox"><%= radio_button_tag('rev', changeset.identifier, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').prop('checked',true);") if show_diff && (line_num < revisions.size) %></td>
<td class="checkbox"><%= radio_button_tag('rev_to', changeset.identifier, (line_num==2), :id => "cbto-#{line_num}", :onclick => "if ($('#cb-#{line_num}').prop('checked')) {$('#cb-#{line_num-1}').prop('checked',true);}") if show_diff && (line_num > 1) %></td>
<td class="committed_on"><%= format_time(changeset.committed_on) %></td>
<td class="author"><%= changeset.author.to_s.truncate(30) %></td>
<td class="comments"><%= textilizable(truncate_at_line_break(changeset.comments)) %></td>
......
......@@ -56,8 +56,8 @@
<%= javascript_tag do %>
$("#search-types a").click(function(e){
e.preventDefault();
$("#search-types input[type=checkbox]").attr('checked', false);
$(this).siblings("input[type=checkbox]").attr('checked', true);
$("#search-types input[type=checkbox]").prop('checked', false);
$(this).siblings("input[type=checkbox]").prop('checked', true);
if ($("#search-input").val() != "") {
$("#search-form").submit();
}
......
......@@ -12,7 +12,7 @@
<label><%= radio_button_tag 'todo', 'reassign', false %> <%= l(:text_wiki_page_reassign_children) %></label>:
<%= label_tag "reassign_to_id", l(:description_wiki_subpages_reassign), :class => "hidden-for-sighted" %>
<%= select_tag 'reassign_to_id', wiki_page_options_for_select(@reassignable_to),
:onclick => "$('#todo_reassign').attr('checked', true);" %>
:onclick => "$('#todo_reassign').prop('checked', true);" %>
<% end %>
</p>
</div>
......
......@@ -21,7 +21,7 @@
<% @versions.each do |ver| %>
<tr class="wiki-page-version <%= cycle("odd", "even") %>">
<td class="id"><%= link_to h(ver.version), :action => 'show', :id => @page.title, :project_id => @page.project, :version => ver.version %></td>
<td class="checkbox"><%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').attr('checked', true);") if show_diff && (line_num < @versions.size) %></td>
<td class="checkbox"><%= radio_button_tag('version', ver.version, (line_num==1), :id => "cb-#{line_num}", :onclick => "$('#cbto-#{line_num+1}').prop('checked', true);") if show_diff && (line_num < @versions.size) %></td>
<td class="checkbox"><%= radio_button_tag('version_from', ver.version, (line_num==2), :id => "cbto-#{line_num}") if show_diff && (line_num > 1) %></td>
<td class="updated_on"><%= format_time(ver.updated_on) %></td>
<td class="author"><%= link_to_user ver.author %></td>
......
......@@ -2,7 +2,7 @@
Copyright (C) 2006-2014 Jean-Philippe Lang */
function checkAll(id, checked) {
$('#'+id).find('input[type=checkbox]:enabled').attr('checked', checked);
$('#'+id).find('input[type=checkbox]:enabled').prop('checked', checked);
}
function toggleCheckboxesBySelector(selector) {
......@@ -10,7 +10,7 @@ function toggleCheckboxesBySelector(selector) {
$(selector).each(function(index) {
if (!$(this).is(':checked')) { all_checked = false; }
});
$(selector).attr('checked', !all_checked);
$(selector).prop('checked', !all_checked);
}
function showAndScrollTo(id, focus) {
......@@ -100,7 +100,7 @@ function addFilter(field, operator, values) {
} else {
buildFilterRow(field, operator, values);
}
$('#cb_'+fieldId).attr('checked', true);
$('#cb_'+fieldId).prop('checked', true);
toggleFilter(field);
$('#add_filter_select').val('').children('option').each(function() {
if ($(this).attr('value') == field) {
......@@ -555,12 +555,12 @@ function warnLeavingUnsaved(message) {
}
function setupAjaxIndicator() {
$('#ajax-indicator').bind('ajaxSend', function(event, xhr, settings) {
$(document).bind('ajaxSend', function(event, xhr, settings) {
if ($('.ajax-loading').length === 0 && settings.contentType != 'application/octet-stream') {
$('#ajax-indicator').show();
}
});
$('#ajax-indicator').bind('ajaxStop', function() {
$(document).bind('ajaxStop', function() {
$('#ajax-indicator').hide();
});
}
......
......@@ -31,7 +31,7 @@ function contextMenuClick(event) {
// a row was clicked, check if the click was on checkbox
if (target.is('input')) {
// a checkbox may be clicked
if (target.attr('checked')) {
if (target.prop('checked')) {
tr.addClass('context-menu-selection');
} else {
tr.removeClass('context-menu-selection');
......@@ -180,7 +180,7 @@ function contextMenuIsSelected(tr) {
}
function contextMenuCheckSelectionBox(tr, checked) {
tr.find('input[type=checkbox]').attr('checked', checked);
tr.find('input[type=checkbox]').prop('checked', checked);
}
function contextMenuClearDocumentSelection() {
......@@ -207,13 +207,13 @@ function contextMenuInit(url) {
function toggleIssuesSelection(el) {
var boxes = $(el).parents('form').find('input[type=checkbox]');
var all_checked = true;
boxes.each(function(){ if (!$(this).attr('checked')) { all_checked = false; } });
boxes.each(function(){ if (!$(this).prop('checked')) { all_checked = false; } });
boxes.each(function(){
if (all_checked) {
$(this).removeAttr('checked');
$(this).parents('tr').removeClass('context-menu-selection');
} else if (!$(this).attr('checked')) {
$(this).attr('checked', true);
} else if (!$(this).prop('checked')) {
$(this).prop('checked', true);
$(this).parents('tr').addClass('context-menu-selection');
}
});
......
......@@ -165,8 +165,8 @@ function drawGanttHandler() {
else
draw_gantt = Raphael(folder);
setDrawArea();
if ($("#draw_progress_line").attr('checked'))
if ($("#draw_progress_line").prop('checked'))
drawGanttProgressLines();
if ($("#draw_relations").attr('checked'))
if ($("#draw_relations").prop('checked'))
drawRelations();
}
This source diff could not be displayed because it is too large. You can view the blob instead.
This source diff could not be displayed because it is too large. You can view the blob instead.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment