Skip to content

Commit 1537fb9

Browse files
committed
Merge branch 'AC-109' into AC-109-combined
2 parents 6817c54 + c1ab5f3 commit 1537fb9

File tree

9 files changed

+11539
-11565
lines changed

9 files changed

+11539
-11565
lines changed

app/code/Magento/Catalog/Test/Mftf/ActionGroup/AddCategoryImageActionGroup.xml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
<waitForElementVisible selector="{{AdminCategoryContentSection.uploadButton}}" stepKey="seeImageSectionIsReady"/>
2222
<attachFile selector="{{AdminCategoryContentSection.uploadImageFile}}" userInput="{{image.file}}" stepKey="uploadFile"/>
2323
<comment userInput="BIC workaround" stepKey="waitForAjaxUpload"/>
24-
<waitForPageLoad stepKey="waitForLoading"/>
24+
<waitForElementVisible selector="{{AdminCategoryContentSection.imageFileName}}" stepKey="waitForLoading"/>
2525
<grabTextFrom selector="{{AdminCategoryContentSection.imageFileName}}" stepKey="grabCategoryFileName"/>
2626
<assertRegExp stepKey="assertEquals" message="pass">
2727
<expectedResult type="string">/magento-logo(_[0-9]+)*?\.png$/</expectedResult>

