mirror of
https://github.com/node-red/node-red.git
synced 2023-10-10 13:36:53 +02:00
Avoid innerHtml
This commit is contained in:
parent
ae7a3981c0
commit
0fef2ab509
@ -94,18 +94,19 @@
|
||||
}
|
||||
|
||||
buttons.forEach(function(button) {
|
||||
var innerHtml = "";
|
||||
var text = "";
|
||||
var titleAttribute="";
|
||||
if (button.icon) {
|
||||
innerHtml = '<i class="'+button.icon+'"></i> ';
|
||||
text = '<i class="'+button.icon+'"></i> ';
|
||||
}
|
||||
if (button.label) {
|
||||
innerHtml += button.label;
|
||||
text += button.label;
|
||||
}
|
||||
if (button.title) {
|
||||
titleAttribute = 'title="'+button.title+'"';
|
||||
}
|
||||
$('<a href="#" class="red-ui-button red-ui-button-small red-ui-editableList-addButton" style="margin-top: 4px; margin-right: 5px;" '+titleAttribute+'>'+innerHtml+'</a>')
|
||||
$('<a href="#" class="red-ui-button red-ui-button-small red-ui-editableList-addButton" style="margin-top: 4px; margin-right: 5px;" '+titleAttribute+'></a>')
|
||||
.text(text)
|
||||
.appendTo(that.topContainer)
|
||||
.on("click", function(evt) {
|
||||
evt.preventDefault();
|
||||
|
Loading…
Reference in New Issue
Block a user