diff --git a/mindplot/src/main/javascript/widget/FontFamilyPanel.js b/mindplot/src/main/javascript/widget/FontFamilyPanel.js
index ec05921a..d536a8a0 100644
--- a/mindplot/src/main/javascript/widget/FontFamilyPanel.js
+++ b/mindplot/src/main/javascript/widget/FontFamilyPanel.js
@@ -25,12 +25,12 @@ mindplot.widget.FontFamilyPanel = new Class({
buildPanel: function() {
var content = $("
");
- content.innerHTML = '' +
+ content.html(
'Times
' +
'Arial
' +
'Tahoma
' +
- 'Verdana
';
-
+ 'Verdana
'
+ );
return content;
}
diff --git a/mindplot/src/main/javascript/widget/ListToolbarPanel.js b/mindplot/src/main/javascript/widget/ListToolbarPanel.js
index 3eead8c5..aa21ce17 100644
--- a/mindplot/src/main/javascript/widget/ListToolbarPanel.js
+++ b/mindplot/src/main/javascript/widget/ListToolbarPanel.js
@@ -25,11 +25,12 @@ mindplot.widget.ListToolbarPanel = new Class({
_initPanel: function () {
// Register on toolbar elements ...
+ var me = this;
this.getPanelElem().children('div').bind('click', function (event) {
event.stopPropagation();
- this.hide();
- var value = $defined(elem.getAttribute('model')) ? elem.getAttribute('model') : elem.id;
- this.getModel().setValue(value);
+ me.hide();
+ var value = $defined($(this).attr('model')) ? $(this).attr('model') : $(this).attr('id');
+ me.getModel().setValue(value);
});
},
@@ -38,12 +39,12 @@ mindplot.widget.ListToolbarPanel = new Class({
var menuElems = panelElem.find('div');
var value = this.getModel().getValue();
_.each(menuElems, function (elem) {
- var elemValue = $defined(elem.getAttribute('model')) ? elem.getAttribute('model') : elem.id;
+ var elemValue = $defined($(elem).attr('model')) ? $(elem).attr('model') : $(elem).attr('id');
$assert(elemValue, "elemValue can not be null");
if (elemValue == value)
- elem.className = "toolbarPanelLinkSelectedLink";
+ $(elem).attr('class', "toolbarPanelLinkSelectedLink");
else
- elem.className = "toolbarPanelLink";
+ $(elem).attr('class', "toolbarPanelLink");
});
return panelElem;
}