Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 10fe2228

Von Jan Büren vor etwa 3 Jahren hinzugefügt

  • ID 10fe22289afc69419e623b82a45df555e0c81ea6
  • Vorgänger 1e091879
  • Nachfolger a65dfe51

E-Mail-Dialog: Knopf E-Mail senden ausgrauen um mehrfaches Senden zu verhindern

Author:    Jan Büren <>

Unterschiede anzeigen:

js/kivi.Order.js
134 134
  };
135 135

  
136 136
  ns.send_email = function() {
137
    // push button only once -> slow response from mail server
138
    ns.email_dialog_disable_send();
139

  
137 140
    var data = $('#order_form').serializeArray();
138 141
    data = data.concat($('[name^="email_form."]').serializeArray());
139 142
    data = data.concat($('[name^="print_options."]').serializeArray());
......
465 468
    pp.o.multiple=1;
466 469
    pp.open_dialog();
467 470
  };
471
ns.email_dialog_disable_send = function() {
472
    // disable mail send event to prevent
473
    // impatient users to send multiple times
474
    $('#send_email').prop('disabled', true);
475
  };
468 476

  
469 477
  ns.add_multi_items = function(data) {
470 478
    var insert_before_item_id = ns.get_insert_before_item_id($('#multi_items_position').val());
templates/webpages/common/_send_email_dialog.html
110 110
<div id="email_form_print_options"></div>
111 111

  
112 112
<p>
113
 [% L.button_tag(email_form.js_send_function, LxERP.t8("Send email")) %]
113
 [% L.button_tag(email_form.js_send_function, LxERP.t8("Send email"), id='send_email') %]
114 114
 [% L.button_tag("\$('#send_email_dialog').dialog('close');", LxERP.t8("Abort")) %]
115 115
</p>

Auch abrufbar als: Unified diff