Refactoring/simplification of the pull-request about links
This commit is contained in:
@@ -1,19 +0,0 @@
|
||||
Kanboard.Link = (function() {
|
||||
|
||||
function on_change() {
|
||||
if ($('.behaviour').prop('checked')) {
|
||||
$('.link-inverse-label').hide();
|
||||
}
|
||||
else {
|
||||
$('.link-inverse-label').show();
|
||||
}
|
||||
}
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
if (Kanboard.Exists("link-edit-section")) {
|
||||
on_change();
|
||||
$(".behaviour").click(on_change);
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
||||
22
assets/js/src/task.js
Normal file
22
assets/js/src/task.js
Normal file
@@ -0,0 +1,22 @@
|
||||
Kanboard.Task = (function() {
|
||||
|
||||
jQuery(document).ready(function() {
|
||||
|
||||
if ($(".task-autocomplete").length) {
|
||||
|
||||
$("input[type=submit]").attr('disabled','disabled');
|
||||
|
||||
$(".task-autocomplete").autocomplete({
|
||||
source: $(".task-autocomplete").data("search-url"),
|
||||
minLength: 2,
|
||||
select: function(event, ui) {
|
||||
var field = $(".task-autocomplete").data("dst-field");
|
||||
$("input[name=" + field + "]").val(ui.item.id);
|
||||
|
||||
$("input[type=submit]").removeAttr('disabled');
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
})();
|
||||
Reference in New Issue
Block a user