$(e).click(function(event) {
var $hidden, key, func, check;
if (data.disabled) return;
- if (data.confirm && !confirm(data.confirm)) return;
if (data.checks) {
for (var i=0; i < data.checks.length; i++) {
check = data.checks[i];
if (!func()) return;
}
}
+ if (data.confirm && !confirm(data.confirm)) return;
for (key in params) {
$hidden = $('<input type=hidden>')
$hidden.attr('name', key)
$(e).click(function(event) {
var func;
if (data.disabled) return;
- if (data.confirm && !confirm(data.confirm)) return;
if (data.checks) {
for (var i=0; i < data.checks.length; i++) {
check = data.checks[i];
if (!func()) return;
}
}
+ if (data.confirm && !confirm(data.confirm)) return;
func = kivi.get_function_by_name(data.function[0]);
func.apply(document, data.function.slice(1))
});