]> source.dussan.org Git - redmine.git/commitdiff
Replace deprecated size() method with length property (#33384).
authorGo MAEDA <maeda@farend.jp>
Sat, 2 May 2020 01:19:03 +0000 (01:19 +0000)
committerGo MAEDA <maeda@farend.jp>
Sat, 2 May 2020 01:19:03 +0000 (01:19 +0000)
Patch by Marius BALTEANU.

git-svn-id: http://svn.redmine.org/redmine/trunk@19739 e93f8b46-1217-0410-a6f0-8f06a7374b81

public/javascripts/application.js
public/javascripts/gantt.js

index f33c9caf85715c8405fe1035ee112def120464e1..ac2d5f8b0fee1b75873d3b7d2b5822e900a69ee0 100644 (file)
@@ -726,12 +726,12 @@ function beforeShowDatePicker(input, inst) {
   var default_date = null;
   switch ($(input).attr("id")) {
     case "issue_start_date" :
-      if ($("#issue_due_date").size() > 0) {
+      if ($("#issue_due_date").length > 0) {
         default_date = $("#issue_due_date").val();
       }
       break;
     case "issue_due_date" :
-      if ($("#issue_start_date").size() > 0) {
+      if ($("#issue_start_date").length > 0) {
         var start_date = $("#issue_start_date").val();
         if (start_date != "") {
           start_date = new Date(Date.parse(start_date));
@@ -893,7 +893,7 @@ function toggleDisabledInit() {
 }
 function toggleMultiSelectIconInit() {
   $('.toggle-multiselect:not(.icon-toggle-minus), .toggle-multiselect:not(.icon-toggle-plus)').each(function(){
-    if ($(this).siblings('select').find('option:selected').size() > 1){
+    if ($(this).siblings('select').find('option:selected').length > 1){
       $(this).addClass('icon-toggle-minus');
     } else {
       $(this).addClass('icon-toggle-plus');
index 0af5363d47d48a6944831702293d0c6c435a24ef..da3b86b7a3139b2a41098e23b000043563971b7a 100644 (file)
@@ -38,7 +38,7 @@ function drawRelations() {
   $.each(arr, function(index_issue, element_issue) {
     var issue_from = $("#task-todo-issue-" + element_issue["issue_from"]);
     var issue_to   = $("#task-todo-issue-" + element_issue["issue_to"]);
-    if (issue_from.size() == 0 || issue_to.size() == 0) {
+    if (issue_from.length == 0 || issue_to.length == 0) {
       return;
     }
     var issue_height = issue_from.height();
@@ -124,7 +124,7 @@ function getProgressLinesArray() {
       if (is_over_end) {
         arr.push({left: draw_right, top: element_top_upper, is_right_edge: true});
         arr.push({left: draw_right, top: element_top_lower, is_right_edge: true, none_stroke: true});
-      } else if (issue_done.size() > 0) {
+      } else if (issue_done.length > 0) {
         var done_left = issue_done.first().position().left +
                            issue_done.first().width();
         arr.push({left: done_left, top: element_top_center});
@@ -134,7 +134,7 @@ function getProgressLinesArray() {
       } else {
         var todo_left = today_left;
         var issue_todo = $("#task-todo-" + $(element).attr("id"));
-        if (issue_todo.size() > 0){
+        if (issue_todo.length > 0){
           todo_left = issue_todo.first().position().left;
         }
         arr.push({left: Math.min(today_left, todo_left), top: element_top_center});