mirror of https://github.com/apache/cloudstack.git
UI Dialog: Don't show dialog with empty message
This commit is contained in:
parent
61d8dde033
commit
62fd9115c2
|
|
@ -585,27 +585,31 @@
|
|||
* Notice dialog
|
||||
*/
|
||||
notice: function(args) {
|
||||
return $(
|
||||
$('<span>').addClass('message').html(
|
||||
_l(args.message)
|
||||
)
|
||||
).dialog({
|
||||
title: _l('label.status'),
|
||||
dialogClass: 'notice',
|
||||
closeOnEscape: false,
|
||||
zIndex: 5000,
|
||||
buttons: [
|
||||
{
|
||||
text: _l('Close'),
|
||||
'class': 'close',
|
||||
click: function() {
|
||||
$(this).dialog('destroy');
|
||||
if (args.clickAction) args.clickAction();
|
||||
$('.hovered-elem').hide();
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
if (args.message) {
|
||||
return $(
|
||||
$('<span>').addClass('message').html(
|
||||
_l(args.message)
|
||||
)
|
||||
).dialog({
|
||||
title: _l('label.status'),
|
||||
dialogClass: 'notice',
|
||||
closeOnEscape: false,
|
||||
zIndex: 5000,
|
||||
buttons: [
|
||||
{
|
||||
text: _l('Close'),
|
||||
'class': 'close',
|
||||
click: function() {
|
||||
$(this).dialog('destroy');
|
||||
if (args.clickAction) args.clickAction();
|
||||
$('.hovered-elem').hide();
|
||||
}
|
||||
}
|
||||
]
|
||||
});
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
};
|
||||
})(window.jQuery, window.cloudStack);
|
||||
|
|
|
|||
Loading…
Reference in New Issue