Hi,
If i want to create a JQuery UI dialog, i use something like:
var settings = {autoOpen:false, draggable:false, and so on...};
var dialog = $("#container").dialog(settings);
But now i want to know how i can i retrieve dialog settings as shown above, something like
dialog.getSettings();
I need it because i have an application that uses many dialogs with a default behavior. Something like
function doAfterSubmit(dialogSettings) {
// some code
}
var dialogSettings = {
user:{
add:{
title:"Add user",
buttons:{
"Add":function() {
var settings = $(this).getSettings(); // The answer goes here
// AJAX to send some content
doAfterSubmit(settings);
}
},
otherProperties
},
remove:{
title:"Remove user",
buttons:{
"Remove":function() {
var settings = $(this).getSettings(); // The answer goes here
// AJAX to send some content
doAfterSubmit(settings);
}
},
otherProperties
},
removeAll:{
title:"Remove all user",
buttons:{
"Remove all":function() {
var settings = $(this).getSettings(); // The answer goes here
// AJAX to send some content
doAfterSubmit(settings);
}
},
otherProperties
}
}
}
After seeing JQuery UI dialog source, i have noticed a property called defaults which contains all properties of the dialog component. But how can i get this defaults property ?
regards,