mirror of
https://bitbucket.org/wisemapping/wisemapping-open-source.git
synced 2024-11-25 23:44:54 +01: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() {
|
buildPanel: function() {
|
||||||
|
|
||||||
var content = $("<div class='toolbarPanel' id='fontFamilyPanel'></div>");
|
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="times" model="Times" class="toolbarPanelLink" style="font-family:times;">Times</div>' +
|
||||||
'<div id="arial" model="Arial" style="font-family:arial;">Arial</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="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;
|
return content;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -25,11 +25,12 @@ mindplot.widget.ListToolbarPanel = new Class({
|
|||||||
|
|
||||||
_initPanel: function () {
|
_initPanel: function () {
|
||||||
// Register on toolbar elements ...
|
// Register on toolbar elements ...
|
||||||
|
var me = this;
|
||||||
this.getPanelElem().children('div').bind('click', function (event) {
|
this.getPanelElem().children('div').bind('click', function (event) {
|
||||||
event.stopPropagation();
|
event.stopPropagation();
|
||||||
this.hide();
|
me.hide();
|
||||||
var value = $defined(elem.getAttribute('model')) ? elem.getAttribute('model') : elem.id;
|
var value = $defined($(this).attr('model')) ? $(this).attr('model') : $(this).attr('id');
|
||||||
this.getModel().setValue(value);
|
me.getModel().setValue(value);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
@ -38,12 +39,12 @@ mindplot.widget.ListToolbarPanel = new Class({
|
|||||||
var menuElems = panelElem.find('div');
|
var menuElems = panelElem.find('div');
|
||||||
var value = this.getModel().getValue();
|
var value = this.getModel().getValue();
|
||||||
_.each(menuElems, function (elem) {
|
_.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");
|
$assert(elemValue, "elemValue can not be null");
|
||||||
if (elemValue == value)
|
if (elemValue == value)
|
||||||
elem.className = "toolbarPanelLinkSelectedLink";
|
$(elem).attr('class', "toolbarPanelLinkSelectedLink");
|
||||||
else
|
else
|
||||||
elem.className = "toolbarPanelLink";
|
$(elem).attr('class', "toolbarPanelLink");
|
||||||
});
|
});
|
||||||
return panelElem;
|
return panelElem;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user