mirror of
https://github.com/FoggedLens/iD.git
synced 2026-02-13 01:02:58 +00:00
reduce unnecessary html injection
This commit is contained in:
@@ -148,8 +148,13 @@ export function uiNoteEditor(context) {
|
||||
noteSaveEnter
|
||||
.append('h4')
|
||||
.attr('class', '.note-save-header')
|
||||
.html(function() {
|
||||
return _note.isNew() ? t.html('note.newDescription') : t.html('note.newComment');
|
||||
.text('')
|
||||
.each(function() {
|
||||
if (_note.isNew()) {
|
||||
t.append('note.newDescription')(d3_select(this));
|
||||
} else {
|
||||
t.append('note.newComment')(d3_select(this));
|
||||
}
|
||||
});
|
||||
|
||||
var commentTextarea = noteSaveEnter
|
||||
@@ -366,10 +371,11 @@ export function uiNoteEditor(context) {
|
||||
|
||||
buttonSection.select('.status-button') // select and propagate data
|
||||
.attr('disabled', (hasAuth ? null : true))
|
||||
.html(function(d) {
|
||||
.text('')
|
||||
.each(function(d) {
|
||||
var action = (d.status === 'open' ? 'close' : 'open');
|
||||
var andComment = (d.newComment ? '_comment' : '');
|
||||
return t.html('note.' + action + andComment);
|
||||
t.append('note.' + action + andComment)(d3_select(this));
|
||||
});
|
||||
buttonSection.select('.status-button')
|
||||
.on('click.status', clickStatus);
|
||||
|
||||
Reference in New Issue
Block a user