FSN#31698 Rapportgenerator scaffolding aanscherping
svn path=/Website/trunk/; revision=24455
This commit is contained in:
@@ -33,6 +33,7 @@ model_reportcolumns =
|
||||
"caption" : { dbs: "fac_usrrap_cols_caption", typ: "varchar", label: L("lcl_rap_caption"), translate: true},
|
||||
"filter" : { dbs: "fac_usrrap_cols_filter", typ: "varchar", label: L("lcl_rap_filter"),
|
||||
LOV: L("lcl_rap_filterLOV") }, // "A;Automatisch"
|
||||
"filterdefault": { dbs: "fac_usrrap_cols_filterdefault", typ: "varchar", label: L("lcl_rap_filterdefault")},
|
||||
"visible" : { dbs: "fac_usrrap_cols_visible", typ: "varchar", label: L("lcl_rap_visible"),
|
||||
required: true,
|
||||
LOV: L("lcl_rap_visibleLOV")}, // "V;Visible;I;Invisible;H;hidden"
|
||||
|
||||
@@ -260,7 +260,7 @@ function model_reports(fac_usrrap_key)
|
||||
};
|
||||
if (field.typ == "number" && field.dbs.match(/_key$/i)) // Vooral de FCLT_3D filters
|
||||
field.typ = "key";
|
||||
if (field.visible == 'H')
|
||||
if (field.visible == 'H' && field.dbs != keyfield) // Keyfield willen we eigenlijk altijd wel indien mogelijk
|
||||
field.hidden = true;
|
||||
|
||||
if (usrrap.columns[i].filter)
|
||||
|
||||
@@ -37,7 +37,7 @@ function model_reportsx(usrrap_key, params)
|
||||
"urllink" : { dbs: "fac_usrrap_urllink", typ: "varchar", label: L("lcl_usrrap_urllink")},
|
||||
"autorefresh" : { dbs: "fac_usrrap_autorefresh", typ: "check", label: L("lcl_usrrap_autorefresh")}
|
||||
};
|
||||
this.list = { columns: ["id", "name", "viewname", "description"] };
|
||||
this.list = { columns: ["id", "name", "description"] };
|
||||
this.search = { autosearch: true };
|
||||
|
||||
this.includes = {"columns": { model: model_reportcolumns,
|
||||
|
||||
@@ -51,23 +51,12 @@ function scaffolding_m_list(model, scf_params)
|
||||
else
|
||||
default_url = scf_params.this_path + "?mode=wrap" + transit + "&id=";
|
||||
}
|
||||
|
||||
if (default_url && default_url.indexOf("{0}") == -1)
|
||||
default_url += "{0}";
|
||||
%>
|
||||
<html>
|
||||
<head>
|
||||
<% FCLTMHeader.Generate({ outputmode: outputmode }); %>
|
||||
<script>
|
||||
function scf_show(row)
|
||||
{
|
||||
var key = row.getAttribute("ROWKEY");
|
||||
<% if (modal) { %>
|
||||
FcltMgr.openModalDetail("<%= default_url %>" + key, "<%=safe.jsstring(model.record_name)%>", { callback: FcltMgr.reload });
|
||||
<% } else { %>
|
||||
$(row).addClass('dirty');
|
||||
FcltMgr.openDetail("<%= default_url %>" + key, "<%=safe.jsstring(model.record_name)%>");
|
||||
<% } %>
|
||||
}
|
||||
</script>
|
||||
</head>
|
||||
<body id="listbody">
|
||||
<%
|
||||
@@ -119,7 +108,7 @@ function scaffolding_m_list(model, scf_params)
|
||||
|
||||
function fncolLink(oRs, processParams)
|
||||
{
|
||||
return default_url + oRs.Fields("id").Value;
|
||||
return rooturl + "/" + default_url.format(oRs.Fields("id").Value);
|
||||
};
|
||||
|
||||
var rst = new ResultsetTable({ dataset: xxx_array,
|
||||
|
||||
@@ -148,7 +148,7 @@ function scaffolding_search(model, scf_params)
|
||||
var on = inArray(fld, scf_params.list.columns);
|
||||
Response.Write("<tr id='" + fld + "'><td><label><input type='checkbox'" + (on?" checked='1'":"") + ">"
|
||||
+ safe.html(field.label || ("<"+field.dbs+">")) + "</label></td>");
|
||||
if (model.list && model.list.canGroup && field.typ != "varchar")
|
||||
if (model.list && model.list.canGroup && field.typ != "varchar" && !field.dbs.match(/_key$/i))
|
||||
{
|
||||
if (field.typ == "date" || field.typ == "datetime")
|
||||
grp = api2.filterLOV(L("lcl_rap_groupbyLOV"), "G,D,W,M,Y,H");
|
||||
@@ -162,8 +162,9 @@ function scaffolding_search(model, scf_params)
|
||||
}
|
||||
Response.Write("</tr>")
|
||||
}
|
||||
Response.Write("<tr id='scf_count'><td><label><input type='checkbox'>"
|
||||
+ L("lcl_count") + "</label></td></tr>");
|
||||
if (model.list.canGroup)
|
||||
Response.Write("<tr id='scf_count'><td><label><input type='checkbox'>"
|
||||
+ L("lcl_count") + "</label></td></tr>");
|
||||
%>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
Reference in New Issue
Block a user