Projet

Général

Profil

0001-js-destroy-dialog-when-closed.patch

gadjo patch for close event - Benjamin Dauvergne, 14 août 2014 10:37

Télécharger (1,04 ko)

Voir les différences:

Subject: [PATCH] js: destroy dialog when closed

 gadjo/static/js/gadjo.js |    9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
gadjo/static/js/gadjo.js
79 79
            /* get title out of html */
80 80
            var title = $html.find(title_selector).text();
81 81

  
82
            $form.dialog({modal: true, 'title': title, width: 'auto'});
82
            $form.dialog({
83
              modal: true, 
84
              'title': title,
85
              width: 'auto',
86
              close: function (ev, ui) { 
87
                $(this).dialog('destroy'); 
88
              },
89
            });
83 90

  
84 91
            /* if the form doesn't have an @action attribute, set it to URL */
85 92
            if (! $form.prop('action')) {
86
-