mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-09-12 07:10:07 +02:00
fix font type tooltip
This commit is contained in:
parent
f8fee50076
commit
382af76753
@ -25,12 +25,12 @@ mindplot.widget.FontFamilyPanel = new Class({
|
||||
buildPanel: function() {
|
||||
|
||||
var content = $("<div class='toolbarPanel' id='fontFamilyPanel'></div>");
|
||||
content.innerHTML = '' +
|
||||
content.html(
|
||||
'<div id="times" model="Times" class="toolbarPanelLink" style="font-family:times;">Times</div>' +
|
||||
'<div id="arial" model="Arial" style="font-family:arial;">Arial</div>' +
|
||||
'<div id="tahoma" model="Tahoma" style="font-family:tahoma;">Tahoma</div>' +
|
||||
'<div id="verdana" model="Verdana" style="font-family:verdana;">Verdana</div>';
|
||||
|
||||
'<div id="verdana" model="Verdana" style="font-family:verdana;">Verdana</div>'
|
||||
);
|
||||
return content;
|
||||
|
||||
}
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user