Skip to content
Permalink
Browse files

Merge pull request #2671 from roadster31/pse-change-js-event

A 'change.pse' event is triggered on PSE value change
  • Loading branch information...
roadster31 committed May 20, 2019
2 parents 1d376af + 0e21d24 commit a65fc16eacd48444b5db52b81bb30c9c40c44a96
Showing with 3 additions and 2 deletions.
  1. +3 −2 templates/frontOffice/default/assets/src/js/thelia.js
@@ -122,7 +122,7 @@ var pseManager = (function($){
if (undefined !== pse) {
if ($pse.useFallback) {
$pse.fallbak.val(pse.id);
} else if (undefined !== pse) {
} else {
for (var i = 0; i < pse.combinations.length; i++) {
combinationValueId = pse.combinations[i];
$pse['options'][PSE_COMBINATIONS_VALUE[combinationValueId][1]].val(pse.combinations[i]) // jshint ignore:line
@@ -154,7 +154,8 @@ var pseManager = (function($){
}
}

$pse.id.val(pseId);
// Trigger a change event to give the modules a change to detect PSE ID change.
$pse.id.val(pseId).trigger('change.pse', pseId);
$pse.pseId = pseId;
}

0 comments on commit a65fc16

Please sign in to comment.
You can’t perform that action at this time.