Project

General

Profile

« Previous | Next » 

Revision 31541882

Added by Serghei Mihai about 10 years ago

ajaxfom dialog function updated

View differences:

calebasse/actes/templates/actes/act_listing.html
11 11
            if ($(this).data('isbilled') == "False")
12 12
            {
13 13
                var id = $(this).data('id');
14
                generic_ajaxform_dialog($(this).data('id') + '/update', "Modifier l'acte",
15
                '#acte-dlg', '700px', 'Modifier', '.',
16
                function (dialog) {
17
                    var buttons = $(dialog).dialog('option', 'buttons');
18
                    buttons.push({
19
                        text: "Supprimer",
20
                        id: "delete-btn",
21
                        click: function () {
22
                            $(dialog).dialog('close');
23
                            generic_ajaxform_dialog(id + '/delete', "Supprimer l'acte",
24
                            '#acte-dlg', '500px', 'Oui', window.location.href);
14
                var delete_button = {
15
                    text: "Supprimer",
16
                    id: "delete-btn",
17
                    click: function () {
18
                        $(dialog).dialog('close');
19
                        generic_ajaxform_dialog(id + '/delete', "Supprimer l'acte",
20
                                                '#acte-dlg', '500px', 'Oui', window.location.href);
25 21

  
26
                        }
27
                    });
28
                    $(dialog).dialog('option', 'buttons', buttons);
29
                }
30
                );
22
                    }
23
                };
24
                generic_ajaxform_dialog($(this).data('id') + '/update', "Modifier l'acte",
25
                '#acte-dlg', '700px', 'Modifier', '.', function (dialog) {});
31 26
                } else if ($(this).data('oldbilled') == "True") {
32 27
                generic_ajaxform_dialog($(this).data('id') + '/rebill', "Refacturer cet acte de l'ancienne facturation) ?",
33 28
                '#acte-dlg', '700px', 'Refacturer', '.');

Also available in: Unified diff