Join the Patron Team

If you want to help get this game to release, have access to insider information, or get into early testing groups,  join our Patron Team!

Patron Team Rewards

Want some more info about just what you can get for donating? Come check out our rewards page!

Advanced search

'; 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_FIRSTNAME": type = "text"; break; case "FIELD_LASTNAME": type = "text"; break; case "FIELD_GENDER": type = "select"; break; case "FIELD_BIRTHDATE": type = "birthdate"; break; case "FIELD_ABOUTME": type = "textarea"; break; case "FIELD_MOBILE": type = "text"; break; case "FIELD_LANDPHONE": type = "text"; break; case "FIELD_ADDRESS": type = "textarea"; break; case "FIELD_STATE": type = "text"; break; case "FIELD_CITY": type = "text"; break; case "FIELD_COUNTRY": type = "country"; break; case "FIELD_WEBSITE": type = "url"; break; case "FIELD_EMAIL": type = "email"; break; case "FIELD_COLLEGE": type = "text"; break; case "FIELD_GRADUATION": 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; default : list = ''; } return list; }, changeField: function ( id ) { var value, type, condHTML, listValue; var cond = []; var conditions = new Array(); conditions['contain'] = "Contains"; conditions['between'] = "Between"; conditions['equal'] = "Equal"; conditions['notequal'] = "Not equal"; conditions['lessthanorequal'] = "Less than or equal to"; conditions['greaterthanorequal'] = "Greater than or equal to"; 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 'location': cond = ['contain']; 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; } if (value === 'FIELD_RADIUS_SEARCH') { condHTML = ''; listValue = this.getListValue(id, 'FIELD_RADIUS_SEARCH'); } else { 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 = ''; } inputField = ' and ' + 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 display = +opt.data('display'); var date_format = opt.data('dateformat'); var min = opt.data('minrange'); var max = opt.data('maxrange'); var display = opt.data('display'); if ( display ) { 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, min: min ? min.split('-') : undefined, max: max ? max.split('-') : undefined }) ); } } } }, 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' ) { var opts = joms.jQuery('#field'+ id); var opt = joms.jQuery(opts[0].options[ opts[0].options.selectedIndex ]); var display = +opt.data('display'); var date_format = opt.data('dateformat'); } if ( type === 'birthdate' || type === 'date' ) { 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 display = +opt.data('display'); var date_format = opt.data('dateformat'); var min = opt.data('minrange'); var max = opt.data('maxrange'); if ( display ) { joms.jQuery( '#value' + id ).pickadate( joms.jQuery.extend({}, joms_tmp_pickadateOpts, { selectYears: 200, selectMonths: true }, { format: date_format ? date_format : joms_tmp_pickadateOpts.format, min: min ? min.split('-') : undefined, max: max ? max.split('-') : undefined }) ); } } }, 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 = ''; joms.jQuery('#valueinput'+id).html(inputField); if(cond == "between"){ inputField = ' and '; 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); }); });