diff --git a/mindplot/src/main/javascript/widget/IconPanel.js b/mindplot/src/main/javascript/widget/IconPanel.js index cbe147e0..bc096427 100644 --- a/mindplot/src/main/javascript/widget/IconPanel.js +++ b/mindplot/src/main/javascript/widget/IconPanel.js @@ -19,8 +19,7 @@ mindplot.widget.IconPanel = new Class({ Extends:mindplot.widget.ToolbarPaneItem, initialize:function (buttonId, model) { - console.error("mindplot.widget.IconPanel"); -// this.parent(buttonId, model); + this.parent(buttonId, model); }, _updateSelectedItem:function () { @@ -29,9 +28,8 @@ mindplot.widget.IconPanel = new Class({ }, buildPanel:function () { - var content = new Element('div', {'class':'toolbarPanel', 'id':'IconsPanel'}); - content.setStyles({width:253, height:230, padding:5}); - content.addEvent("click", function (event) { + var content = $('
').css({width: 253, height: 230, padding: 5}); + content.on('click', function (event) { event.stopPropagation() }); @@ -42,23 +40,25 @@ mindplot.widget.IconPanel = new Class({ // Separate icons by line ... var familyContent; if ((count % 12) == 0) { - familyContent = new Element('div').inject(content); + familyContent = $(''); + content.append(familyContent); } var iconId = familyIcons[j]; - var img = new Element('img', { - id:iconId, - src:mindplot.ImageIcon.prototype._getImageUrl(iconId) - }); - img.setStyles({width:16, - height:16, - padding:"0px 2px", - cursor:'pointer' - }).inject(familyContent); + var img = $('