Skip to content

Commit

Permalink
Merge pull request #432 from magento-firedrakes/bugfixes
Browse files Browse the repository at this point in the history
Fixed issues: 
- MAGETWO-58237: Order status history contains wrong data after creation of a Credit Memo
- MAGETWO-58386: Eliminate dependencies on modules from lib/Magento
- MAGETWO-55120: [GitHub] No category id on the category page #5467
- MAGETWO-55900: [GitHub] Translate messages on password strength #5509 #5883 #5861
- MAGETWO-50412: [GITHUB] Issues with adding groups on attribute set creation page (#3607)
  • Loading branch information
MomotenkoNatalia authored Sep 27, 2016
2 parents f3e16fa + 525f5b4 commit 14028aa
Show file tree
Hide file tree
Showing 48 changed files with 616 additions and 268 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,10 @@ public function execute()
return $this->ajaxRequestResponse($category, $resultPage);
}

$resultPageTitle = $categoryId ? $category->getName() . ' (ID: ' . $categoryId . ')' : __('Categories');
$resultPage->setActiveMenu('Magento_Catalog::catalog_categories');
$resultPage->getConfig()->getTitle()->prepend(__('Categories'));
$resultPage->getConfig()->getTitle()->prepend($categoryId ? $category->getName() : __('Categories'));
$resultPage->getConfig()->getTitle()->prepend($resultPageTitle);
$resultPage->addBreadcrumb(__('Manage Catalog Categories'), __('Manage Categories'));

$block = $resultPage->getLayout()->getBlock('catalog.wysiwyg.js');
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,8 @@
},

submit : function() {
var i, child, newNode;

if( TreePanels.root.firstChild == TreePanels.root.lastChild ) {
return;
}
Expand All @@ -221,6 +223,7 @@

if( editSet.currentNode && editSet.currentNode.attributes.cls == 'folder' ) {
TreePanels.root.removeChild(editSet.currentNode);

for( i in editSet.currentNode.childNodes ) {
if( editSet.currentNode.childNodes[i].id ) {
child = editSet.currentNode.childNodes[i];
Expand All @@ -231,12 +234,20 @@
}
}
}

editSet.req.removeGroups[editSet.currentNode.id] = editSet.currentNode.id;
editSet.currentNode = false;
}
},

