don't destroy dialogs on close. Now same-page dialogs can be reopened after close, and selects don't need to unbind dialog change events to override the destroy.

This commit is contained in:
scottjehl 2011-01-28 14:30:24 -08:00
parent 1585f7d729
commit b10c5c04c2
2 changed files with 1 additions and 9 deletions

View file

@ -25,7 +25,7 @@ $.widget( "mobile.dialog", $.mobile.widget, {
.end()
.find('.ui-content,[data-role=footer]')
.last()
.addClass('ui-corner-bottom ui-overlay-shadow')
.addClass('ui-corner-bottom ui-overlay-shadow');
/* bind events
- clicks and submits should use the closing transition that the dialog opened with
@ -47,11 +47,6 @@ $.widget( "mobile.dialog", $.mobile.widget, {
.attr("data-transition", $.mobile.urlHistory.getActive().transition )
.attr("data-direction", "reverse");
}
})
//destroy the dialog after hiding
.bind("pagehide.dialog",function(){
self.destroy();
$(this).remove();
});
},

View file

@ -160,9 +160,6 @@ $.widget( "mobile.selectmenu", $.mobile.widget, {
self.refresh();
});
//unbind dialog destroy on close
menuPage.unbind("pagehide.dialog");
//support for using the native select menu with a custom button
if( o.useNativeMenu ){