jtsage/jquery-mobile-simpledialog — Issue #44: issue simpledialog2 additional simpledialog
Author: bmcharek
Created: 2012-02-27 15:42:15+00:00
State: open

Hi Jonathan,

In my code I use an additional feature to the dialog. If user changes input of textarea, a bool (now button) mode simpledialog pops-up with a warning. This used to work in the previous version.
In the newest version I built this feature in the callbackClose, such as that clicking either the 'ok' or 'cancel' button returns either true or false. The popup appears shortly and fades. Somewhere it is destroyed, before a button is clicked.
It goes like this:
$(document).delegate('#'+ deatag, 'click', function() {

$('

').simpledialog2({
mode : 'blank',
headerClose: true,
forceInput: false,
showModal: true,
clickEvent: 'vclick',

callbackClose: function () {

var number = 0;
rtrn = newdialog(n_wuhz);
return rtrn;
},
blankContent: dehtml
})

});

};

This is the additional dialog:
$('

').simpledialog2({
mode : 'button',
headerText: ' ',
headerClose: true,
buttonPrompt : 'Something something test?',
buttons : {
'OK': {
click: function () {
return true;

},
icon: "delete"
},
'Cancel': {
click: function () {
return false;
},
icon: "delete",
theme: "c"
}

Could you please have a look?

cheers