Skip to content

Instantly share code, notes, and snippets.

@Avotrix
Last active January 17, 2019 20:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Avotrix/d4c9ed93714d90afba0b0a278d6a98ea to your computer and use it in GitHub Desktop.
Save Avotrix/d4c9ed93714d90afba0b0a278d6a98ea to your computer and use it in GitHub Desktop.
cell renderer
render: function($td, cell) { var message = cell.value;
var tip = cell.value;
if(message.length > 48) { message = message.substring(0,47) + "..." }
$td.html(_.template('<a href="#" data-toggle="tooltip" data-placement="left" title="<%- tip%>"><%- message%></a>',
{
tip: tip,
message: message
}));
// This line wires up the Bootstrap tooltip to the cell markup
$td.children('[data-toggle="tooltip"]').tooltip();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment