From 258abc232f960cb17d936349a8bceb6956b3022d Mon Sep 17 00:00:00 2001 From: Ezequiel Bergamaschi Date: Mon, 21 Apr 2014 00:34:01 -0300 Subject: [PATCH] fixing some old refs --- mindplot/src/main/javascript/widget/ColorPalettePanel.js | 2 +- mindplot/src/main/javascript/widget/FloatingTip.js | 3 +++ mindplot/src/main/javascript/widget/IconPanel.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/mindplot/src/main/javascript/widget/ColorPalettePanel.js b/mindplot/src/main/javascript/widget/ColorPalettePanel.js index 0ec25678..488d3719 100644 --- a/mindplot/src/main/javascript/widget/ColorPalettePanel.js +++ b/mindplot/src/main/javascript/widget/ColorPalettePanel.js @@ -66,7 +66,7 @@ mindplot.widget.ColorPalettePanel = new Class({ var model = this.getModel(); _.each(colorCells, function (elem) { $(elem).on('click', function () { - var color = elem.css("background-color"); + var color = $(elem).css("background-color"); model.setValue(color); this.hide(); }.bind(this)); diff --git a/mindplot/src/main/javascript/widget/FloatingTip.js b/mindplot/src/main/javascript/widget/FloatingTip.js index c00e4320..7074f791 100644 --- a/mindplot/src/main/javascript/widget/FloatingTip.js +++ b/mindplot/src/main/javascript/widget/FloatingTip.js @@ -47,6 +47,9 @@ mindplot.widget.FloatingTip = new Class({ }, hide: function (element) { + if (element) { + console.error('element is not necessary'); + } this.element.popover('hide'); this.fireEvent('hide', [this, element]); return this; diff --git a/mindplot/src/main/javascript/widget/IconPanel.js b/mindplot/src/main/javascript/widget/IconPanel.js index bc096427..6de3728e 100644 --- a/mindplot/src/main/javascript/widget/IconPanel.js +++ b/mindplot/src/main/javascript/widget/IconPanel.js @@ -59,7 +59,7 @@ mindplot.widget.IconPanel = new Class({ var panel = this; var model = this.getModel(); img.on('click', function (event) { - model.setValue(this.id); + model.setValue(this.attr('id')); panel.hide(); }.bind(img));