svn path=/Website/trunk/; revision=26052
This commit is contained in:
Jos Groot Lipman
2015-08-24 12:34:19 +00:00
parent e24ff9945a
commit 224c243b4b
2 changed files with 20 additions and 3 deletions

View File

@@ -14,6 +14,8 @@
<%
function scaffolding_edit(model, scf_params)
{
scf_params.edit = scf_params.edit || {};
FCLTHeader.Requires({ plugins: ["jQuery"],
js: ["jquery-ui.js", "jquery.timepicker-table.js"],
css: ["timePicker-table.css"]})
@@ -151,8 +153,18 @@ function scaffolding_edit(model, scf_params)
<div id='hinttitle'></div>
</div>
<%
var buttons = [ {title: L("lcl_submit"), action:"scf_submit()", icon: "opslaan.png", singlepress: true },
{title: L("lcl_cancel"), action:"scf_cancel()", icon: "undo.png" }];
var buttons = [ ];
if (scf_params.edit.buttons)
{
for (var i = 0; i < scf_params.edit.buttons.length; i++)
{ // Als je een action opgeeft *zonder* haakjes voegen we automagisch de key en model toe
if (scf_params.edit.buttons[i].action.indexOf("(") < 0)
scf_params.edit.buttons[i].action += "(" + key + ", '" + model.table + "')"
buttons.push(scf_params.edit.buttons[i]);
}
}
buttons.push({title: L("lcl_submit"), action:"scf_submit()", icon: "opslaan.png", singlepress: true });
buttons.push({title: L("lcl_cancel"), action:"scf_cancel()", icon: "undo.png" });
if (model.hashints)
buttons.splice(0, 0, {title: L("lcl_hint"), action:"scf_enablehint()", icon: "lightbulb.png" });
if (!modal)