Skip to content

Commit d9c82cb

Browse files
author
roman
committed
MAGETWO-92180: Fixed incorrect behavior of attribute sets
1 parent f7083b2 commit d9c82cb

File tree

1 file changed

+26
-0
lines changed
  • app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set

1 file changed

+26
-0
lines changed

app/code/Magento/Catalog/view/adminhtml/templates/catalog/product/attribute/set/main.phtml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,15 @@
187187
for( j in config[i].children ) {
188188
if(config[i].children[j].id) {
189189
newNode = new Ext.tree.TreeNode(config[i].children[j]);
190+
191+
if (typeof newNode.ui.onTextChange === 'function') {
192+
newNode.ui.onTextChange = function (_3, _4, _5) {
193+
if (this.rendered) {
194+
this.textNode.innerText = _4;
195+
}
196+
}
197+
}
198+
190199
node.appendChild(newNode);
191200
newNode.addListener('click', editSet.unregister);
192201
}
@@ -199,6 +208,14 @@
199208
editSet = function() {
200209
return {
201210
register : function(node) {
211+
if (typeof node.ui.onTextChange === 'function') {
212+
node.ui.onTextChange = function (_3, _4, _5) {
213+
if (this.rendered) {
214+
this.textNode.innerText = _4;
215+
}
216+
}
217+
}
218+
202219
editSet.currentNode = node;
203220
},
204221

@@ -271,6 +288,15 @@
271288
allowDrop : true,
272289
allowDrag : true
273290
});
291+
292+
if (typeof newNode.ui.onTextChange === 'function') {
293+
newNode.ui.onTextChange = function (_3, _4, _5) {
294+
if (this.rendered) {
295+
this.textNode.innerText = _4;
296+
}
297+
}
298+
}
299+
274300
TreePanels.root.appendChild(newNode);
275301
newNode.addListener('beforemove', editSet.groupBeforeMove);
276302
newNode.addListener('beforeinsert', editSet.groupBeforeInsert);

0 commit comments

Comments
 (0)