JQuery UI ダイアログを作成する場合は、次のようなものを使用します。
var settings = {autoOpen:false, draggable:false, and so on...};
var dialog = $("#container").dialog(settings);
しかし、今、上記のようにダイアログ設定を取得する方法を知りたいです。
dialog.getSettings();
デフォルトの動作で多くのダイアログを使用するアプリケーションがあるため、必要です。何かのようなもの
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
}
}
}
JQuery UI ダイアログ ソースを見た後、ダイアログ コンポーネントのすべてのプロパティを含むdefaultsというプロパティに気付きました。しかし、どうすればこのデフォルトプロパティを取得できますか?
よろしく、