Sfoglia il codice sorgente

Backport r13313 from rails-4.1 to trunk.

Upgrade to JQuery 1.11.1

git-svn-id: http://svn.redmine.org/redmine/trunk@13408 e93f8b46-1217-0410-a6f0-8f06a7374b81
tags/2.6.0
Toshi MARUYAMA 9 anni fa
parent
commit
cc688bb1b1
31 ha cambiato i file con 52 aggiunte e 40 eliminazioni
  1. 1
    1
      Gemfile
  2. 1
    1
      app/helpers/application_helper.rb
  3. 1
    1
      app/views/issues/bulk_edit.html.erb
  4. 1
    1
      app/views/journals/new.js.erb
  5. 1
    1
      app/views/layouts/base.html.erb
  6. 1
    1
      app/views/projects/_form.html.erb
  7. 2
    2
      app/views/repositories/_revisions.html.erb
  8. 2
    2
      app/views/search/index.html.erb
  9. 1
    1
      app/views/wiki/destroy.html.erb
  10. 1
    1
      app/views/wiki/history.html.erb
  11. 5
    5
      public/javascripts/application.js
  12. 5
    5
      public/javascripts/context_menu.js
  13. 2
    2
      public/javascripts/gantt.js
  14. 21
    0
      public/javascripts/jquery-1.11.1-ui-1.11.0-ujs-3.1.1.js
  15. 0
    11
      public/javascripts/jquery-1.8.3-ui-1.9.2-ujs-2.0.3.js
  16. BIN
      public/stylesheets/jquery/images/animated-overlay.gif
  17. BIN
      public/stylesheets/jquery/images/ui-bg_diagonals-thick_18_b81900_40x40.png
  18. BIN
      public/stylesheets/jquery/images/ui-bg_diagonals-thick_20_666666_40x40.png
  19. BIN
      public/stylesheets/jquery/images/ui-bg_flat_10_000000_40x100.png
  20. BIN
      public/stylesheets/jquery/images/ui-bg_glass_100_eef5fd_1x400.png
  21. BIN
      public/stylesheets/jquery/images/ui-bg_glass_100_f6f6f6_1x400.png
  22. BIN
      public/stylesheets/jquery/images/ui-bg_glass_65_ffffff_1x400.png
  23. BIN
      public/stylesheets/jquery/images/ui-bg_gloss-wave_35_759fcf_500x100.png
  24. BIN
      public/stylesheets/jquery/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
  25. BIN
      public/stylesheets/jquery/images/ui-bg_highlight-soft_75_759fcf_1x100.png
  26. BIN
      public/stylesheets/jquery/images/ui-icons_222222_256x240.png
  27. BIN
      public/stylesheets/jquery/images/ui-icons_759fcf_256x240.png
  28. BIN
      public/stylesheets/jquery/images/ui-icons_ffd27a_256x240.png
  29. BIN
      public/stylesheets/jquery/images/ui-icons_ffffff_256x240.png
  30. 7
    0
      public/stylesheets/jquery/jquery-ui-1.11.0.css
  31. 0
    5
      public/stylesheets/jquery/jquery-ui-1.9.2.css

+ 1
- 1
Gemfile Vedi File

@@ -1,7 +1,7 @@
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"

+ 1
- 1
app/helpers/application_helper.rb Vedi File

@@ -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

+ 1
- 1
app/views/issues/bulk_edit.html.erb Vedi File

@@ -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);

+ 1
- 1
app/views/journals/new.js.erb Vedi File

@@ -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");

+ 1
- 1
app/views/layouts/base.html.erb Vedi File

@@ -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 %>

+ 1
- 1
app/views/projects/_form.html.erb Vedi File

@@ -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();

+ 2
- 2
app/views/repositories/_revisions.html.erb Vedi File

@@ -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>

+ 2
- 2
app/views/search/index.html.erb Vedi File

@@ -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();
}

+ 1
- 1
app/views/wiki/destroy.html.erb Vedi File

@@ -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>

+ 1
- 1
app/views/wiki/history.html.erb Vedi File

@@ -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>

+ 5
- 5
public/javascripts/application.js Vedi File

@@ -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();
});
}

+ 5
- 5
public/javascripts/context_menu.js Vedi File

@@ -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');
}
});

+ 2
- 2
public/javascripts/gantt.js Vedi File

@@ -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();
}

+ 21
- 0
public/javascripts/jquery-1.11.1-ui-1.11.0-ujs-3.1.1.js
File diff soppresso perché troppo grande
Vedi File


+ 0
- 11
public/javascripts/jquery-1.8.3-ui-1.9.2-ujs-2.0.3.js
File diff soppresso perché troppo grande
Vedi File


BIN
public/stylesheets/jquery/images/animated-overlay.gif Vedi File


BIN
public/stylesheets/jquery/images/ui-bg_diagonals-thick_18_b81900_40x40.png Vedi File


BIN
public/stylesheets/jquery/images/ui-bg_diagonals-thick_20_666666_40x40.png Vedi File


BIN
public/stylesheets/jquery/images/ui-bg_flat_10_000000_40x100.png Vedi File


BIN
public/stylesheets/jquery/images/ui-bg_glass_100_eef5fd_1x400.png Vedi File


BIN
public/stylesheets/jquery/images/ui-bg_glass_100_f6f6f6_1x400.png Vedi File


BIN
public/stylesheets/jquery/images/ui-bg_glass_65_ffffff_1x400.png Vedi File


BIN
public/stylesheets/jquery/images/ui-bg_gloss-wave_35_759fcf_500x100.png Vedi File


BIN
public/stylesheets/jquery/images/ui-bg_highlight-soft_100_eeeeee_1x100.png Vedi File


BIN
public/stylesheets/jquery/images/ui-bg_highlight-soft_75_759fcf_1x100.png Vedi File


BIN
public/stylesheets/jquery/images/ui-icons_222222_256x240.png Vedi File


BIN
public/stylesheets/jquery/images/ui-icons_759fcf_256x240.png Vedi File


BIN
public/stylesheets/jquery/images/ui-icons_ffd27a_256x240.png Vedi File


BIN
public/stylesheets/jquery/images/ui-icons_ffffff_256x240.png Vedi File


+ 7
- 0
public/stylesheets/jquery/jquery-ui-1.11.0.css
File diff soppresso perché troppo grande
Vedi File


+ 0
- 5
public/stylesheets/jquery/jquery-ui-1.9.2.css
File diff soppresso perché troppo grande
Vedi File


Loading…
Annulla
Salva