CC-4362: Smart Block: error for multiple criteria
-fixed
This commit is contained in:
parent
9e7e9639ae
commit
5ac6877e60
1 changed files with 14 additions and 0 deletions
|
@ -204,6 +204,20 @@ function setSmartBlockEvents() {
|
||||||
/********** CRITERIA CHANGE **********/
|
/********** CRITERIA CHANGE **********/
|
||||||
form.find('select[id^="sp_criteria"]:not([id^="sp_criteria_modifier"])').live("change", function(){
|
form.find('select[id^="sp_criteria"]:not([id^="sp_criteria_modifier"])').live("change", function(){
|
||||||
var index = getRowIndex($(this).parent());
|
var index = getRowIndex($(this).parent());
|
||||||
|
//need to change the criteria value for any modifier rows
|
||||||
|
var critVal = $(this).val();
|
||||||
|
var divs = $(this).parent().nextAll(':visible');
|
||||||
|
$.each(divs, function(i, div){
|
||||||
|
var critSelect = $(div).children('select[id^="sp_criteria_field"]');
|
||||||
|
if (critSelect.hasClass('sp-invisible')) {
|
||||||
|
critSelect.val(critVal);
|
||||||
|
/* If the select box is visible we know the modifier rows
|
||||||
|
* have ended
|
||||||
|
*/
|
||||||
|
} else {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|
||||||
// disable extra field and hide the span
|
// disable extra field and hide the span
|
||||||
disableAndHideExtraField($(this), index);
|
disableAndHideExtraField($(this), index);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue