API2: model.search.filters ipv. kijken naar field.filter. Die laatst is voortaan alleen nog optioneel voor overrule filtertype

svn path=/Website/trunk/; revision=24483
This commit is contained in:
Jos Groot Lipman
2015-03-17 13:53:48 +00:00
parent 0af5c1f8cc
commit ac15342eb5
9 changed files with 33 additions and 14 deletions

View File

@@ -38,7 +38,9 @@ function model_reportsx(usrrap_key, params)
"autorefresh" : { dbs: "fac_usrrap_autorefresh", typ: "check", label: L("lcl_usrrap_autorefresh")}
};
this.list = { columns: ["id", "name", "description"] };
this.search = { autosearch: true };
this.search = { autosearch: true,
filters: ["id", "name", "description"]
};
this.includes = {"columns": { model: model_reportcolumns,
joinfield: "fac_usrrap_key"
@@ -94,7 +96,7 @@ function model_reportsx(usrrap_key, params)
var sql = "SELECT " + query.selects.join(", ")
+ " FROM " + query.tables.join(", ")
+ (query.wheres.length ? " WHERE " + query.wheres.join(" AND " ) : "")
+ " ORDER BY fac_usrrap_key";
+ " ORDER BY 2";
if (params.include && params.include.length)
sql += ", fac_usrrap_cols_volgnr";