remove dialog from dialogStack if it is closed with 'ok' or 'close'

button
This commit is contained in:
Philipp Schaefer
2013-06-14 00:42:27 +02:00
parent f6714a73c8
commit 48e60f809a
2 changed files with 15 additions and 5 deletions

View File

@ -62,7 +62,7 @@ window.dialog = function(options) {
// hint for iitc mobile that a dialog was opened
if (typeof android !== 'undefined' && android && android.dialogOpened) {
android.dialogOpened(id);
android.dialogOpened(id, true);
}
// Convert text to HTML if necessary
@ -179,6 +179,10 @@ window.dialog = function(options) {
window.DIALOG_COUNT--;
console.log('window.dialog: ' + $(this).data('id') + ' (' + $(this).dialog('option', 'title') + ') closed. ' + window.DIALOG_COUNT + ' remain.');
// hint for iitc mobile that a dialog was closed
if (typeof android !== 'undefined' && android && android.dialogOpened) {
android.dialogOpened(id, false);
}
// remove from DOM and destroy
$(this).dialog('destroy').remove();