I just deployed a new version on stax.
If you look at
http://esmecloudserverapache.dickhirsch.staxapps.net/track_view/, you will
see my first attempts at creating modal dialog. Right now, I'm stuck on
submitting the dialog via jquery.
Here is the script (dialog_test.js). If anybody has any ideas how to solve
the problem that would be great.
$("#dialog-form").dialog({
autoOpen: false,
height: 200,
width: 350,
modal: true,
buttons: {
'Create a new track': function() {
var bValid = true;
allFields.removeClass('ui-state-error');
bValid = bValid &&
checkLength(tracking_input,"tracking_input",3,16);
bValid = bValid &&
checkRegexp(tracking_input,/^[a-z]([0-9a-z_])+$/i,"Track may consist of a-z,
0-9, underscores, begin with a letter.");
if (bValid) {
//$('button[type=submit] .default').click();
this.ownerDocument.forms[1].submit();
$(this).dialog('close');
}
},
Cancel: function() {
$(this).dialog('close');
}
},
close: function() {
allFields.val('').removeClass('ui-state-error');
}
});