Revision 120225aa
Von Sven Schöling vor fast 8 Jahren hinzugefügt
js/kivi.Part.js | ||
---|---|---|
278 | 278 |
limit: 20, |
279 | 279 |
delay: 50, |
280 | 280 |
action: { |
281 |
on_enter_match_none: function(){ },
|
|
282 |
on_enter_match_one: function(){ $('#update_button').click(); },
|
|
283 |
on_enter_match_many: function(){ self.open_dialog(); }
|
|
281 |
commit_none: function(){ },
|
|
282 |
commit_one: function(){ $('#update_button').click(); },
|
|
283 |
commit_many: function(){ self.open_dialog(); }
|
|
284 | 284 |
} |
285 | 285 |
}, $real.data('part-picker-data'), options); |
286 | 286 |
this.$real = $real; |
... | ... | |
414 | 414 |
self.set_item({}); |
415 | 415 |
return true; |
416 | 416 |
} else if (self.state == self.STATES.PICKED) { |
417 |
if (self.o.action.on_enter_match_one) {
|
|
418 |
self.run_action(self.o.action.on_enter_match_one);
|
|
417 |
if (self.o.action.commit_one) {
|
|
418 |
self.run_action(self.o.action.commit_one);
|
|
419 | 419 |
} |
420 | 420 |
return true; |
421 | 421 |
} |
... | ... | |
425 | 425 |
} |
426 | 426 |
if (event.which == KEY.ENTER) { |
427 | 427 |
self.handle_changed_text({ |
428 |
match_one: self.o.action.on_enter_match_one,
|
|
429 |
match_many: self.o.action.on_enter_match_many
|
|
428 |
match_one: self.o.action.commit_one,
|
|
429 |
match_many: self.o.action.commit_many
|
|
430 | 430 |
}); |
431 | 431 |
return false; |
432 | 432 |
} |
Auch abrufbar als: Unified diff
kivi.Part.js: on_enter_match_* umbenannt in commit_*