Skip to content

Commit

Permalink
Make "blankContentAdopt" put the children back when finished with the…
Browse files Browse the repository at this point in the history
…m - needed for grabbing form values, or re-displaying the dialog. Also, it pulls fresh each time, so you could change the contents of the blankContent div...
  • Loading branch information
jtsage committed Jun 13, 2012
1 parent 149fb1b commit 6829800
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions js/jquery.mobile.simpledialog2.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@
}).unbind("vclick click")
.bind(o.clickEvent, function() {
if ( o.buttonInput ) { self.sdIntContent.find('input [name=pickin]').trigger('change'); }
//var returnValue = props.click.apply(self.element[0], arguments);
var returnValue = props.click.apply(self, $.merge(arguments, props.args));
if ( returnValue !== false && props.close === true ) {
self.close();
Expand Down Expand Up @@ -292,7 +291,7 @@
}
},
close: function() {
var self = this, retty;
var self = this, o = this.options, retty;

if ( $.isFunction(self.options.callbackClose) ) {
retty = self.options.callbackClose.apply(self, self.options.callbackCloseArgs);
Expand All @@ -319,8 +318,12 @@
if ( self.options.resizeListener === true ) { $(window).unbind('resize.simpledialog'); }
}

if ( o.mode === 'blank' && o.blankContent !== false && o.blankContentAdopt === true ) {
self.element.append(o.blankContent);
o.blankContent = true;
}

if ( self.isDialog === true || self.options.animate === true ) {
//setTimeout("$.mobile.sdCurrentDialog.destroy();", 1000);
setTimeout(function(that) { return function () { that.destroy(); };}(self), 1000);
} else {
self.destroy();
Expand Down

0 comments on commit 6829800

Please sign in to comment.