Skip to content

Commit f18c84e

Browse files
Merge pull request #3340 from magento-qwerty/MAGETWO-92179
Fixed issues: - MAGETWO-92179: Fixed incorrect behavior of attribute sets
2 parents b67d77d + 691ad50 commit f18c84e

File tree

1 file changed

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

1 file changed

+30
-6
lines changed

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

Lines changed: 30 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -188,20 +188,36 @@
188188
for( j in config[i].children ) {
189189
if(config[i].children[j].id) {
190190
newNode = new Ext.tree.TreeNode(config[i].children[j]);
191+
192+
if (typeof newNode.ui.onTextChange === 'function') {
193+
newNode.ui.onTextChange = function (_3, _4, _5) {
194+
if (this.rendered) {
195+
this.textNode.innerText = _4;
196+
}
197+
}
198+
}
199+
}
191200
node.appendChild(newNode);
192201
newNode.addListener('click', editSet.unregister);
193202
}
194203
}
195204
}
196205
}
197206
}
198-
}
199207

200-
editSet = function() {
201-
return {
202-
register : function(node) {
203-
editSet.currentNode = node;
204-
},
208+
209+
editSet = function () {
210+
return {
211+
register: function (node) {
212+
editSet.currentNode = node;
213+
if (typeof node.ui.onTextChange === 'function') {
214+
node.ui.onTextChange = function (_3, _4, _5) {
215+
if (this.rendered) {
216+
this.textNode.innerText = _4;
217+
}
218+
}
219+
}
220+
},
205221

206222
unregister : function() {
207223
editSet.currentNode = false;
@@ -293,6 +309,14 @@
293309
allowDrag : true
294310
});
295311

312+
if (typeof newNode.ui.onTextChange === 'function') {
313+
newNode.ui.onTextChange = function (_3, _4, _5) {
314+
if (this.rendered) {
315+
this.textNode.innerText = _4;
316+
}
317+
}
318+
}
319+
296320
TreePanels.root.appendChild(newNode);
297321
newNode.addListener('beforemove', editSet.groupBeforeMove);
298322
newNode.addListener('beforeinsert', editSet.groupBeforeInsert);

0 commit comments

Comments
 (0)