Project

General

Profile

Patch #33384 » 0002-Replace-size-with-length.patch

Marius BĂLTEANU, 2020-05-01 13:59

View differences:

public/javascripts/application.js
726 726
  var default_date = null;
727 727
  switch ($(input).attr("id")) {
728 728
    case "issue_start_date" :
729
      if ($("#issue_due_date").size() > 0) {
729
      if ($("#issue_due_date").length > 0) {
730 730
        default_date = $("#issue_due_date").val();
731 731
      }
732 732
      break;
733 733
    case "issue_due_date" :
734
      if ($("#issue_start_date").size() > 0) {
734
      if ($("#issue_start_date").length > 0) {
735 735
        var start_date = $("#issue_start_date").val();
736 736
        if (start_date != "") {
737 737
          start_date = new Date(Date.parse(start_date));
......
893 893
}
894 894
function toggleMultiSelectIconInit() {
895 895
  $('.toggle-multiselect:not(.icon-toggle-minus), .toggle-multiselect:not(.icon-toggle-plus)').each(function(){
896
    if ($(this).siblings('select').find('option:selected').size() > 1){
896
    if ($(this).siblings('select').find('option:selected').length > 1){
897 897
      $(this).addClass('icon-toggle-minus');
898 898
    } else {
899 899
      $(this).addClass('icon-toggle-plus');
public/javascripts/gantt.js
38 38
  $.each(arr, function(index_issue, element_issue) {
39 39
    var issue_from = $("#task-todo-issue-" + element_issue["issue_from"]);
40 40
    var issue_to   = $("#task-todo-issue-" + element_issue["issue_to"]);
41
    if (issue_from.size() == 0 || issue_to.size() == 0) {
41
    if (issue_from.length == 0 || issue_to.length == 0) {
42 42
      return;
43 43
    }
44 44
    var issue_height = issue_from.height();
......
124 124
      if (is_over_end) {
125 125
        arr.push({left: draw_right, top: element_top_upper, is_right_edge: true});
126 126
        arr.push({left: draw_right, top: element_top_lower, is_right_edge: true, none_stroke: true});
127
      } else if (issue_done.size() > 0) {
127
      } else if (issue_done.length > 0) {
128 128
        var done_left = issue_done.first().position().left +
129 129
                           issue_done.first().width();
130 130
        arr.push({left: done_left, top: element_top_center});
......
134 134
      } else {
135 135
        var todo_left = today_left;
136 136
        var issue_todo = $("#task-todo-" + $(element).attr("id"));
137
        if (issue_todo.size() > 0){
137
        if (issue_todo.length > 0){
138 138
          todo_left = issue_todo.first().position().left;
139 139
        }
140 140
        arr.push({left: Math.min(today_left, todo_left), top: element_top_center});
    (1-1/1)