diff options
-rw-r--r-- | assets/js/app.js | 14 | ||||
-rw-r--r-- | assets/js/board.js | 16 |
2 files changed, 29 insertions, 1 deletions
diff --git a/assets/js/app.js b/assets/js/app.js index e569dace..8191fe5c 100644 --- a/assets/js/app.js +++ b/assets/js/app.js @@ -241,10 +241,24 @@ Kanboard.Board = (function() { return; } + var _this = this; $.get(href, function setTooltipContent(data) { $('.ui-tooltip-content:visible').html(data); + var tooltip = $('.ui-tooltip:visible'); + + // Clear previous position, it interferes with the updated position computation + tooltip.css({ top: '', left: '' }); + + // Remove arrow, it will be added when repositionning + tooltip.children('.tooltip-arrow').remove(); + + // Reposition the tooltip + var position = $(_this).tooltip("option", "position"); + position.of = $(_this); + tooltip.position(position); + // Toggle subtasks status $('#tooltip-subtasks a').click(function(e) { diff --git a/assets/js/board.js b/assets/js/board.js index e02ec7f0..6e56dfa1 100644 --- a/assets/js/board.js +++ b/assets/js/board.js @@ -65,10 +65,24 @@ Kanboard.Board = (function() { return; } + var _this = this; $.get(href, function setTooltipContent(data) { $('.ui-tooltip-content:visible').html(data); + var tooltip = $('.ui-tooltip:visible'); + + // Clear previous position, it interferes with the updated position computation + tooltip.css({ top: '', left: '' }); + + // Remove arrow, it will be added when repositionning + tooltip.children('.tooltip-arrow').remove(); + + // Reposition the tooltip + var position = $(_this).tooltip("option", "position"); + position.of = $(_this); + tooltip.position(position); + // Toggle subtasks status $('#tooltip-subtasks a').click(function(e) { @@ -220,4 +234,4 @@ Kanboard.Board = (function() { } }; -})();
\ No newline at end of file +})(); |