|
|
|
@ -132,9 +132,11 @@ module.exports = Backbone.View.extend({ |
|
|
|
*/ |
|
|
|
handleEdit(e) { |
|
|
|
e && e.stopPropagation(); |
|
|
|
const em = this.em; |
|
|
|
const inputEl = this.getInputName(); |
|
|
|
inputEl[inputProp] = true; |
|
|
|
inputEl.focus(); |
|
|
|
em && em.setEditing(1); |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
@ -142,10 +144,12 @@ module.exports = Backbone.View.extend({ |
|
|
|
*/ |
|
|
|
handleEditEnd(e) { |
|
|
|
e && e.stopPropagation(); |
|
|
|
const em = this.em; |
|
|
|
const inputEl = this.getInputName(); |
|
|
|
const name = inputEl.textContent; |
|
|
|
inputEl[inputProp] = false; |
|
|
|
this.model.set({ name }); |
|
|
|
em && em.setEditing(1); |
|
|
|
}, |
|
|
|
|
|
|
|
/** |
|
|
|
|