Revision 2015b4b3
Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt
js/requirement_spec.js | ||
---|---|---|
178 | 178 |
return true; |
179 | 179 |
}; |
180 | 180 |
|
181 |
ns.text_block_input_key_down = function(event) { |
|
182 |
if(event.keyCode == 13) { |
|
183 |
event.preventDefault(); |
|
184 |
var prefix = $(this).attr('id').match("^edit_function_block_\\d+")[0]; |
|
185 |
$("#" + prefix + "_submit").click(); |
|
186 |
return false; |
|
187 |
} |
|
188 |
}; |
|
189 |
|
|
190 | 181 |
ns.find_text_block_picture_id = function(clicked_elt) { |
191 | 182 |
var id = $(clicked_elt).attr('id'); |
192 | 183 |
var match = id.match(/^text-block-picture-(\d+)$/); |
... | ... | |
350 | 341 |
return ns.handle_item_popup_menu_markings(opt, false); |
351 | 342 |
}; |
352 | 343 |
|
344 |
ns.submit_function_block = function(event) { |
|
345 |
event.preventDefault(); |
|
346 |
|
|
347 |
var prefix = $(this).attr('id').match("^(?:edit|new)_function_block_[\\d_]+\\d")[0]; |
|
348 |
kivi.submit_ajax_form('controller.pl?action=RequirementSpecItem/ajax_update', '#' + prefix + '_form'); |
|
349 |
|
|
350 |
return false; |
|
351 |
}; |
|
352 |
|
|
353 |
ns.init_function_block_keypress_events = function(form_id) { |
|
354 |
$("#" + form_id + " INPUT[type=text]").bind("keypress", "return", ns.submit_function_block); |
|
355 |
}; |
|
356 |
|
|
353 | 357 |
// ------------------------------------------------------------------------- |
354 | 358 |
// ------------------------------- templates ------------------------------- |
355 | 359 |
// ------------------------------------------------------------------------- |
Auch abrufbar als: Unified diff
Pflichtenheftitems: RETURN in Zeitschätzungs-Input via AJAX submitten gefixt