Edit C:\Windows\install\galaxie_p02_26-09\common\list\list_criteria_search_js.jsp
<%@ page language="java" contentType="application/x-javascript" %> <fl:cacheControl/> function dbg_alert(msg) { alert(msg); } function criteriaKeyPress(event,gridName) { var key = event.which ? event.which :event.keyCode; // Someone pressed the enter key, AND we're not AC'ing if (key== 13) { // && acCurHighlightedDiv == null) { if (event.preventDefault) { event.preventDefault(); } if (event.stopPropagation) { event.stopPropagation(); } event.cancelBubble = true; event.returnValue = false; executeSearch(gridName,false); } } function getSearchCriteriaJavascript(gridObj,formName) { var gridName=gridObj.gridName; var f=document.forms[formName]; var params=new Object(); // get pagination if (f.$$nb) { var pageElement=f.$$nb; dbg_alert("page:"+pageElement.options[pageElement.selectedIndex].value); if (pageElement.selectedIndex >= 0 && pageElement.options[pageElement.selectedIndex].value != '') { dbg_alert("add $$nb"); params[gridName+'_$$nb']=pageElement.options[pageElement.selectedIndex].value; } } params[gridName+'_$$idx']=0; // force index to 0 //get preview if (f.$$preview) { params[gridName+'_$$preview']=f.$$preview.checked; } //get form field //dbg_alert($("#"+formName)+" f= "+f); $("#"+formName+" input").each(function(idx,elem) { var type=$(elem).attr("ed:type"); var name=$(elem).attr("name"); var fullname=$(elem).attr("ed:fullname"); var value=stripSpaces($(elem).val()); //dbg_alert("found: "+name+" = "+value+" | "+type); if (type=="string" || type=="fob") { dbg_alert("add string|fob "+fullname+"="+value+" to params"); params[fullname]=value; } else if (type=='foblbl') { params[name]=value; } else if (type=="date"||type=="int"||type=="decimal"||type=="time") { if (value!='') { dbg_alert("int|date|decimal name:"+name+" fullname:"+fullname+" value:"+value); params[name]=value; } } else if (type=="boolean"){ params[name]=$(elem).is(":checked"); } }); $("#"+formName+" select").each(function(idx,elem) { dbg_alert("found select"); var type=$(elem).attr("ed:type"); var name=$(elem).attr("name"); var fullname=$(elem).attr("ed:fullname"); var value=stripSpaces($(elem).val()); params[fullname]=value; }); return params; } function stripSpaces(strToStrip) { if(strToStrip!=null){ while (strToStrip.substring(0,1) == ' ') strToStrip = strToStrip.substring(1); while (strToStrip.substring(strToStrip.length-1,strToStrip.length) == ' ') strToStrip = strToStrip.substring(0,strToStrip.length-1); } return strToStrip; } function doCallSearch(jsGrid,formName) { var params=getSearchCriteriaJavascript(jsGrid,formName); //jsrid.render("PerName","B"); params["sc"]=""; params["$$idx"]=0; params["embedded_criteria"]=false; var paramStr=""; dbg_alert("params retourné "+params.length); for (idx in params) { paramStr+=idx+"="+params[idx]+"&"; params[idx]=encodeURIComponent(params[idx]); } params["sc"]=encodeURIComponent(paramStr+"d") jsGrid.callAjaxForHtml(null, params,false,false,null,false,null); } function executeSearch(gridName) { var gridObject=eval("_grid__" + gridName + "_js_"); dbg_alert("search for object:"+gridObject.getAjaxUrl()); var formName=gridName+"_search_criteria"; doCallSearch(gridObject,formName); return false; } function prepareEmbeddedCriteria(gridObject) { var formName=gridObject.gridName+"_search_criteria"; //Install the fob ac stuff dbg_alert("install fob ac on "+formName); $("#"+formName+" input").each( function(e) { dbg_alert(this.name); if ($(this).attr("ed:type")=="foblbl") { dbg_alert("add ac on "+this.name); installFobAC(this) } }); }
Ms-Dos/Windows
Unix
Write backup
jsp File Browser version 1.2 by
www.vonloesch.de