EUCOOKIELAW_BANNER_TITLE

Community Home
Giovedì Aprile 25, 2024
Registrati

Ricerca avanzata

'; var comma = ''; if(joms.jQuery('#key-list').val()!="") { var comma = ','; } joms.jQuery('#key-list').val(joms.jQuery('#key-list').val()+comma+keynum); joms.jQuery('#criteriaContainer').append(criteria); jsAdvanceSearch.action.changeField(keynum); jsAdvanceSearch.action.keynum++; }, removeCriteria: function ( id ) { var inputs = []; var _id, _id2; _id = joms.jQuery('#key-list').val(); _id2 = _id.split(','); joms.jQuery(_id2).each(function() { if ( this != id && this != "") { // re-populate inputs.push(this); } }); joms.jQuery("#criteria"+id).remove(); joms.jQuery('#key-list').val(inputs.join(',')); }, getFieldType: function ( fieldcode ) { var type; switch(fieldcode) { case "FIELD_GENDER": type = "gender"; break; case "FIELD_BIRTHDATE": type = "birthdate"; break; case "LUOGO_DI_NASCITA": type = "text"; break; case "CODICE_FISCALE": type = "text"; break; case "FIELD_COUNTRY": type = "country"; break; case "FIELD_STATE": type = "text"; break; case "FIELD_CITY": type = "text"; break; case "CAP": type = "text"; break; case "FIELD_ADDRESS": type = "text"; break; case "FIELD_LANDPHONE": type = "text"; break; case "EMAIL": type = "email"; break; case "FIELD_WEBSITE": type = "url"; break; case "RAGIONE_SOCIALE": type = "text"; break; case "PARTITA_IVA": type = "text"; break; case "CF_AZIENDA": type = "text"; break; case "SETTORE_AZIENDA": type = "list"; break; case "DESCRIZIONE_AZIENDA": type = "textarea"; break; case "REF_NOME_COGNOME": type = "text"; break; case "REF_RUOLO": type = "text"; break; case "REF_TELEFONO": type = "text"; break; case "REF_EMAIL": type = "text"; break; case "EX_QRCODE": type = "text"; break; case "username": type = "text"; break; case "useremail": type = "email"; break; default : type = "default"; } return type; }, getListValue: function ( id, fieldcode ) { var list; switch(fieldcode) { case "FIELD_GENDER": list = ''; break; case "FIELD_COUNTRY": list = ''; break; case "SETTORE_AZIENDA": list = ''; break; default : list = ''; } return list; }, changeField: function ( id ) { var value, type, condHTML, listValue; var cond = []; var conditions = new Array(); conditions['contain'] = "Contiene"; conditions['between'] = "Tra"; conditions['equal'] = "Uguale a"; conditions['notequal'] = "Non uguale a"; conditions['lessthanorequal'] = "Più piccolo di o uguale"; conditions['greaterthanorequal'] = "Più grande di o uguale a"; value = joms.jQuery('#field'+id).val(); type = jsAdvanceSearch.action.getFieldType(value); this.changeFieldType(type, id); switch(type) { case 'date' : cond = ['between', 'equal', 'notequal', 'lessthanorequal', 'greaterthanorequal']; listValue = 0; break; case 'time' : cond = ['equal', 'notequal']; listValue = 0; break; case 'birthdate': cond = ['between', 'equal', 'lessthanorequal', 'greaterthanorequal']; listValue = 0; break; case 'checkbox' : case 'radio' : case 'singleselect' : case 'select' : case 'list' : case 'country' : case 'gender' : cond = ['equal', 'notequal']; listValue = this.getListValue(id, value); break; case 'email' : case 'time' : cond = ['equal']; listValue = 0; break; case 'textarea' : case 'text' : default : if(value == 'useremail') { cond = ['equal']; } else { cond = ['contain', 'equal', 'notequal']; } listValue = 0; break; } condHTML = ''; joms.jQuery('#selectcondition'+id).html(condHTML); jsAdvanceSearch.action.changeCondition(id); jsAdvanceSearch.action.calendar(type, id); if(listValue!=0){ joms.jQuery('#valueinput'+id).html(listValue); } }, addAltInputField: function(type, id) { var cond = joms.jQuery( '#condition' + id ).val(), inputField; if ( cond === 'between' ) { if ( type === 'birthdate' || type === 'date' ) { inputField = ''; } else if ( type === 'time' ) { inputField = this.getTimeField( 'value' + id + '_2' ); } else { inputField = ''; } } else { inputField = ''; } joms.jQuery('#valueinput'+id+'_2').html(inputField); if ( cond === 'between' ) { if ( type === 'birthdate' || type === 'date' ) { var opts = joms.jQuery('#field'+ id); var opt = joms.jQuery(opts[0].options[ opts[0].options.selectedIndex ]); var date_format = opt.data('dateformat'); joms.jQuery( '#value' + id + '_2' ).pickadate( joms.jQuery.extend({}, joms_tmp_pickadateOpts, { selectYears: 200, selectMonths: true }, { format: date_format ? date_format : joms_tmp_pickadateOpts.format }) ); } } }, getTimeField: function( name ) { var html = '', label, i; // Hours. html += ' : '; // Minutes. html += ' : '; // Seconds. html += ''; return html; }, calendar: function(type, id) { var inputField = ''; if ( type === 'birthdate' || type === 'date' ) { inputField += ' Data ' inputField += ''; } else if ( type === 'time' ) { inputField += this.getTimeField( 'value' + id ); } else { inputField += ''; } joms.jQuery('#valueinput'+id).html(inputField); if ( type === 'birthdate' || type === 'date' ) { var opts = joms.jQuery('#field'+ id); var opt = joms.jQuery(opts[0].options[ opts[0].options.selectedIndex ]); var date_format = opt.data('dateformat'); joms.jQuery( '#value' + id ).pickadate( joms.jQuery.extend({}, joms_tmp_pickadateOpts, { selectYears: 200, selectMonths: true }, { format: date_format ? date_format : joms_tmp_pickadateOpts.format }) ); } }, changeFieldType: function(type, id) { joms.jQuery('#fieldType'+id).val(type); }, changeCondition: function(id) { var type = joms.jQuery('#fieldType'+id).val(); this.addAltInputField(type, id); }, toggleAgeSearch: function(id,mode) { var cond = joms.jQuery('#condition'+id).val(); if(mode == 1){ inputField = ' Periodo'; joms.jQuery('#valueinput'+id).html(inputField); if(cond == "between"){ inputField = ''; joms.jQuery('#valueinput'+id+'_2').html(inputField); } } else { jsAdvanceSearch.action.calendar('birthdate',id); jsAdvanceSearch.action.addAltInputField('birthdate',id); } } } }; window.joms_queue || (joms_queue = []); joms_queue.push(function() { joms.jQuery(document).ready( function() { var searchHistory, operator; searchHistory = eval([]); joms.jQuery('#memberlist-save').click( function(){ joms.memberlist.showSaveForm('' , searchHistory ); }); if(searchHistory != ''){ var keylist = searchHistory['key-list'].split(','); var num; joms.jQuery(keylist).each(function(){ num = jsAdvanceSearch.action.keynum; jsAdvanceSearch.action.addCriteria(); joms.jQuery('#field'+num).val(searchHistory['field'+this]); jsAdvanceSearch.action.changeField(num); joms.jQuery('#condition'+num).val(searchHistory['condition'+this]); jsAdvanceSearch.action.changeCondition(num); if(searchHistory['fieldType'+num] == "birthdate" && searchHistory['datingsearch_agefrom'] && searchHistory['datingsearch_ageto'] ) { jsAdvanceSearch.action.toggleAgeSearch(num,1); }else if( searchHistory['condition'+this] == 'between' && searchHistory['fieldType'+num] == "birthdate" && ( joms.jQuery.isNumeric(searchHistory['value'+this]) || joms.jQuery.isNumeric(searchHistory['value'+this+'_2']) )){ jsAdvanceSearch.action.toggleAgeSearch(num,1); } if(searchHistory['fieldType'+this] == 'checkbox') { var myVal = searchHistory['value'+this]; if(joms.jQuery.isArray(myVal)) { joms.jQuery.each(myVal, function(i, chkVal) { joms.jQuery('input[name="value'+num+'[]"]').each(function() { if(this.value == chkVal) { this.checked = "checked"; } }); }); } } else if(searchHistory['fieldType'+num] == "time") { joms.jQuery('select[name="value'+num+'[]"]').each(function( i ) { this.value = searchHistory['value'+num][i]; }); }else { joms.jQuery('#value'+num).val(searchHistory['value'+this]); } if(searchHistory['condition'+this] == 'between'){ joms.jQuery('#value'+num+'_2').val(searchHistory['value'+this+'_2']); } }) if(searchHistory.operator == 'and'){ operator = 'operator_all'; }else{ operator = 'operator_any'; } }else{ operator = 'operator_all'; jsAdvanceSearch.action.addCriteria(); } joms.jQuery('#'+operator).attr("checked", true); }); });
GEDI.jpg
GEDI.jpg
logo-macnil.png
logo-macnil.png
logo_safety_expert.png
logo_safety_expert.png
gielle_icona.jpg
gielle_icona.jpg