Skip to content

Commit

Permalink
Fix bug: tooltips for descriptions are not shown after a board refresh
Browse files Browse the repository at this point in the history
  • Loading branch information
fguillot committed Apr 11, 2015
1 parent d3727e9 commit 05b1cfd
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion app/Template/board/swimlane.php
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@

<?= $this->e($column['title']) ?>

<?php if (! empty($column['description'])): ?>
<?php if (! $not_editable && ! empty($column['description'])): ?>
<span class="column-tooltip pull-right" title='<?= $this->e($this->markdown($column['description'])) ?>'>
<i class="fa fa-info-circle"></i>
</span>
Expand Down
8 changes: 4 additions & 4 deletions assets/js/app.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

46 changes: 23 additions & 23 deletions assets/js/src/base.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,29 +189,6 @@ var Kanboard = (function() {
$('#board-selector').trigger('chosen:open');
});

// Tooltip for column description
$(".column-tooltip").tooltip({
content: function() {
return '<div class="markdown">' + $(this).attr("title") + '</div>';
},
position: {
my: 'left-20 top',
at: 'center bottom+9',
using: function(position, feedback) {

$(this).css(position);

var arrow_pos = feedback.target.left + feedback.target.width / 2 - feedback.element.left - 20;

$("<div>")
.addClass("tooltip-arrow")
.addClass(feedback.vertical)
.addClass(arrow_pos == 0 ? "align-left" : "align-right")
.appendTo(this);
}
}
});

$.datepicker.setDefaults($.datepicker.regional[$("body").data("js-lang")]);

Kanboard.InitAfterAjax();
Expand Down Expand Up @@ -263,6 +240,29 @@ var Kanboard = (function() {
}
});
}

// Tooltip for column description
$(".column-tooltip").tooltip({
content: function() {
return '<div class="markdown">' + $(this).attr("title") + '</div>';
},
position: {
my: 'left-20 top',
at: 'center bottom+9',
using: function(position, feedback) {

$(this).css(position);

var arrow_pos = feedback.target.left + feedback.target.width / 2 - feedback.element.left - 20;

$("<div>")
.addClass("tooltip-arrow")
.addClass(feedback.vertical)
.addClass(arrow_pos == 0 ? "align-left" : "align-right")
.appendTo(this);
}
}
});
}
};

Expand Down

0 comments on commit 05b1cfd

Please sign in to comment.