Defect #31870

jQuery / zIndex deprecated

Added by Fabrice Helmbacher 8 days ago. Updated 7 days ago.

Status:NewStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Third-party libraries
Target version:Candidate for next minor release
Resolution: Affected version:4.0.4

Description

Système : Debian 10
Redmine version : 4.0.1-2
libjs-jquery-ui version : 1.12.1+dfsg-5

.zIndex() method is deprecated from jQuery UI
https://jqueryui.com/upgrade-guide/1.12/#removed-zindex

.zIndex() is used in public/javascript/application.js
https://www.redmine.org/projects/redmine/repository/entry/branches/4.0-stable/public/javascripts/application.js
lines 429, 439

problem occurs when adding member to a project.

proposed correction :

function showModal(id, width, title) {
  var el = $('#'+id).first();
  if (el.length === 0 || el.is(':visible')) {return;}
  if (!title) title = el.find('h3.title').text();
  // moves existing modals behind the transparent background
-  $(".modal").zIndex(99);
+  $(".modal").css('zIndex',99);
  el.dialog({
    width: width,
    modal: true,
    resizable: false,
    dialogClass: 'modal',
    title: title
  }).on('dialogclose', function(){
-    $(".modal").zIndex(101);
+    $(".modal").css('zIndex',101);
  });
  el.find("input[type=text], input[type=submit]").first().focus();
}

Related issues

Related to Redmine - Feature #31196: Updates jQuery to 2.2.4 and adds jQuery Migrate library Closed
Blocks Redmine - Feature #31887: Update jQuery UI to 1.12.1 New

History

#2 Updated by Go MAEDA 5 days ago

  • Related to Feature #31196: Updates jQuery to 2.2.4 and adds jQuery Migrate library added

#3 Updated by Marius BALTEANU 4 days ago

#4 Updated by Marius BALTEANU 4 days ago

#5 Updated by Marius BALTEANU 4 days ago

Also available in: Atom PDF