Skip to content
Snippets Groups Projects
Commit c59bfc8e authored by Shane Tomlinson's avatar Shane Tomlinson
Browse files

Merge branch 'tooltip_contents' into dev

parents c3ebd4d2 613baa6a
No related branches found
No related tags found
No related merge requests found
......@@ -45,7 +45,7 @@ BrowserID.Tooltip = (function() {
function createTooltip(el) {
var contents = el.html();
var template = $("#templateTooltip").html();
_.templatesettings = {
_.templateSettings = {
interpolate : /\{\{(.+?)\}\}/g
};
var tooltip = $(_.template(template, {
......@@ -89,7 +89,6 @@ BrowserID.Tooltip = (function() {
positionTooltip(tooltip, target);
animateTooltip(tooltip, function() {
console.log("close tooltip");
if (tooltip) {
tooltip.remove();
tooltip = null;
......
......@@ -70,7 +70,7 @@
</script>
<script type="text/html" id="templateTooltip">
<div class="tooltip">
<div class="tooltip" id="createdTooltip">
{{ contents }}
</div>
</script>
......
......@@ -52,7 +52,6 @@ steal.plugins("jquery", "funcunit/qunit").then("/dialog/resources/tooltip", func
var startTime = new Date().getTime();
tooltip.showTooltip("#shortTooltip", function() {
console.log("calling tooltip back");
var endTime = new Date().getTime();
var diff = endTime - startTime;
ok(2000 <= diff && diff <= 3000, diff + " - minimum of 2 seconds, max of 3 seconds");
......@@ -60,6 +59,11 @@ steal.plugins("jquery", "funcunit/qunit").then("/dialog/resources/tooltip", func
start();
});
var el = $("#createdTooltip");
equal(el.length, 1, "one tooltip created");
var contents = el.html() || "";
equal(contents.indexOf("contents") === -1, true, "contents have been replaced");
stop();
});
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment