var ajaxUrl;
var moduleName;
var recordId;

function setAjaxUrl(url){
	ajaxUrl=url;
}

function setModuleName(mName){
	moduleName=mName;
}

function setRecord(rId){
	recordId=rId;
}

// afisez selectorul de arome si sterg link-ul
function editProductFlavor(productId){
    $('#edit-flavor-'+productId).hide();
    $('#select-flavor-'+productId).show();    
}

function selectProductFlavor(index){
    var flavor = $('#select-flavor-'+index).val();
    var url = ajaxUrl+'/ajax.php?mode=update_flavor&index='+index+'&flavor='+flavor;
    
    $.get(url, function(data){
        $('#edit-flavor-'+index).html(data);
        $('#edit-flavor-'+index).show();
        $('#select-flavor-'+index).hide();
        $('#flavor-hidden-'+index).val(flavor);
	});
          
}


 

