Add convenience dialog_button()
JS function
This commit is contained in:
parent
76e71d634e
commit
d6bc584831
|
@ -68,6 +68,24 @@ function get_uuid(obj) {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Return a jQuery object containing a button from a dialog. This is a
|
||||||
|
* convenience function to help with browser differences. It is assumed
|
||||||
|
* that it is being called from within the relevant button click handler.
|
||||||
|
* @param {event} event - Click event object.
|
||||||
|
*/
|
||||||
|
function dialog_button(event) {
|
||||||
|
var button = $(event.target);
|
||||||
|
|
||||||
|
// TODO: not sure why this workaround is needed for Chrome..?
|
||||||
|
if (! button.hasClass('ui-button')) {
|
||||||
|
button = button.parents('.ui-button:first');
|
||||||
|
}
|
||||||
|
|
||||||
|
return button;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* reference to existing timeout warning dialog, if any
|
* reference to existing timeout warning dialog, if any
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in a new issue