function SearchLookup(entityname,fieldtoupdate){ document.getElementById('lkSelectedField').value = fieldtoupdate; document.getElementById('lkSelectedEntity').value = entityname; lookupModal = $(document.getElementById('modallookup')).dialog({modal:true,title: 'Select record',width:700}); } function SetStatusText(goodOrBad,message){ if (goodOrBad){ $('#StatusText').attr('class','msg_good'); var t=setTimeout("$('#StatusText').css('display','none')",2000); }else{ $('#StatusText').attr('class','msg_bad'); var t=setTimeout("$('#StatusText').css('display','none')",10000); } $('#StatusText').html(message); $('#StatusText').css('display','block'); } function ModalDialog(url){ $.ajax({ url: url, cache: false, success: function(data){ $(data).dialog({modal:true}); } }); } function GetSearchField(data,e,fieldName){ var r = null; $(data).find('entity[name='+e+']').find('field[name='+fieldName+']').each(function(){ var t = this.getAttribute('type'); switch (t){ case 'multiline': case 'singleline': case 'integer': var v = (lastSearch[fieldName] !== undefined) ? lastSearch[fieldName] : ''; r= ''; break; case 'date': r= '
Between
and
'; break; case 'boolean': r= ''; break; case 'lookup': var o = GetLookUpValues(e,fieldName); r=''; break; } }); if (r == null){ alert('Bad searchable field type: '+fieldName); }else{ return r; } } function GetLookUpValues(e,f){ var o = null; $.ajax({url: "http://focrc.org/graves/lookup_values.php?e="+e+"&f="+f, async:false, cache: false,success: function(data){o = data;}}); return o; }