src/js/widgets/tooltipWidget.js
branchnew-model
changeset 875 43629caa77bc
parent 874 38b65761a7d5
child 876 03967b6ada7c
--- a/src/js/widgets/tooltipWidget.js	Fri Apr 20 19:13:11 2012 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,41 +0,0 @@
-/* this widget displays a small tooltip */
-IriSP.TooltipWidget = function(Popcorn, config, Serializer) {
-    IriSP.Widget.call(this, Popcorn, config, Serializer);
-};
-
-IriSP.TooltipWidget.prototype = new IriSP.Widget();
-
-IriSP.TooltipWidget.prototype.draw = function() {
-    var _html = Mustache.to_html(IriSP.tooltipWidget_template),
-        _this = this;
-    this.$.parent().css({
-        "position" : "relative"
-    });
-    this.$.append(_html);
-    this.$tip = this.$.find(".Ldt-Tooltip");
-    this.$.mouseover(function() {
-        _this.$tip.hide();
-    });
-    this.hide();
-};
-
-IriSP.TooltipWidget.prototype.show = function(x, y, text, color) {
-    
-    if (typeof color !== "undefined") {
-        this.$.find(".Ldt-Tooltip-Color").show().css("background-color", color);
-    } else {
-        this.$.find(".Ldt-Tooltip-Color").hide();
-    }
-    
-    this.$.find(".Ldt-Tooltip-Text").html(text);
-
-    this.$tip.show();
-    this.$tip.css({
-        "left" : Math.floor(x - this.$tip.outerWidth() / 2) + "px",
-        "top" : Math.floor(y - this.$tip.outerHeight() - 5) + "px"
-    });
-};
-
-IriSP.TooltipWidget.prototype.hide = function() {
-    this.$tip.hide();
-};