app/code/Magento/Catalog/view/frontend/web/js/catalog-add-to-cart.js

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ define([
3434
if (this.options.bindSubmit) {
3535
this._bindSubmit();
3636
}
37-
$(this.options.addToCartButtonSelector).attr('disabled', false);
37+
$(this.options.addToCartButtonSelector).prop('disabled', false);
3838
},
3939

4040
/**
@@ -101,7 +101,7 @@ define([
101101
formData = new FormData(form[0]);
102102

103103
$.ajax({
104-
url: form.attr('action'),
104+
url: form.prop('action'),
105105
data: formData,
106106
type: 'post',
107107
dataType: 'json',
@@ -201,7 +201,7 @@ define([
201201

202202
addToCartButton.addClass(this.options.addToCartButtonDisabledClass);
203203
addToCartButton.find('span').text(addToCartButtonTextWhileAdding);
204-
addToCartButton.attr('title', addToCartButtonTextWhileAdding);
204+
addToCartButton.prop('title', addToCartButtonTextWhileAdding);
205205
},
206206

207207
/**
@@ -213,14 +213,14 @@ define([
213213
addToCartButton = $(form).find(this.options.addToCartButtonSelector);
214214

215215
addToCartButton.find('span').text(addToCartButtonTextAdded);
216-
addToCartButton.attr('title', addToCartButtonTextAdded);
216+
addToCartButton.prop('title', addToCartButtonTextAdded);
217217

218218
setTimeout(function () {
219219
var addToCartButtonTextDefault = self.options.addToCartButtonTextDefault || $t('Add to Cart');
220220

221221
addToCartButton.removeClass(self.options.addToCartButtonDisabledClass);
222222
addToCartButton.find('span').text(addToCartButtonTextDefault);
223-
addToCartButton.attr('title', addToCartButtonTextDefault);
223+
addToCartButton.prop('title', addToCartButtonTextDefault);
224224
}, 1000);
225225
}
226226
});

app/code/Magento/ProductVideo/view/adminhtml/web/js/new-video-dialog.js

Lines changed: 77 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -63,13 +63,12 @@ define([
6363
* @returns {Boolean}
6464
*/
6565
update: function () {
66-
var checkVideoID = this.element.find(this.options.container).find(
67-
'.' + this.options.videoClass
68-
).data('code'),
69-
eventVideoData = {
70-
oldVideoId: checkVideoID ? checkVideoID.toString() : checkVideoID,
71-
newVideoId: this.options.videoId ? this.options.videoId.toString() : this.options.videoId
72-
};
66+
var checkVideoID =
67+
this.element.find(this.options.container).find('.' + this.options.videoClass).data('code'),
68+
eventVideoData = {
69+
oldVideoId: checkVideoID ? checkVideoID.toString() : checkVideoID,
70+
newVideoId: this.options.videoId ? this.options.videoId.toString() : this.options.videoId
71+
};
7372

7473
if (checkVideoID && checkVideoID !== this.options.videoId) {
7574
this._doUpdate();
@@ -336,45 +335,45 @@ define([
336335
var self = this;
337336

338337
self.element.on('finish_update_video finish_create_video', $.proxy(function (element, playerData) {
339-
if (!self._onlyVideoPlayer ||
340-
!self._isEditPage && playerData.oldVideoId !== playerData.newVideoId ||
341-
playerData.oldVideoId && playerData.oldVideoId !== playerData.newVideoId
342-
) {
343-
self.element.updateInputFields({
344-
reset: false,
345-
data: {
346-
title: data.title,
347-
description: data.description
348-
}
349-
});
350-
this._loadRemotePreview(data.thumbnail);
351-
}
352-
self._onlyVideoPlayer = true;
353-
}, this))
354-
.createVideoPlayer({
355-
videoId: data.videoId,
356-
videoProvider: data.videoProvider,
357-
useYoutubeNocookie: data.useYoutubeNocookie,
358-
reset: false,
359-
metaData: {
360-
DOM: {
361-
title: '.video-information.title span',
362-
uploaded: '.video-information.uploaded span',
363-
uploader: '.video-information.uploader span',
364-
duration: '.video-information.duration span',
365-
all: '.video-information span',
366-
wrapper: '.video-information'
367-
},
338+
if (!self._onlyVideoPlayer ||
339+
!self._isEditPage && playerData.oldVideoId !== playerData.newVideoId ||
340+
playerData.oldVideoId && playerData.oldVideoId !== playerData.newVideoId
341+
) {
342+
self.element.updateInputFields({
343+
reset: false,
368344
data: {
369345
title: data.title,
370-
uploaded: data.uploaded,
371-
uploader: data.channel,
372-
duration: data.duration,
373-
uploaderUrl: data.channelId
346+
description: data.description
374347
}
348+
});
349+
this._loadRemotePreview(data.thumbnail);
350+
}
351+
self._onlyVideoPlayer = true;
352+
}, this))
353+
.createVideoPlayer({
354+
videoId: data.videoId,
355+
videoProvider: data.videoProvider,
356+
useYoutubeNocookie: data.useYoutubeNocookie,
357+
reset: false,
358+
metaData: {
359+
DOM: {
360+
title: '.video-information.title span',
361+
uploaded: '.video-information.uploaded span',
362+
uploader: '.video-information.uploader span',
363+
duration: '.video-information.duration span',
364+
all: '.video-information span',
365+
wrapper: '.video-information'
366+
},
367+
data: {
368+
title: data.title,
369+
uploaded: data.uploaded,
370+
uploader: data.channel,
371+
duration: data.duration,
372+
uploaderUrl: data.channelId
375373
}
376-
})
377-
.off('finish_update_video finish_create_video');
374+
}
375+
})
376+
.off('finish_update_video finish_create_video');
378377

379378
this._videoRequestComplete = true;
380379
},
@@ -559,10 +558,10 @@ define([
559558
*/
560559
_uploadImage: function (file, oldFile, callback) {
561560
var url = this.options.saveVideoUrl,
562-
data = {
563-
files: file,
564-
url: url
565-
};
561+
data = {
562+
files: file,
563+
url: url
564+
};
566565

567566
this._blockActionButtons(true, true);
568567
this._uploadFile(data, $.proxy(function (result) {
@@ -601,7 +600,7 @@ define([
601600
$.each(this.element.find(this._videoFormSelector).serializeArray(), function (i, field) {
602601
data[field.name] = field.value;
603602
});
604-
data.disabled = this.element.find(this._videoDisableinputSelector).attr('checked') ? 1 : 0;
603+
data.disabled = this.element.find(this._videoDisableinputSelector).prop('checked') ? 1 : 0;
605604
data['media_type'] = 'external-video';
606605
data.oldFile = oldFile;
607606

@@ -682,26 +681,26 @@ define([
682681
modalClass: 'mage-new-video-dialog form-inline',
683682
title: $.mage.__('New Video'),
684683
buttons: [
685-
{
686-
text: $.mage.__('Save'),
687-
class: 'action-primary video-create-button',
688-
click: $.proxy(widget._onCreate, widget)
689-
},
690-
{
691-
text: $.mage.__('Cancel'),
692-
class: 'video-cancel-button',
693-
click: $.proxy(widget._onCancel, widget)
694-
},
695-
{
696-
text: $.mage.__('Delete'),
697-
class: 'video-delete-button',
698-
click: $.proxy(widget._onDelete, widget)
699-
},
700-
{
701-
text: $.mage.__('Save'),
702-
class: 'action-primary video-edit',
703-
click: $.proxy(widget._onUpdate, widget)
704-
}
684+
{
685+
text: $.mage.__('Save'),
686+
class: 'action-primary video-create-button',
687+
click: $.proxy(widget._onCreate, widget)
688+
},
689+
{
690+
text: $.mage.__('Cancel'),
691+
class: 'video-cancel-button',
692+
click: $.proxy(widget._onCancel, widget)
693+
},
694+
{
695+
text: $.mage.__('Delete'),
696+
class: 'video-delete-button',
697+
click: $.proxy(widget._onDelete, widget)
698+
},
699+
{
700+
text: $.mage.__('Save'),
701+
class: 'action-primary video-edit',
702+
click: $.proxy(widget._onUpdate, widget)
703+
}
705704
],
706705

707706
/**
@@ -858,7 +857,8 @@ define([
858857
}
859858

860859
nvs.removeClass(reqClass);
861-
}, this
860+
},
861+
this
862862
));
863863
},
864864

@@ -895,10 +895,11 @@ define([
895895
imageData[fieldName] = _field.val();
896896
}
897897
}.bind(this));
898-
flagChecked = this.element.find(this._videoDisableinputSelector).attr('checked') ? 1 : 0;
898+
flagChecked = this.element.find(this._videoDisableinputSelector).prop('checked') ? 1 : 0;
899899
this._gallery.find('input[name*="' + itemId + '][disabled]"]').val(flagChecked);
900900
this._gallery.find(_inputSelector).siblings('.image-fade').css(
901-
'visibility', flagChecked ? 'visible' : 'hidden'
901+
'visibility',
902+
flagChecked ? 'visible' : 'hidden'
902903
);
903904
imageData.disabled = flagChecked;
904905

@@ -929,7 +930,8 @@ define([
929930
this._replaceImage(imageData.file, imageData.file, imageData);
930931
callback(0, imageData);
931932
}
932-
}, this
933+
},
934+
this
933935
));
934936
},
935937

@@ -1107,8 +1109,8 @@ define([
11071109
newVideoForm = this.element.find(this._videoFormSelector);
11081110

11091111
$(newVideoForm).find('input[type="hidden"][name!="form_key"]').val('');
1110-
this._gallery.find('input[name*="' + this.element.find(
1111-
this._itemIdSelector).val() + '"]'
1112+
this._gallery.find(
1113+
'input[name*="' + this.element.find(this._itemIdSelector).val() + '"]'
11121114
).parent().removeClass('active');
11131115

11141116
try {
@@ -1152,7 +1154,7 @@ define([
11521154
self._videoFormSelector + ' input[value="' + imageType + '"]'
11531155
);
11541156

1155-
self._changeRole(imageType, imageCheckbox.attr('checked'), imageData);
1157+
self._changeRole(imageType, imageCheckbox.prop('checked'), imageData);
11561158
});
11571159
}
11581160
},
@@ -1265,7 +1267,7 @@ define([
12651267
});
12661268

12671269
flagChecked = container.find('input[name*="disabled"]').val() > 0;
1268-
self._gallery.find(self._videoDisableinputSelector).attr('checked', flagChecked);
1270+
self._gallery.find(self._videoDisableinputSelector).prop('checked', flagChecked);
12691271

12701272
file = self._gallery.find('#file_name').val(container.find('input[name*="file"]').val());
12711273

0 commit comments

Comments
 (0)