|
24 | 24 | var ctx = inputCtrl.closest('.update-container');
|
25 | 25 | var isTouchSpin = inputCtrl.parent(".bootstrap-touchspin").length > 0;
|
26 | 26 | var isFileUpload = inputCtrl.data("fileupload");
|
| 27 | + var isDateTime = inputCtrl.hasClass("date-part"); |
27 | 28 |
|
28 | 29 | if (ctx.length === 0) {
|
29 | 30 | // It's an associated or bundled item.
|
|
33 | 34 | ctx.doAjax({
|
34 | 35 | data: ctx.find(':input').serialize(),
|
35 | 36 | callbackSuccess: function (response) {
|
36 |
| - self.updateDetailData(response, ctx, isTouchSpin, isFileUpload); |
| 37 | + self.updateDetailData(response, ctx, isTouchSpin, isFileUpload, isDateTime); |
37 | 38 |
|
38 | 39 | if (ctx.hasClass('pd-bundle-item')) {
|
39 | 40 | // Update bundle price too.
|
40 | 41 | $('#main-update-container').doAjax({
|
41 | 42 | data: $('.pd-bundle-items').find(':input').serialize(),
|
42 | 43 | callbackSuccess: function (response2) {
|
43 |
| - self.updateDetailData(response2, $('#main-update-container'), isTouchSpin, isFileUpload); |
| 44 | + self.updateDetailData(response2, $('#main-update-container'), isTouchSpin, isFileUpload, isDateTime); |
44 | 45 | }
|
45 | 46 | });
|
46 | 47 | }
|
|
51 | 52 | return this;
|
52 | 53 | };
|
53 | 54 |
|
54 |
| - this.updateDetailData = function (data, ctx, isTouchSpin, isFileUpload) { |
| 55 | + this.updateDetailData = function (data, ctx, isTouchSpin, isFileUpload, isDateTime) { |
55 | 56 | var gallery = $('#pd-gallery').data(galPluginName);
|
56 | 57 |
|
57 | 58 | // Image gallery needs special treatment
|
|
73 | 74 | // Iterate all elems with [data-partial] attribute...
|
74 | 75 | var $el = $(el);
|
75 | 76 | var partial = $el.data('partial');
|
76 |
| - if (partial && !(isTouchSpin && partial === 'OfferActions')) { |
| 77 | + |
| 78 | + if (partial && !(isTouchSpin && partial === 'OfferActions') && !(isDateTime && partial === 'Variants')) { |
77 | 79 | // ...fetch the updated html from the corresponding AJAX result object's properties
|
78 | 80 | if (data.Partials && data.Partials.hasOwnProperty(partial)) {
|
79 | 81 | if (partial === 'Variants') {
|
|
0 commit comments