|
|
@ -546,7 +546,7 @@ function initIssue() { |
|
|
|
if ($textArea.attr("id") == "issue-reply-content") { |
|
|
|
if ($textArea.attr("id") == "issue-reply-content") { |
|
|
|
var $closeBtn = $('#issue-close-btn'); |
|
|
|
var $closeBtn = $('#issue-close-btn'); |
|
|
|
var $openBtn = $('#issue-open-btn'); |
|
|
|
var $openBtn = $('#issue-open-btn'); |
|
|
|
|
|
|
|
|
|
|
|
if ($textArea.val().length) { |
|
|
|
if ($textArea.val().length) { |
|
|
|
$closeBtn.val($closeBtn.data("text")); |
|
|
|
$closeBtn.val($closeBtn.data("text")); |
|
|
|
$openBtn.val($openBtn.data("text")); |
|
|
|
$openBtn.val($openBtn.data("text")); |
|
|
@ -575,7 +575,7 @@ function initIssue() { |
|
|
|
$hoverImage.addClass("attachment-preview-img"); |
|
|
|
$hoverImage.addClass("attachment-preview-img"); |
|
|
|
|
|
|
|
|
|
|
|
$hoverElement.append($hoverImage); |
|
|
|
$hoverElement.append($hoverImage); |
|
|
|
$(document.body).append($hoverElement);
|
|
|
|
$(document.body).append($hoverElement); |
|
|
|
|
|
|
|
|
|
|
|
var over = function() { |
|
|
|
var over = function() { |
|
|
|
var $this = $(this); |
|
|
|
var $this = $(this); |
|
|
@ -605,7 +605,7 @@ function initIssue() { |
|
|
|
$hoverElement.css({"top": top + "px", "left": left + "px"}); |
|
|
|
$hoverElement.css({"top": top + "px", "left": left + "px"}); |
|
|
|
$hoverElement.css({"height": height + 16, "width": width + 16}); |
|
|
|
$hoverElement.css({"height": height + 16, "width": width + 16}); |
|
|
|
$hoverElement.show(); |
|
|
|
$hoverElement.show(); |
|
|
|
});
|
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$hoverElement.show(); |
|
|
|
$hoverElement.show(); |
|
|
|
} |
|
|
|
} |
|
|
@ -624,7 +624,7 @@ function initIssue() { |
|
|
|
var $addButton = $("#attachments-button"); |
|
|
|
var $addButton = $("#attachments-button"); |
|
|
|
var files = []; |
|
|
|
var files = []; |
|
|
|
var fileInput = document.getElementById("attachments-input"); |
|
|
|
var fileInput = document.getElementById("attachments-input"); |
|
|
|
|
|
|
|
|
|
|
|
if (fileInput === null) { |
|
|
|
if (fileInput === null) { |
|
|
|
return; |
|
|
|
return; |
|
|
|
} |
|
|
|
} |
|
|
@ -635,9 +635,9 @@ function initIssue() { |
|
|
|
files.splice($parent.data("index"), 1); |
|
|
|
files.splice($parent.data("index"), 1); |
|
|
|
$parent.remove(); |
|
|
|
$parent.remove(); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
var clickedButton; |
|
|
|
var clickedButton; |
|
|
|
|
|
|
|
|
|
|
|
$('input[type="submit"],input[type="button"],button.btn-success', fileInput.form).on('click', function() { |
|
|
|
$('input[type="submit"],input[type="button"],button.btn-success', fileInput.form).on('click', function() { |
|
|
|
clickedButton = this; |
|
|
|
clickedButton = this; |
|
|
|
|
|
|
|
|
|
|
@ -722,7 +722,7 @@ function initIssue() { |
|
|
|
|
|
|
|
|
|
|
|
xhr.open("POST", this.action, true); |
|
|
|
xhr.open("POST", this.action, true); |
|
|
|
xhr.send(data); |
|
|
|
xhr.send(data); |
|
|
|
|
|
|
|
|
|
|
|
return false; |
|
|
|
return false; |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
@ -826,7 +826,7 @@ function initIssue() { |
|
|
|
//window.location.reload();
|
|
|
|
//window.location.reload();
|
|
|
|
$a.data("assigned", uid); |
|
|
|
$a.data("assigned", uid); |
|
|
|
|
|
|
|
|
|
|
|
if (uid > 0) {
|
|
|
|
if (uid > 0) { |
|
|
|
$('.clear-assignee').toggleShow(); |
|
|
|
$('.clear-assignee').toggleShow(); |
|
|
|
$(".assignee > p").html('<img src="' + img + '"><strong>' + text + '</strong>'); |
|
|
|
$(".assignee > p").html('<img src="' + img + '"><strong>' + text + '</strong>'); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -862,12 +862,12 @@ function initIssue() { |
|
|
|
$('.clear-milestone').toggleShow(); |
|
|
|
$('.clear-milestone').toggleShow(); |
|
|
|
} |
|
|
|
} |
|
|
|
$('.milestone', '#issue').on('click', 'li.milestone-item', function () { |
|
|
|
$('.milestone', '#issue').on('click', 'li.milestone-item', function () { |
|
|
|
var id = $(this).data("id");
|
|
|
|
var id = $(this).data("id"); |
|
|
|
if (is_issue_bar) { |
|
|
|
if (is_issue_bar) { |
|
|
|
var m = $m.data("milestone"); |
|
|
|
var m = $m.data("milestone"); |
|
|
|
if (id != m) { |
|
|
|
if (id != m) { |
|
|
|
var text = $(this).text(); |
|
|
|
var text = $(this).text(); |
|
|
|
|
|
|
|
|
|
|
|
$.post($m.data("ajax"), { |
|
|
|
$.post($m.data("ajax"), { |
|
|
|
issue: $('#issue').data("id"), |
|
|
|
issue: $('#issue').data("id"), |
|
|
|
milestone: id |
|
|
|
milestone: id |
|
|
@ -876,7 +876,7 @@ function initIssue() { |
|
|
|
//window.location.reload();
|
|
|
|
//window.location.reload();
|
|
|
|
$m.data("milestone", id); |
|
|
|
$m.data("milestone", id); |
|
|
|
|
|
|
|
|
|
|
|
if (id > 0) {
|
|
|
|
if (id > 0) { |
|
|
|
$('.clear-milestone').toggleShow(); |
|
|
|
$('.clear-milestone').toggleShow(); |
|
|
|
$(".milestone > .name").html('<a href="' + location.pathname + '?milestone=' + id + '"><strong>' + text + '</strong></a>'); |
|
|
|
$(".milestone > .name").html('<a href="' + location.pathname + '?milestone=' + id + '"><strong>' + text + '</strong></a>'); |
|
|
|
} else { |
|
|
|
} else { |
|
|
@ -982,7 +982,7 @@ function initIssue() { |
|
|
|
$(item).addClass("no-checked"); |
|
|
|
$(item).addClass("no-checked"); |
|
|
|
|
|
|
|
|
|
|
|
$("#label-" + id, $labels).remove(); |
|
|
|
$("#label-" + id, $labels).remove(); |
|
|
|
|
|
|
|
|
|
|
|
if ($labels.children(".label-item").length == 0) { |
|
|
|
if ($labels.children(".label-item").length == 0) { |
|
|
|
$labels.append("<p>None yet</p>"); |
|
|
|
$labels.append("<p>None yet</p>"); |
|
|
|
} |
|
|
|
} |
|
|
@ -991,7 +991,7 @@ function initIssue() { |
|
|
|
|
|
|
|
|
|
|
|
$(item).removeClass("no-checked"); |
|
|
|
$(item).removeClass("no-checked"); |
|
|
|
$(item).addClass("checked"); |
|
|
|
$(item).addClass("checked"); |
|
|
|
|
|
|
|
|
|
|
|
$("p:not([class])", $labels).remove(); |
|
|
|
$("p:not([class])", $labels).remove(); |
|
|
|
|
|
|
|
|
|
|
|
var $l = $("<p></p>"); |
|
|
|
var $l = $("<p></p>"); |
|
|
|