diff --git a/addons/web/static/src/js/chrome.js b/addons/web/static/src/js/chrome.js index 3bc2a010702..e800012afb1 100644 --- a/addons/web/static/src/js/chrome.js +++ b/addons/web/static/src/js/chrome.js @@ -52,8 +52,27 @@ instance.web.dialog = function(element) { return result; }; +/** + A useful class to handle dialogs. + + Attributes: + - $buttons: A jQuery element targeting a dom part where buttons can be added. It always exists + during the lifecycle of the dialog. +*/ instance.web.Dialog = instance.web.Widget.extend({ dialog_title: "", + /** + Constructor. + + @param {Widget} parent + @param {dictionary} options A dictionary that will be forwarded to jQueryUI Dialog. Additionaly, that + dictionary can contain the following keys: + - buttons: The buttons key is not propagated to jQueryUI Dialog. It must be a dictionary (key = button label, + value = click handler) or a list of dictionaries (each element in the dictionary is send to the corresponding + method of a jQuery element targeting the