Do not refresh the whole page when changing subtask status (work in progress)
This commit is contained in:
@@ -41,6 +41,19 @@ App.prototype.listen = function() {
|
||||
this.autoComplete();
|
||||
this.datePicker();
|
||||
this.focus();
|
||||
|
||||
$(document).on("click", ".ajax-replace", function(e) {
|
||||
e.preventDefault();
|
||||
var el = $(this);
|
||||
|
||||
$.ajax({
|
||||
cache: false,
|
||||
url: el.attr("href"),
|
||||
success: function(data) {
|
||||
el.replaceWith(data);
|
||||
}
|
||||
});
|
||||
});
|
||||
};
|
||||
|
||||
App.prototype.refresh = function() {
|
||||
|
||||
@@ -48,21 +48,6 @@ Tooltip.prototype.listen = function() {
|
||||
var position = $(_this).tooltip("option", "position");
|
||||
position.of = $(_this);
|
||||
tooltip.position(position);
|
||||
|
||||
// Toggle subtasks status
|
||||
$('#tooltip-subtasks a').not(".popover").click(function(e) {
|
||||
|
||||
e.preventDefault();
|
||||
e.stopPropagation();
|
||||
|
||||
if ($(this).hasClass("popover-subtask-restriction")) {
|
||||
self.app.popover.open($(this).attr('href'));
|
||||
$(_this).tooltip('close');
|
||||
}
|
||||
else {
|
||||
$.get($(this).attr('href'), setTooltipContent);
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
return '<i class="fa fa-spinner fa-spin"></i>';
|
||||
|
||||
Reference in New Issue
Block a user