Rewrite tooltips code without jQuery

This commit is contained in:
Frédéric Guillot
2018-04-20 15:18:30 -07:00
parent 927607b5ff
commit 5996a8abcf
25 changed files with 152 additions and 200 deletions

View File

@@ -12,6 +12,16 @@ use Kanboard\Core\Base;
*/
class AppHelper extends Base
{
public function tooltipMarkdown($markdownText, $icon = 'fa-info-circle')
{
return '<span class="tooltip"><i class="fa '.$icon.'"></i><script type="text/template"><div class="markdown">'.$this->helper->text->markdown($markdownText).'</div></script></span>';
}
public function tooltipLink($label, $link)
{
return '<span class="tooltip" data-href="'.$link.'">'.$label.'</span>';
}
public function getToken()
{
return $this->token;

View File

@@ -51,18 +51,6 @@ class TextHelper extends Base
return $parser->text($text);
}
/**
* Escape Markdown text that need to be stored in HTML attribute
*
* @access public
* @param string $text
* @return mixed
*/
public function markdownAttribute($text)
{
return htmlentities($this->markdown($text), ENT_QUOTES, 'UTF-8');
}
/**
* Format a file size
*