FSN#39638 Bulk bewerken via scaffolding

svn path=/Website/trunk/; revision=32972
This commit is contained in:
Jos Groot Lipman
2017-02-27 15:14:07 +00:00
parent 34f2b5c0cb
commit 789d1a950c

View File

@@ -271,15 +271,19 @@ function scaffolding_edit(model, scf_params)
<% if (multi) {
// Overal een vinkje voorzetten
%>
$("input[type=text],input[type=checkbox],select").each(function() {
$("input[type=text],input[type=checkbox],input[type=number],select").each(function() {
var cb_name = "scf_multi_" + $(this).attr("name");
var cb = $("<input type='checkbox'>").attr("name", cb_name);
var td = $("<td class='multi_cb'></td>").append(cb);
$(this).closest("tr").find("td.label").before(td);
// Zetten vinkje als je waarde invult
$(this).blur(function () {
$("input[type=checkbox][name=" + cb_name + "]").prop("checked", $(this).val())
$(this).change(function () {
if ($(this).is(":checkbox"))
var isgevuld = $(this).is(":checked")
else
isgevuld = $(this).val();
$("input[type=checkbox][name=" + cb_name + "]").prop("checked", isgevuld);
});
// Wissen waarde als je vinkje weghaalt
cb.change(function (deze) {