SystemNodesExists : function(currentNode) {
if (!currentNode) {
alert({
content: '<?php echo $block->escapeJs(__('Please select a node.')) ?>'
});
return;
}

for (i in currentNode.childNodes) {
if (currentNode.childNodes[i].id) {
child = editSet.currentNode.childNodes[i];
Expand All @@ -253,31 +264,40 @@

addGroup : function() {
prompt({
title: "<?php /* @escapeNotVerified */ echo __('Add New Group') ?>",
content: "<?php /* @escapeNotVerified */ echo __('Please enter a new group name.') ?>",
value: "",
validation: true,
validationRules: ['required-entry'],
attributesForm: {
novalidate: 'novalidate',
action: ''
},
attributesField: {
name: 'name',
'data-validate': '{required:true}',
maxlength: '255'
},
actions: {
confirm: function (group_name) {
group_name = group_name.strip();
if( group_name == '' ) {
self.addGroup();
} else if( group_name != false && group_name != null && group_name != '' ) {

if (!editSet.validateGroupName(group_name, 0)) {
return;
}

var newNode = new Ext.tree.TreeNode({
text : group_name.escapeHTML(),
cls : 'folder',
allowDrop : true,
allowDrag : true
});
TreePanels.root.appendChild(newNode);
newNode.addListener('beforemove', editSet.groupBeforeMove);
newNode.addListener('beforeinsert', editSet.groupBeforeInsert);
newNode.addListener('beforeappend', editSet.groupBeforeInsert);
newNode.addListener('click', editSet.register);

if (!editSet.validateGroupName(group_name, 0)) {
return;
}

var newNode = new Ext.tree.TreeNode({
text : group_name.escapeHTML(),
cls : 'folder',
allowDrop : true,
allowDrag : true
});

TreePanels.root.appendChild(newNode);
newNode.addListener('beforemove', editSet.groupBeforeMove);
newNode.addListener('beforeinsert', editSet.groupBeforeInsert);
newNode.addListener('beforeappend', editSet.groupBeforeInsert);
newNode.addListener('click', editSet.register);
}
}
});
Expand All @@ -302,7 +322,7 @@
}
for (var i=0; i < TreePanels.root.childNodes.length; i++) {
if (TreePanels.root.childNodes[i].text.toLowerCase() == name.toLowerCase() && TreePanels.root.childNodes[i].id != exceptNodeId) {
errorText = '<?php /* @escapeNotVerified */ echo __('An attribute group named "/name/" already exists".') ?>';
errorText = '<?php /* @escapeNotVerified */ echo __('An attribute group named "/name/" already exists.') ?>';
alert({
content: errorText.replace("/name/",name)
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ define([
'jquery',
'underscore',
'uiRegistry',
'jquery/ui'
'jquery/ui',
'mage/translate'
], function ($, _, registry) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ define([
'jquery',
'Magento_Ui/js/lib/validation/utils',
'Magento_Ui/js/form/element/abstract',
'Magento_Ui/js/lib/validation/validator'
'Magento_Ui/js/lib/validation/validator',
'mage/translate'
], function ($, utils, Abstract, validator) {
'use strict';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,31 +4,31 @@
*/
define([
'uiComponent',
'Magento_Customer/js/customer-data'
'Magento_Customer/js/customer-data',
'mage/translate'
], function (Component, customerData) {
'use strict';

var sidebarInitialized = false;

function initSidebar() {
if (sidebarInitialized) {
return ;
return;
}
sidebarInitialized = true;
require([
'jquery',
'mage/mage'
], function ($) {
/*eslint-disable max-len*/
$('[data-role=compare-products-sidebar]').mage('compareItems', {
"removeConfirmMessage": $.mage.__(
"Are you sure you want to remove this item from your Compare Products list?"
),
"removeSelector": "#compare-items a.action.delete",
"clearAllConfirmMessage": $.mage.__(
"Are you sure you want to remove all items from your Compare Products list?"
),
"clearAllSelector": "#compare-clear-all"
'removeConfirmMessage': $.mage.__('Are you sure you want to remove this item from your Compare Products list?'),
'removeSelector': '#compare-items a.action.delete',
'clearAllConfirmMessage': $.mage.__('Are you sure you want to remove all items from your Compare Products list?'),
'clearAllSelector': '#compare-clear-all'
});

/*eslint-enable max-len*/
});
}

Expand Down
2 changes: 1 addition & 1 deletion app/code/Magento/Checkout/view/frontend/web/js/sidebar.js
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ define([

if (msg) {
alert({
content: $.mage.__(msg)
content: msg
});
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ define([
'jquery',
'ko',
'underscore',
'sidebar'
'sidebar',
'mage/translate'
], function (Component, customerData, $, ko, _) {
'use strict';

Expand Down Expand Up @@ -68,9 +69,7 @@ define([
'qty': ':input.cart-item-qty',
'button': ':button.update-cart-item'
},
'confirmMessage': $.mage.__(
'Are you sure you would like to remove this item from the shopping cart?'
)
'confirmMessage': $.mage.__('Are you sure you would like to remove this item from the shopping cart?')
});
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,8 @@ require([
'jquery',
'mage/template',
'jquery/file-uploader',
'domReady!'
'domReady!',
'mage/translate'
], function ($, mageTemplate) {
$('#<?php echo $block->getHtmlId() ?> .fileupload').fileupload({
dataType: 'json',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ define([
'jquery',
'Magento_Ui/js/core/app',
'underscore',
'notification'
'notification',
'mage/translate'
], function (Component, $, bootstrap, _) {
'use strict';

Expand Down Expand Up @@ -221,9 +222,7 @@ define([

if (data.items.length) {
this.productsModal.notification('add', {
message: $.mage.__(
'Choose a new product to delete and replace the current product configuration.'
),
message: $.mage.__('Choose a new product to delete and replace the current product configuration.'),
messageContainer: this.gridSelector
});
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,13 @@ define([
this.setNotificationMessage();
},
setNotificationMessage: function () {
/*eslint-disable max-len*/
var msg = $.mage.__('When you remove or add an attribute, we automatically update all configurations and you will need to recreate current configurations manually.');

/*eslint-enable max-len*/

if (this.mode === 'edit') {
this.wizard.setNotificationMessage($.mage.__('When you remove or add an attribute, we automatically ' +
'update all configurations and you will need to recreate current configurations manually.'));
this.wizard.setNotificationMessage(msg);
}
},
doSelectSavedAttributes: function () {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ require([
'mage/template',
'jquery/file-uploader',
'mage/mage',
'prototype'
'prototype',
'mage/translate'
], function(jQuery, registry, mageTemplate){
registry.get('downloadable', function (Downloadable) {
var linkTemplate = '<tr>'+
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,8 @@ require([
'uiRegistry',
'mage/template',
'jquery/file-uploader',
'prototype'
'prototype',
'mage/translate'
], function (jQuery, registry, mageTemplate) {
registry.get('downloadable', function (Downloadable) {
var sampleTemplate = '<tr>'+
Expand Down
Loading

0 comments on commit 14028aa

Please sign in to comment.