Skip to content

Commit e346437

Browse files
MAGETWO-50412: [GITHUB] Issues with adding groups on attribute set creation page (#3607)
- Fix static tests
1 parent b173877 commit e346437

File tree

2 files changed

+15
-24
lines changed
  • app/code/Magento
    • Catalog/view/adminhtml/templates/catalog/product/attribute/set
    • Ui/view/base/web/js/modal

2 files changed

+15
-24
lines changed

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

Lines changed: 14 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,9 @@
5353
"jquery",
5454
"Magento_Ui/js/modal/prompt",
5555
"Magento_Ui/js/modal/alert",
56-
"Magento_Ui/js/modal/confirm",
5756
"extjs/ext-tree-checkbox",
5857
"prototype"
59-
], function(jQuery, prompt, alert, confirm){
58+
], function(jQuery, prompt, alert){
6059

6160
//<![CDATA[
6261
var allowDragAndDrop = <?php /* @escapeNotVerified */ echo($block->getIsReadOnly() ? 'false' : 'true'); ?>;
@@ -223,29 +222,21 @@
223222
}
224223

225224
if( editSet.currentNode && editSet.currentNode.attributes.cls == 'folder' ) {
226-
confirm({
227-
title: "<?php /* @escapeNotVerified */ echo __('Delete Group') ?>",
228-
content: '<?php echo $block->escapeJs(__('Are you sure you want to delete this group?')) ?>',
229-
actions: {
230-
confirm: function () {
231-
TreePanels.root.removeChild(editSet.currentNode);
232-
233-
for( i in editSet.currentNode.childNodes ) {
234-
if( editSet.currentNode.childNodes[i].id ) {
235-
child = editSet.currentNode.childNodes[i];
236-
newNode = new Ext.tree.TreeNode(child.attributes);
237-
238-
if( child.attributes.is_user_defined == 1 ) {
239-
TreePanels.root2.appendChild(newNode);
240-
}
241-
}
242-
}
243-
244-
editSet.req.removeGroups[editSet.currentNode.id] = editSet.currentNode.id;
245-
editSet.currentNode = false;
225+
TreePanels.root.removeChild(editSet.currentNode);
226+
227+
for( i in editSet.currentNode.childNodes ) {
228+
if( editSet.currentNode.childNodes[i].id ) {
229+
child = editSet.currentNode.childNodes[i];
230+
newNode = new Ext.tree.TreeNode(child.attributes);
231+
232+
if( child.attributes.is_user_defined == 1 ) {
233+
TreePanels.root2.appendChild(newNode);
246234
}
247235
}
248-
});
236+
}
237+
238+
editSet.req.removeGroups[editSet.currentNode.id] = editSet.currentNode.id;
239+
editSet.currentNode = false;
249240
}
250241
},
251242

app/code/Magento/Ui/view/base/web/js/modal/prompt.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ define([
154154

155155
if (result) {
156156
if (this.options.validation && !this.validate()) {
157-
return;
157+
return false;
158158
}
159159

160160
value = this.modal.find(this.options.promptField).val();

0 commit comments

Comments
 (0)