'); } var ro_hidden_div = $('#'+ro_hidden_div_id); var clone_id = 'clone_'+radio_options[i].value; if (option_value_disabled) { var piodd_value = piodd_option_div.find('ul.dd-options input.dd-option-value[value='+radio_options[i].value+']'); if (piodd_value.length) { if ( !piodd_option_div.find('[clone_id='+clone_id+']').length ) { var ro_clone = piodd_value.parent().clone(true, true).appendTo(ro_hidden_div); ro_clone.clone().insertAfter(piodd_value.parent()).attr('clone_id', clone_id).fadeTo('fast', 0.2); piodd_value.parent().remove(); } } } else { if (ro_hidden_div.find('[value='+radio_options[i].value+']').length) { ro_hidden_div.find('[value='+radio_options[i].value+']').parent().clone(true, true).insertAfter(piodd_option_div.find('[clone_id='+clone_id+']')); ro_hidden_div.find('[value='+radio_options[i].value+']').parent().remove(); piodd_option_div.find('[clone_id='+clone_id+']').remove(); } } } // >> Product Image Option DropDown compatibility }, event_setSelectedCombination_withAccessControl_after : function(event) { ro_instance.common_fn.updateViewOfBlockOptions(); ro_instance.common_fn.updateViewOfJournalPushButtons(); }, event_controlAccessToValuesOfAllOptions_after : function(event) { ro_functions.stockControl(0); ro_functions.updateAvailabilityOfBlockAndJournalPushButtons(); }, // >> EVENT/TRIGGER FUNCTIONS // << CUSTOM FUNCTIONS custom_getQuantityInput : function() { if ( ro_instance.ro_theme_name == 'journal3' ) { return ro_instance.getElement('#product-quantity'); } }, custom_radioChangeClass : function() { if ( ro_instance.ro_theme_name == 'theme707' ) { return false; } return true; }, custom_radioToggle : function( $radio, option_value_disabled ) { if ( ro_instance.ro_theme_name == 'theme707' ) { $radio.parent().toggle(!option_value_disabled); if ( !option_value_disabled ) { $radio.parent().find('label').css('display', 'block'); } return true; } else if ( ro_instance.ro_theme_name == 'theme630' || ro_instance.ro_theme_name == 'theme638' ) { $radio.parent().toggle(!option_value_disabled); $radios = $(':radio[name="'+$radio.attr('name')+'"]'); // style change for padding change if ( $radios.length && $radios.index($radio) == 0) { if (option_value_disabled) { if ($radio.parent().hasClass('radio')) { $radio.parent().removeClass('radio'); $radio.parent().addClass('_radio_ro'); } } else { if ($radio.parent().hasClass('_radio_ro')) { $radio.parent().removeClass('_radio_ro'); $radio.parent().addClass('radio'); } } } return true; } else if ( ro_instance.ro_theme_name == 'shopme' && $radio.parent().hasClass('single-option') ) { $radio.parent().toggle(!option_value_disabled); return true; } else if ( ro_instance.ro_theme_name == 'sstore' || ro_instance.ro_theme_name == 'storeset' ) { // shop-store (compatible with buttons) if ($radio.attr('class') != 'none' ) { $radio.toggle(!option_value_disabled); } var $radio_div = $radio.closest('div.radio, div._radio_ro'); if ( $radio_div && $radio_div.find(':radio').length == 1 ) { $radio_div.toggle(!option_value_disabled); } var $radio_label = ro_instance.getOptionElement('label[for="'+$radio.attr('id')+'"]'); if ( !$radio_label.length ) { $radio_label = $radio.closest('label'); // images } $radio_label.toggle(!option_value_disabled); /* if (option_value_disabled) { $radio_label.removeClass('selected').addClass('not-selected'); } */ ro_instance.sstore_setOptionsStyles($radio); //ro_sstore_setOptionsStyles($radio); return true; } else if ( ro_instance.ro_theme_name == 'unishop' ) { $radio.parent().parent().toggle(!option_value_disabled); return true; } else if ( ro_instance.ro_theme_name == 'royal' && $radio.siblings('span.im_option') ) { $radio.parent().parent().toggle(!option_value_disabled); // button selector return true; } else if ( ro_instance.ro_theme_name == 'revolution' ) { $radio.parent().toggle(!option_value_disabled); // button selector return true; } else if ( ro_instance.ro_theme_name == 'BurnEngine_shoppica' ) { $radio.closest('.radio, ._radio_ro').toggle(!option_value_disabled); // button selector return true; } else if ( ro_instance.ro_theme_name == 'journal3' ) { $radio.closest('.radio, ._radio_ro').toggle(!option_value_disabled); // button selector return true; } else if ( ro_instance.ro_theme_name == 'anystore' ) { $radio.parent().toggle(!option_value_disabled); // button selector return true; } }, custom_radioEnableDisable : function( $radio, option_value_disabled ) { }, sstore_setOptionsStyles : function($radio){ var $radio_checked = $('input:radio[name="'+$radio.attr('name')+'"]:checked'); if ($radio.next().is('img') ) { // image var sstore_label_img = $radio.closest('label'); if (sstore_label_img.length) { sstore_label_img.closest('.radio').parent().find('label.selected-img').removeClass('selected-img').addClass('not-selected-img'); $radio_checked.closest('label.not-selected-img').removeClass('not-selected-img').addClass('selected-img'); } } else { // radio $radio.siblings('label.selected').removeClass('selected').addClass('not-selected'); $radio_checked.siblings('label[for="'+$radio_checked.attr('id')+'"].not-selected').removeClass('not-selected').addClass('selected'); } }, // >> CUSTOM FUNCTIONS }; return ro_functions; }