Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e2e7e282

Von Moritz Bunkus vor mehr als 10 Jahren hinzugefügt

  • ID e2e7e282c5c085a59e6ca334b0340f8dfa613417
  • Vorgänger 6bcd3c84
  • Nachfolger bca12079

Pflichtenheftitems: bei RETURN in Zeitabschätzung per AJAX abschicken

Unterschiede anzeigen:

SL/Controller/RequirementSpecItem.pm
258 258
    ->hide($content_top_id)
259 259
    ->remove("#${id_base}_form")
260 260
    ->insertAfter($html, $content_top_id)
261
    ->on("#${id_base}_form INPUT[type=text]", "keydown", "kivi.requirement_spec.text_block_input_key_down")
261 262
    ->jstree->select_node('#tree', '#fb-' . $self->item->id)
262 263
    ->focus("#${id_base}_description")
263 264
    ->val('#current_content_type', $self->item->item_type)
js/requirement_spec.js
174 174
  return true;
175 175
};
176 176

  
177
ns.text_block_input_key_down = function(event) {
178
  if(event.keyCode == 13) {
179
    event.preventDefault();
180
    var prefix = $(this).attr('id').match("^edit_function_block_\\d+")[0];
181
    $("#" + prefix + "_submit").click();
182
    return false;
183
  }
184
};
185

  
177 186
// --------------------------------------------------------------------------------
178 187
// ------------------------------ sections and items ------------------------------
179 188
// --------------------------------------------------------------------------------
templates/webpages/requirement_spec_item/_function_block_form.html
50 50
 </div>
51 51

  
52 52
 <p>
53
  [% L.ajax_submit_tag('controller.pl?action=RequirementSpecItem/ajax_' _ (SELF.item.id ? 'update' : 'create'), '#' _ id_base _ '_form', LxERP.t8('Save')) %]
53
  [% L.ajax_submit_tag('controller.pl?action=RequirementSpecItem/ajax_' _ (SELF.item.id ? 'update' : 'create'), '#' _ id_base _ '_form', LxERP.t8('Save'), id=id_base _ '_submit') %]
54 54
  <a href="#" onclick="kivi.requirement_spec.cancel_edit_item_form('[% id_base %]', { [% a_options %] })">[%- LxERP.t8("Cancel") %]</a>
55 55
 </p>
56 56
</form>

Auch abrufbar als: Unified diff