|
|
@ -1,5 +1,4 @@ |
|
|
|
/* exported timeAddManual, toggleStopwatch, cancelStopwatch */ |
|
|
|
/* exported deleteDependencyModal, cancelCodeComment, onOAuthLoginClick */ |
|
|
|
/* exported toggleDeadlineForm, setDeadline, updateDeadline, deleteDependencyModal, cancelCodeComment, onOAuthLoginClick */ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import './publicpath.js'; |
|
|
|
import './publicpath.js'; |
|
|
|
|
|
|
|
|
|
|
@ -2525,6 +2524,8 @@ $(document).ready(async () => { |
|
|
|
initU2FAuth(); |
|
|
|
initU2FAuth(); |
|
|
|
initU2FRegister(); |
|
|
|
initU2FRegister(); |
|
|
|
initIssueList(); |
|
|
|
initIssueList(); |
|
|
|
|
|
|
|
initIssueTimetracking(); |
|
|
|
|
|
|
|
initIssueDue(); |
|
|
|
initWipTitle(); |
|
|
|
initWipTitle(); |
|
|
|
initPullRequestReview(); |
|
|
|
initPullRequestReview(); |
|
|
|
initRepoStatusChecker(); |
|
|
|
initRepoStatusChecker(); |
|
|
@ -3105,22 +3106,22 @@ function initVueApp() { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
window.timeAddManual = function () { |
|
|
|
function initIssueTimetracking() { |
|
|
|
$('.mini.modal') |
|
|
|
$(document).on('click', '.issue-add-time', () => { |
|
|
|
.modal({ |
|
|
|
$('.mini.modal').modal({ |
|
|
|
duration: 200, |
|
|
|
duration: 200, |
|
|
|
onApprove() { |
|
|
|
onApprove() { |
|
|
|
$('#add_time_manual_form').trigger('submit'); |
|
|
|
$('#add_time_manual_form').trigger('submit'); |
|
|
|
} |
|
|
|
} |
|
|
|
}).modal('show'); |
|
|
|
}).modal('show'); |
|
|
|
}; |
|
|
|
}); |
|
|
|
|
|
|
|
$(document).on('click', '.issue-start-time, .issue-stop-time', () => { |
|
|
|
window.toggleStopwatch = function () { |
|
|
|
|
|
|
|
$('#toggle_stopwatch_form').trigger('submit'); |
|
|
|
$('#toggle_stopwatch_form').trigger('submit'); |
|
|
|
}; |
|
|
|
}); |
|
|
|
window.cancelStopwatch = function () { |
|
|
|
$(document).on('click', '.issue-cancel-time', () => { |
|
|
|
$('#cancel_stopwatch_form').trigger('submit'); |
|
|
|
$('#cancel_stopwatch_form').trigger('submit'); |
|
|
|
}; |
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function initFilterBranchTagDropdown(selector) { |
|
|
|
function initFilterBranchTagDropdown(selector) { |
|
|
|
$(selector).each(function () { |
|
|
|
$(selector).each(function () { |
|
|
@ -3476,16 +3477,7 @@ function initTopicbar() { |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
window.toggleDeadlineForm = function () { |
|
|
|
function updateDeadline(deadlineString) { |
|
|
|
$('#deadlineForm').fadeToggle(150); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
window.setDeadline = function () { |
|
|
|
|
|
|
|
const deadline = $('#deadlineDate').val(); |
|
|
|
|
|
|
|
window.updateDeadline(deadline); |
|
|
|
|
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
window.updateDeadline = function (deadlineString) { |
|
|
|
|
|
|
|
$('#deadline-err-invalid-date').hide(); |
|
|
|
$('#deadline-err-invalid-date').hide(); |
|
|
|
$('#deadline-loader').addClass('loading'); |
|
|
|
$('#deadline-loader').addClass('loading'); |
|
|
|
|
|
|
|
|
|
|
@ -3519,7 +3511,20 @@ window.updateDeadline = function (deadlineString) { |
|
|
|
$('#deadline-err-invalid-date').show(); |
|
|
|
$('#deadline-err-invalid-date').show(); |
|
|
|
} |
|
|
|
} |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function initIssueDue() { |
|
|
|
|
|
|
|
$(document).on('click', '.issue-due-edit', () => { |
|
|
|
|
|
|
|
$('#deadlineForm').fadeToggle(150); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
$(document).on('click', '.issue-due-remove', () => { |
|
|
|
|
|
|
|
updateDeadline(''); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
$(document).on('submit', '.issue-due-form', () => { |
|
|
|
|
|
|
|
updateDeadline($('#deadlineDate').val()); |
|
|
|
|
|
|
|
return false; |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
window.deleteDependencyModal = function (id, type) { |
|
|
|
window.deleteDependencyModal = function (id, type) { |
|
|
|
$('.remove-dependency') |
|
|
|
$('.remove-dependency') |
|
|
|